Opened 15 years ago
Closed 15 years ago
#4449 closed defect (worksforme)
josm 2899 unable to use socks5 proxy
Reported by: | lixus | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | socks networking | Cc: |
Description
Hello,
I am unable to get osm/tile data using a socks5 proxy.
It used to work like this, some month ago with older versions:
java -DsocksProxyHost=localhost -DsocksProxyPort=2209 -Xmx1024M -jar ./source/josm-latest.jar
Now I set it up like this:
Edit -> Prefrences -> Connection Settings -> Proxy settings
(*) Use a SOCKS Proxy
Host: localhost
Port: 2209
Socks5 server is basically a "ssh -f -C -D 127.0.1:2209 ...."
# java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.7pre) (6b17~pre3-1)
OpenJDK Client VM (build 16.0-b10, mixed mode, sharing)
I also tried
# /usr/lib/jvm/java-6-sun-1.6.0.16/jre/bin/java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
With all combinations of these command lines
# java -DsocksProxyHost=localhost -DsocksProxyPort=2209 -Djava.net.useSystemProxies=false -Xmx1024M -jar ./source/josm-latest.jar
or
# java -DsocksProxyHost=localhost -DsocksProxyPort=2209 -Xmx1024M -jar ./source/josm-latest.jar
# java -Xmx1024M -jar ./source/josm-latest.jar
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-01-28 02:32:17
Last Changed Author: mjulius
Revision: 2899
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-01-27 22:21:17 +0100 (Wed, 27 Jan 2010)
Last Changed Rev: 2899
loading plugin 'colorscheme'
loading plugin 'PicLayer'
loading plugin 'tageditor'
loading plugin 'remotecontrol'
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:336)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.<init>(ServerSocket.java:202)
at org.openstreetmap.josm.plugins.remotecontrol.HttpServer.<init>(HttpServer.java:37)
at org.openstreetmap.josm.plugins.remotecontrol.RemoteControlPlugin.restartServer(RemoteControlPlugin.java:44)
at org.openstreetmap.josm.plugins.remotecontrol.RemoteControlPlugin.<init>(RemoteControlPlugin.java:23)
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:532)
at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:197)
at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:350)
at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:402)
at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:441)
at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:197)
loading plugin 'slippymap'
loading plugin 'osmarender'
loading plugin 'multipoly'
Silent shortcut conflict: 'tools:multipoly' moved by 'tools:mirror' to 'Alt+Shift+M'.
Error: Connection to proxy 'localhost/127.0.0.1:2209' for URI 'http://tile.openstreetmap.org/12/2134/1354.png' failed. Exception was: java.net.SocketException: Network is unreachable
Failed to save ETag: null
failed loading 12/2134/1354 Network is unreachable
Error: Connection to proxy 'localhost/127.0.0.1:2209' for URI 'http://tile.openstreetmap.org/12/2134/1355.png' failed. Exception was: java.net.SocketException: Network is unreachable
Failed to save ETag: null
Other applications (e.g. firefox) work well using SOCKS5 on localhost:2209
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
I dont't know how to provide more details.
I now moved my ~/.josm away to start from scatch.
ssh provides a socks proxy, which works well with wget,firefox,xchat ...
# ssh -f -C -D 127.0.1:2209 ....
/# lsof -i tcp:2209
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ssh 8274 muellejo 5u IPv4 3102773 0t0 TCP localhost:2209 (LISTEN)
So now I start up josm:
/# java -Xmx1024M -jar ./source/josm-latest.jar
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-02-05 02:31:14
Last Changed Author: mjulius
Revision: 2940
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-02-05 01:34:07 +0100 (Fri, 05 Feb 2010)
Last Changed Rev: 2940
Error: Connection to proxy '/127.0.0.1:2209' for URI 'http://tile.openstreetmap.org/3/2/3.png' failed. Exception was: java.net.SocketException: Network is unreachable
Failed to save ETag: null
failed loading 3/2/3 Network is unreachable
Error: Connection to proxy '/127.0.0.1:2209' for URI 'http://tile.openstreetmap.org/3/6/2.png' failed. Exception was: java.net.SocketException: Network is unreachable
Failed to save ETag: null
failed loading 3/6/2 Network is unreachable
Error: Connection to proxy '/127.0.0.1:2209' for URI 'http://tile.openstreetmap.org/3/6/3.png' failed. Exception was: java.net.SocketException: Network is unreachable
Failed to save ETag: null
Curl works fine with socks for the above url:
/# curl -I --socks5 127.0.0.1:2209 http://tile.openstreetmap.org/3/6/3.png
HTTP/1.1 200 OK
Date: Fri, 05 Feb 2010 08:28:21 GMT
Server: Apache/2.2.8 (Ubuntu)
ETag: "a833254718a5476e7b615b0e340cd148"
Content-Length: 13550
Cache-Control: max-age=15170
Expires: Fri, 05 Feb 2010 12:41:11 GMT
Content-Type: image/png
Josm Version is 2940, java version 1.6.0 0
Edit->Preferences->Connection Settings->Proxy Settings->Use a SOCKS Proxy
Host: 127.0.0.1
Port: 2209
Can somebody give an advise if and how I have to use these java options in addition:
-DsocksProxyHost=localhost
-DsocksProxyPort=2209
-Djava.net.useSystemProxies= true/false ?
TIA
Lixus
comment:3 by , 15 years ago
Exception was: java.net.SocketException: Network is unreachable
Ah, I see, this makes much more sense than the first posted error message.
Can somebody give an advise if and how I have to use these java options in addition:
-DsocksProxyHost=localhost -DsocksProxyPort=2209 -Djava.net.useSystemProxies= true/false ?
Try lauching with these options. Then go to preferences and set the proxy settings to "Use system proxies". I'm not sure whether this works, though.
comment:4 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Ha, this is not a socks problem at all but a general problem with debian and java networking
http://www.mail-archive.com/josm-dev@openstreetmap.org/msg02942.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044
It now works fine for me.
So this can be closed.
I'm puzzled. Looking at the stack trace I'd say that the remote plugin fails when binding to a local port on your machine. It does so listening for incoming remote control requests.
Currently I don't see a connection to SOCKS. Am I missing something?