I've been testing and using the openNTF Domino API (ODA) very heavily these past few days, and i am starting to notice large amounts of log files being generated. (ODA version M4.5) Yesterday, I found more than 10,000 of them. Today, there are a few hundred. It seems to be written once a day and about the same time time of day (roughly 14:00 to 15:00). All print outs of the stacktrace are the same. Here is an excerpt from the log:
14.10.2014 15:02:16 HTTP JVM: java.lang.StackOverflowError
14.10.2014 15:02:16 HTTP JVM: at sun.nio.cs.SingleByteEncoder.encodeArrayLoop(SingleByteEncoder.java:70)
14.10.2014 15:02:16 HTTP JVM: at sun.nio.cs.SingleByteEncoder.encodeLoop(SingleByteEncoder.java:146)
14.10.2014 15:02:16 HTTP JVM: at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:555)
14.10.2014 15:02:16 HTTP JVM: at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:405)
14.10.2014 15:02:16 HTTP JVM: at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:159)
14.10.2014 15:02:16 HTTP JVM: at java.io.OutputStreamWriter.write(OutputStreamWriter.java:229)
14.10.2014 15:02:16 HTTP JVM: at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:122)
14.10.2014 15:02:16 HTTP JVM: at java.io.PrintStream.write(PrintStream.java:500)
14.10.2014 15:02:16 HTTP JVM: at java.io.PrintStream.print(PrintStream.java:643)
14.10.2014 15:02:16 HTTP JVM: at java.io.PrintStream.println(PrintStream.java:780)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.logging.DefaultFileHandler.publish(DefaultFileHandler.java:134)
14.10.2014 15:02:16 HTTP JVM: at java.util.logging.Logger.log(Logger.java:1281)
14.10.2014 15:02:16 HTTP JVM: at java.util.logging.Logger.log(Logger.java:1244)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.utils.DominoUtils$4.run(DominoUtils.java:279)
14.10.2014 15:02:16 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:327)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.utils.DominoUtils.handleException(DominoUtils.java:273)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.getCollectionIds(DocumentIterator.java:79)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.<init>(DocumentIterator.java:53)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.impl.DocumentCollection.iterator(DocumentCollection.java:747)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.impl.NoteCollection.add(NoteCollection.java:159)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.impl.DocumentCollection.toLotusNoteCollection(DocumentCollection.java:83)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.getCollectionIds(DocumentIterator.java:70)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.<init>(DocumentIterator.java:53)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.impl.DocumentCollection.iterator(DocumentCollection.java:747)
14.10.2014 15:02:16 HTTP JVM: at org.openntf.domino.impl.NoteCollection.add(NoteCollection.java:159)
The last bit loop endlessly. I was unable to find a corresponding entry in the org.openntf*.log file.
EDIT*
After going through a few hundred documents, I did see this variation from the normal loop. Whether or not it is relevant, I cannot say:
14.10.2014 15:10:29 HTTP JVM: Error trying to format output for error handling. Resorting to standard stack trace...nullnull
14.10.2014 15:10:29 HTTP JVM: java.lang.StackOverflowErrorjava.lang.StackOverflowErrorjava.lang.StackOverflowError
14.10.2014 15:10:29 HTTP JVM: at sun.nio.cs.SingleByteEncoder.encodeArrayLoop(SingleByteEncoder.java:70)
14.10.2014 15:10:29 HTTP JVM: at sun.nio.cs.SingleByteEncoder.encodeLoop(SingleByteEncoder.java:146)
14.10.2014 15:10:29 HTTP JVM: at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:555)
14.10.2014 15:10:29 HTTP JVM: at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:405)
14.10.2014 15:10:29 HTTP JVM: at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:159)
14.10.2014 15:10:29 HTTP JVM: at java.io.OutputStreamWriter.write(OutputStreamWriter.java:229)
14.10.2014 15:10:29 HTTP JVM: at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:122)
14.10.2014 15:10:29 HTTP JVM: at java.io.PrintStream.write(PrintStream.java:500)
14.10.2014 15:10:29 HTTP JVM: at java.io.PrintStream.print(PrintStream.java:643)
14.10.2014 15:10:29 HTTP JVM: at java.io.PrintStream.append(PrintStream.java:1039)
14.10.2014 15:10:29 HTTP JVM: at java.io.PrintStream.append(PrintStream.java:51)
14.10.2014 15:10:29 HTTP JVM: at java.lang.StackTraceElement.appendTo(StackTraceElement.java:180)
14.10.2014 15:10:29 HTTP JVM: at java.lang.Throwable.appendTo(Throwable.java:305)
14.10.2014 15:10:29 HTTP JVM: at java.lang.Throwable.printStackTrace(Throwable.java:332)
14.10.2014 15:10:29 HTTP JVM: at java.lang.Throwable.printStackTrace(Throwable.java:212)
14.10.2014 15:10:29 HTTP JVM: at java.lang.Throwable.printStackTrace(Throwable.java:163)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.logging.DefaultConsoleHandler.publish(DefaultConsoleHandler.java:104)
14.10.2014 15:10:29 HTTP JVM: at java.util.logging.Logger.log(Logger.java:1281)
14.10.2014 15:10:29 HTTP JVM: at java.util.logging.Logger.log(Logger.java:1244)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.utils.DominoUtils$4.run(DominoUtils.java:279)
14.10.2014 15:10:29 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:327)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.utils.DominoUtils.handleException(DominoUtils.java:273)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.getCollectionIds(DocumentIterator.java:79)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.iterators.DocumentIterator.<init>(DocumentIterator.java:53)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.impl.DocumentCollection.iterator(DocumentCollection.java:747)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.impl.NoteCollection.add(NoteCollection.java:159)
14.10.2014 15:10:29 HTTP JVM: at org.openntf.domino.impl.DocumentCollection.toLotusNoteCollection(DocumentCollection.java:83)
Is this a known issue? If so, how can I correct it?
If I cannot correct it quickly, can I at least turn off the print out into the server log?
Is this indeed an error with the API as it seems from the stacktrace, or could it be that I am using it incorrectly?
This looks like a problem fixed in a subsequent release which I think was related to iterators.
In M4.5, if adding a DocumentCollection to a NoteCollection it will call the iterator on the DocumentCollection at line 159 https://github.com/OpenNTF/org.openntf.domino/blob/M4.5/org.openntf.domino/src/org/openntf/domino/impl/NoteCollection.java.
However, the DocumentCollection iterator is instantiated by calling getCollectionIDs, which adds the DocumentCollection to a new NoteCollection at line 83 https://github.com/OpenNTF/org.openntf.domino/blob/M4.5/org.openntf.domino/src/org/openntf/domino/impl/DocumentCollection.java.
This is the cause of the stack trace, but in the Release Candidate subsequent to M4.5, this is fixed. The corresponding method, starting on line 180, now just uses the core NoteCollection.add method https://github.com/OpenNTF/org.openntf.domino/blob/master/org.openntf.domino/src/org/openntf/domino/impl/NoteCollection.java
Yes, update to the RC2.1 to fix this - had the same issue when using RC2.0
Related
I am trying to crawl url: https://www.randolphnj.org/
But it is showing this error
2020-09-22 15:03:08,395 INFO httpclient.Http: http.accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2020-09-22 15:03:08,395 INFO httpclient.Http: http.enable.cookie.header = true
2020-09-22 15:03:08,399 INFO conf.Configuration: found resource httpclient-auth.xml at file:/tmp/hadoop-unjar7802696204891280694/httpclient-auth.xml
Fetch failed with protocol status: exception(16), lastModified=0: Http code=406, url=https://www.randolphnj.org/
may I know what is the reason.kindly help me to solve.
Most likely the server is blocking requests when the HTTP request header "User-agent" includes the string "Nutch". I was able to reproduce the behavior using wget:
$> wget --header='User-Agent: mycrawler/Nutch-1.17' https://www.randolphnj.org/
--2020-09-25 10:55:42-- https://www.randolphnj.org/
Resolving www.randolphnj.org (www.randolphnj.org)... 63.247.128.112
Connecting to www.randolphnj.org (www.randolphnj.org)|63.247.128.112|:443... connected.
HTTP request sent, awaiting response... 406 Not Acceptable
2020-09-25 10:55:43 ERROR 406: Not Acceptable.
$> wget https://www.randolphnj.org/
--2020-09-25 11:02:25-- https://www.randolphnj.org/
Resolving www.randolphnj.org (www.randolphnj.org)... 63.247.128.112
Connecting to www.randolphnj.org (www.randolphnj.org)|63.247.128.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’
> 14.195.188.230 - - [18/Mar/2017:16:43:11 +0000] "(004026579154BP05000004026579154111213V0000.0000N00000.0000E000.0000000000.0010000000L0000021C)" 400 173 "-" "-" "-"
This is the error message that i received
HTTP/1.1 400 Bad Request
Server: nginx/1.10.1
Date: Sun, 19 Mar 2017 02:19:35 GMT
Content-Type: text/html
Content-Length: 173
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>
This is the log that i can see in my nginx access log, I need this data in my node server.
(004026579154BP05000004026579154111213V0000.0000N00000.0000E000.0000000000.0010000000L0000021C)
1) I am using elastic Beanstalk, i don't know how can i pass the above value to my node server module? If its possible to get that value as http or https request inside my node express module.
2) If i have to run a net server, than in which port should i listen for tcp, and how nginx will know about that port, for http server port, i use process.env.port
So, I have to get http://www.rssweather.com/wx/in/kanpur/wx.php with using netcat.
My code goes like this.
nc -v rssweather.com 80
GET http://www.rssweather.com/wx/in/kanpur/wx.php HTTP/1.0
GET http://www.rssweather.com/wx/in/kanpur/wx.php HTTP/1.1
Connection: close
And, the result-
HTTP/1.1 403 Forbidden
Date: Thu, 03 Sep 2015 12:41:08 GMT
Server: Apache
Connection: close
Content-Type: text/html
charset=iso-8859-1
You don't have permission to access /wx/in/kanpur/wx.php
on this server.
Is there any way to overcome this Forbidden 403 error? What am I doing wrong?
You've already connected to the webserver at rssweather.com so you must not specify the full URL in the GET request, just the path:
nc -v rssweather.com 80
GET /wx/in/kanpur/wx.php HTTP/1.0
<blank line with return>
Whenever I refresh a page in my MEAN application, my terminal that's running the application outputs tons of get requests. Is this slowing down my app? Can I get rid of some of these?
GET / 304 113.645 ms - -
GET /assets/stylesheets/css/bootstrap.min.css 304 11.846 ms - -
GET /assets/stylesheets/css/animate.css 304 19.584 ms - -
GET /assets/javascripts/fancybox/jquery.fancybox.css 304 18.081 ms - -
GET /assets/javascripts/owl.carousel/owl.carousel.css 304 17.841 ms - -
GET /assets/javascripts/owl.carousel/owl.theme.css 304 17.657 ms - -
GET /assets/stylesheets/css/style.css 304 16.135 ms - -
GET /assets/stylesheets/css/responsive.css 304 5.011 ms - -
GET /assets/javascripts/jplayer/skin/jukebox/css/jplayer.jukebox.css 304 5.593 ms - -
GET /assets/stylesheets/css/main.css 304 16.013 ms - -
GET /modules/users/css/users.css 304 13.936 ms - -
GET /assets/stylesheets/css/fontawesome/font-awesome.css 304 22.547 ms - -
GET /assets/javascripts/jpreloader/jpreloader.css 304 20.911 ms - -
GET /modules/core/css/core.css 304 13.623 ms - -
GET /assets/stylesheets/css/angular-snap.min.css 304 16.814 ms - -
GET /lib/jquery/dist/jquery.min.js 304 16.388 ms - -
GET /lib/angular/angular.js 304 16.650 ms - -
GET /lib/angular-resource/angular-resource.js 304 13.443 ms - -
GET /lib/angular-cookies/angular-cookies.js 304 28.193 ms - -
GET /lib/angular-animate/angular-animate.js 304 26.984 ms - -
GET /lib/angular-ui-router/release/angular-ui-router.js 304 9.312 ms - -
GET /lib/angular-sanitize/angular-sanitize.js 304 33.775 ms - -
GET /lib/angular-bootstrap/ui-bootstrap-tpls.js 304 33.470 ms - -
GET /lib/angular-ui-utils/ui-utils.js 304 31.331 ms - -
GET /lib/lodash/lodash.min.js 304 17.803 ms - -
GET /lib/angular-touch/angular-touch.js 304 22.445 ms - -
GET /lib/angularjs-dropdown-multiselect/dist/angularjs-dropdown-multiselect.min.js 304 22.940 ms - -
GET /application.js 304 24.288 ms - -
GET /lib/angular-media-player/dist/angular-media-player.js 304 79.501 ms - -
GET /lib/snapjs/snap.min.js 304 70.739 ms - -
GET /config.js 304 83.980 ms - -
GET /modules/accounts/accounts_module.js 304 59.103 ms - -
GET /modules/artistgenres/artistgenres.client.module.js 304 86.947 ms - -
GET /modules/artisttypes/artisttypes.client.module.js 304 37.306 ms - -
GET /modules/artistinterests/artistinterests.client.module.js 304 56.973 ms - -
GET /modules/files/files.client.module.js 304 13.750 ms - -
GET /modules/cities/cities.client.module.js 304 67.768 ms - -
GET /modules/messages/messages.client.module.js 304 69.352 ms - -
GET /modules/profile/profile_module.js 304 16.140 ms - -
GET /modules/users/users.client.module.js 304 18.733 ms - -
GET /modules/core/core.client.module.js 304 83.376 ms - -
GET /modules/accounts/pages/import/import_controller.js 304 79.469 ms - -
GET /modules/home/home_module.js 304 85.333 ms - -
GET /modules/neighborhoods/neighborhoods.client.module.js 304 91.851 ms - -
GET /modules/container/container_module.js 304 24.242 ms - -
GET /modules/accounts/pages/signup/signup_controller.js 304 34.483 ms - -
GET /modules/artistgenres/config/artistgenres.client.config.js 304 41.225 ms - -
GET /modules/accounts/pages/login/login_controller.js 304 42.122 ms - -
GET /modules/artistgenres/config/artistgenres.client.routes.js 304 38.534 ms - -
GET /modules/accounts/pages/apply/apply_controller.js 304 42.867 ms - -
GET /modules/accounts/config/accounts_routes.js 304 45.520 ms - -
GET /modules/artistgenres/services/artistgenres.client.service.js 304 24.213 ms - -
GET /modules/artistinterests/services/artistinterests.client.service.js 304 13.138 ms - -
GET /modules/artistinterests/config/artistinterests.client.config.js 304 61.058 ms - -
GET /modules/artistinterests/config/artistinterests.client.routes.js 304 63.784 ms - -
GET /modules/artistgenres/controllers/artistgenres.client.controller.js 304 62.882 ms - -
GET /modules/artistinterests/controllers/artistinterests.client.controller.js 304 85.128 ms - -
GET /modules/artisttypes/config/artisttypes.client.routes.js 304 49.166 ms - -
GET /modules/cities/controllers/cities.client.controller.js 304 25.185 ms - -
GET /modules/artisttypes/controllers/artisttypes.client.controller.js 304 58.415 ms - -
GET /modules/artisttypes/config/artisttypes.client.config.js 304 57.969 ms - -
GET /modules/artisttypes/services/artisttypes.client.service.js 304 78.072 ms - -
GET /modules/cities/config/cities.client.config.js 304 53.443 ms - -
GET /modules/container/components/footer/footer_controller.js 304 51.342 ms - -
GET /modules/cities/services/cities.client.service.js 304 56.805 ms - -
GET /modules/cities/config/cities.client.routes.js 304 20.592 ms - -
GET /modules/container/components/header/header_controller.js 304 81.731 ms - -
GET /modules/container/main/main_controller.js 304 96.035 ms - -
GET /modules/container/services/nav-links-menu_directive.js 304 96.880 ms - -
GET /modules/container/splash/splash_controller.js 304 103.059 ms - -
GET /modules/container/config/container-layout_routes.js 304 109.850 ms - -
GET /modules/container/services/nav-menu_service.js 304 37.800 ms - -
GET /modules/core/controllers/header.client.controller.js 304 30.084 ms - -
GET /modules/core/config/core.client.routes.js 304 16.356 ms - -
GET /modules/core/controllers/home.client.controller.js 304 29.481 ms - -
GET /modules/core/controllers/browse.client.controller.js 304 48.258 ms - -
GET /modules/files/services/files.client.service.js 304 26.917 ms - -
GET /modules/core/services/modals/standardModal_controller.js 304 85.918 ms - -
GET /modules/core/services/menus.client.service.js 304 62.773 ms - -
GET /modules/files/controllers/files.client.controller.js 304 65.790 ms - -
GET /modules/files/config/files.client.routes.js 304 72.539 ms - -
GET /modules/home/config/home_routes.js 304 26.648 ms - -
GET /modules/home/pages/browse/browse_controller.js 304 29.926 ms - -
GET /modules/messages/config/messages.client.routes.js 304 31.505 ms - -
GET /modules/home/pages/home/home_controller.js 304 47.686 ms - -
GET /modules/messages/controllers/messages.client.controller.js 304 32.608 ms - -
GET /modules/messages/services/messages.client.service.js 304 44.331 ms - -
GET /modules/home/services/toggle-class_directive.js 304 51.178 ms - -
GET /modules/neighborhoods/controllers/neighborhoods.client.controller.js 304 48.002 ms - -
GET /modules/neighborhoods/config/neighborhoods.client.config.js 304 50.873 ms - -
GET /modules/neighborhoods/services/neighborhoods.client.service.js 304 51.807 ms - -
GET /modules/neighborhoods/config/neighborhoods.client.routes.js 304 45.290 ms - -
GET /modules/profile/config/profile_routes.js 304 33.874 ms - -
GET /modules/profile/pages/profile-edit/profile-edit_controller.js 304 36.892 ms - -
GET /modules/users/config/users.client.routes.js 304 54.851 ms - -
GET /modules/profile/pages/profile/profile_controller.js 304 59.528 ms - -
GET /modules/users/config/users.client.config.js 304 61.343 ms - -
GET /modules/users/controllers/admin.client.controller.js 304 23.830 ms - -
GET /modules/users/controllers/settings.client.controller.js 304 31.434 ms - -
GET /modules/users/services/authentication.client.service.js 304 37.039 ms - -
GET /modules/users/controllers/profile.client.controller.js 304 26.199 ms - -
GET /modules/users/controllers/password.client.controller.js 304 26.991 ms - -
GET /modules/users/controllers/authentication.client.controller.js 304 24.791 ms - -
GET /assets/javascripts/jplayer/jquery.jplayer.min.js 304 40.561 ms - -
GET /assets/javascripts/bootstrap.min.js 304 48.406 ms - -
GET /assets/javascripts/angular-snap.min.js 304 57.688 ms - -
GET /assets/javascripts/jpreloader/jpreloader.min.js 304 55.109 ms - -
GET /modules/users/services/users.client.service.js 304 23.405 ms - -
GET /assets/javascripts/jplayer/add-on/jplayer.playlist.min.js 304 15.056 ms - -
GET /assets/javascripts/sly.min.js 304 25.137 ms - -
GET /assets/javascripts/wow/wow.min.js 304 24.524 ms - -
GET /assets/javascripts/jquery.hoverdir.js 304 30.592 ms - -
GET /assets/javascripts/jquery.easing.js 304 27.058 ms - -
GET /assets/javascripts/modernizr.js 304 58.101 ms - -
GET /assets/javascripts/jquery.parallax-1.1.3.js 304 59.616 ms - -
GET /assets/javascripts/masonry.pkgd.min.js 304 24.460 ms - -
GET /assets/javascripts/isotope.pkgd.min.js 304 27.051 ms - -
GET /assets/javascripts/owl.carousel/owl.carousel.min.js 304 54.712 ms - -
GET /assets/javascripts/fancybox/jquery.fancybox.pack.js 304 52.963 ms - -
GET /assets/stylesheets/css/bootstrap.css.map 304 47.436 ms - -
GET /lib/jquery/dist/jquery.min.map 304 49.565 ms - -
GET /modules/container/main/main_template.html 304 171.919 ms - -
The page that this code came from doesn't need at least half of these...
When you launch your server and visit your main page it will load all necessary files for all the pages in your web application.
This is the power of AngularJS = No more refresh on pages. Imagine if you need to reload all files when you change to another page? Don't worry ;)
If you see some resources that you don't need, you can modify in your crud configuration file or the all.js file (on MEANJS).
Links to help you:
MEANJS(http://meanjs.org/docs.html)
MEAN.IO (http://learn.mean.io/)
I am trying to install cabal behind a firewall without success.
It seems that cabal does not support http redirect,
is there a way to fix it?
cabal update -v3
Downloading the latest package list from hackage.haskell.org
Sending:
GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1
User-Agent: cabal-install/1.20.0.2 (linux; x86_64)
Host: hackage.haskell.org
proxy uri host: proxy.swmed.edu, port: :3128
Creating new connection to proxy.swmed.edu:3128
Received:
HTTP/1.1 302 authenticationrequired
Via: 1.1 129.112.115.40 (McAfee Web Gateway 7.4.2.1.0.17593)
Date: Fri, 20 Jun 2014 17:00:56 GMT
Location:
https://m-proxy1.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=2152648114&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1403283656
Content-Type: text/html
Cache-Control: no-cache
Content-Length: 3678
Proxy-Connection: Keep-Alive
302 - redirect
Warning: http error: Unable to handle redirect, unsupported scheme:
https://m-proxy1.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=2152648114&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1403283656
cabal: Failed to download
http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Error
HTTP code: 302"
(Update) Jun 23, 2014
Follow #Sibi suggestion, I pasted a similar experience using cntlm-0.92.3.
Here is my config config.ini:
Proxy proxy.swmed.edu:3128
Listen 127.0.0.1:53124
I first tried to use:
./cntlm -c config.ini
then the same error happens:
cabal update -v3
Downloading the latest package list from hackage.haskell.org
Sending:
GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1
User-Agent: cabal-install/1.20.0.2 (linux; x86_64)
Host: hackage.haskell.org
proxy uri host: 127.0.0.1, port: :53124
Creating new connection to 127.0.0.1:53124
Received:
HTTP/1.1 302 authenticationrequired
Via: 1.1 129.112.115.43 (McAfee Web Gateway 7.4.2.1.0.17593)
Date: Mon, 23 Jun 2014 05:34:18 GMT
Location:
https://m-proxy4.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=1513153200&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1403501658
Content-Type: text/html
Cache-Control: no-cache
Content-Length: 3678
Proxy-Connection: Keep-Alive
Connection: close
302 - redirect
Warning: http error: Unable to handle redirect, unsupported scheme:
https://m-proxy4.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=1513153200&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1403501658
cabal: Failed to download
http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Error
HTTP code: 302"
NOTE: this question is not the same as authentication, as our proxy server does not need to be authenticated. This question is about http redirect problem.
(Update) June 23, 2014
Run the following command as #Sibi suggested:
./cntlm -M http://www.google.com -c config.ini -v
And the output can be found at http://pastebin.com/zAvZBDVu
Reading the logs, we see the proxy was via https not http, and the error was "unsupported scheme" since cabal prior to recent versions did not handle https. Https transports have been added to cabal in the most recent versions, so the issue should now be resolved.