Modify

Opened 19 months ago

Last modified 17 months ago

#7094 new defect

retrieving OAuth token failed due to HTTP 411 error

Reported by: Larry0ua Owned by: bastiK
Priority: normal Component: Core
Version: latest Keywords: oauth, 411
Cc:

Description

Steps to reproduce:

  1. Open Preferences
  2. Select Connection Settings tab.
  3. Select using OAuth
  4. Enter your login/password, click Get Access
  5. Error is displayed, console contains:
    D:\temp\temp>"C:\Program Files (x86)\Java\jdk1.7.0\bin\java.exe" -Xmx1G -jar josm-latest.jar
    Repository Root: http://josm.openstreetmap.de/svn
    Build-Date: 2011-11-28 02:32:25
    Last Changed Author: bastiK
    Revision: 4616
    Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
    URL: http://josm.openstreetmap.de/svn/trunk
    Last Changed Date: 2011-11-27 23:10:38 +0100 (Sun, 27 Nov 2011)
    Last Changed Rev: 4616
    
    Skipping plugin update after JOSM upgrade. Automatic update at startup is disabled.
    GET http://api.openstreetmap.org/api/capabilities... OK
    Communications with http://api.openstreetmap.org/api established using protocol version 0.6.
    loading plugin 'reltoolbox' (version 26986)
    loading plugin 'PicLayer' (version 27168)
    loading plugin 'buildings_tools' (version 26731)
    loading plugin 'FastDraw' (version 26986)
    loading plugin 'GpxPoints' (version 26681)
    loading plugin 'utilsplugin2' (version 26986)
    loading plugin 'print' (version 27066)
    Silent shortcut conflict: 'print:print' moved by 'tools:splitobject' to 'Ctrl+B'.
    Registered toolbar action without name: org.openstreetmap.josm.plugins.print.PrintAction
    Toolbar action without name: org.openstreetmap.josm.plugins.print.PrintAction
    RemoteControl::Accepting connections on port 8111
    Silent shortcut conflict: 'core_multikey:previousMarker' moved by 'tools:splitonintersections' to 'Shift+P'.
    Toolbar action without name: org.openstreetmap.josm.plugins.print.PrintAction
    org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Server returned HTTP response code: 411 for URL: http://www.openstreetmap.org/oauth/request_token
            at org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClient.getRequestToken(OsmOAuthAuthorizationClient.java:133)
            at org.openstreetmap.josm.gui.oauth.RetrieveRequestTokenTask.realRun(RetrieveRequestTokenTask.java:79)
            at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:79)
            at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:125)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
            at java.util.concurrent.FutureTask.run(FutureTask.java:166)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Server returned HTTP response code: 411 for URL: http://www.openstreetmap.org/oauth/request_token
            at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
            at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
            at org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClient.getRequestToken(OsmOAuthAuthorizationClient.java:128)
            ... 9 more
    Caused by: java.io.IOException: Server returned HTTP response code: 411 for URL: http://www.openstreetmap.org/oauth/request_token
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1661)
            at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1659)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1657)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1240)
            at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getContent(HttpURLConnectionResponseAdapter.java:18)
            at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:228)
            at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
            ... 11 more
    Caused by: java.io.IOException: Server returned HTTP response code: 411 for URL: http://www.openstreetmap.org/oauth/request_token
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1612)
            at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
            at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getStatusCode(HttpURLConnectionResponseAdapter.java:22)
            at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:178)
            ... 11 more
    

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12 :
411 Length Required

The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.

Attachments (0)

Change History (3)

comment:1 Changed 17 months ago by bastiK

  • Owner changed from team to Larry0ua
  • Status changed from new to needinfo

Cannot reproduce; tested both the "fully automatic" and the "semi-automatic" method. Please try again and provide more details.

comment:2 follow-up: Changed 17 months ago by Larry0ua

  • Owner changed from Larry0ua to bastiK
  • Status changed from needinfo to new

The problem may be that I'm using proxy server at work. Cannot check without proxy now.

comment:3 in reply to: ↑ 2 Changed 17 months ago by skyper

Replying to Larry0ua:

The problem may be that I'm using proxy server at work. Cannot check without proxy now.

Probably !

See also #3970, #4216 and #5404.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bastiK. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change to Larry0ua
as duplicate The resolution will be set to duplicate. Next status will be 'closed'.The specified ticket will be cross-referenced with this ticket
The owner will be changed from bastiK to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.