New issue 550 by accov...@gmail.com: Local port forwarding doesn't work
http://code.google.com/p/connectbot/issues/detail?id=550
What steps will reproduce the problem?
1. Start a Local port forward on any port (using Menu -> Port Forwards ->
Menu -> Add port forward, or Hold-menu -> Edit port forwards -> Menu -> Add
port forward)
2. Port forward shows in list after you fill out the dialog, only if you
don't accept the default (blank).
3. Port forwards are of a strikethrough font, they don't work (`-L
3306:127.0.0.1:3306' doesn't work for example)
What is the expected output? What do you see instead?
The port forward should work (it did at one time, but idk why it doesn't
now). The port forward doesn't accept connections.
What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
ConnectBot 1.7.1 (v1.7.1 2010.10.08)
What type of system are you trying to connect to?
Xubuntu
If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?
TERM=screen
Linux xubuntu 2.6.38-13-generic #52-Ubuntu SMP i686 i386 GNU/Linux
Please provide any additional information below.
adb logcat outputs (go-away-m is my phone's hostname, could it be because I
have LinuxInstaller on my phone?):
E/ConnectBot.SSH(11780): Could not create local port forward
E/ConnectBot.SSH(11780): java.net.UnknownHostException: go-away-m
E/ConnectBot.SSH(11780): at
java.net.InetAddress.lookupHostByName(InetAddress.java:512)
E/ConnectBot.SSH(11780): at
java.net.InetAddress.getLocalHost(InetAddress.java:462)
E/ConnectBot.SSH(11780): at
org.connectbot.transport.SSH.enablePortForward(SSH.java:608)
E/ConnectBot.SSH(11780): at
org.connectbot.service.TerminalBridge.enablePortForward(TerminalBridge.java:869)
E/ConnectBot.SSH(11780): at
org.connectbot.PortForwardListActivity$2.onItemClick(PortForwardListActivity.java:157)
E/ConnectBot.SSH(11780): at
android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/ConnectBot.SSH(11780): at
android.widget.ListView.performItemClick(ListView.java:3561)
E/ConnectBot.SSH(11780): at
android.widget.AbsListView$PerformClick.run(AbsListView.java:1831)
E/ConnectBot.SSH(11780): at
android.os.Handler.handleCallback(Handler.java:587)
E/ConnectBot.SSH(11780): at
android.os.Handler.dispatchMessage(Handler.java:92)
E/ConnectBot.SSH(11780): at android.os.Looper.loop(Looper.java:150)
E/ConnectBot.SSH(11780): at
android.app.ActivityThread.main(ActivityThread.java:4293)
E/ConnectBot.SSH(11780): at
java.lang.reflect.Method.invokeNative(Native Method)
E/ConnectBot.SSH(11780): at
java.lang.reflect.Method.invoke(Method.java:507)
E/ConnectBot.SSH(11780): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
E/ConnectBot.SSH(11780): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
E/ConnectBot.SSH(11780): at dalvik.system.NativeStart.main(Native
Method)
Just ran across this issue on my phone and determined how to solve it. The
issue is that your phone calm= convert its hostname to an IP address. I
added an entry into my hosts file (/system/etc/hosts) pointing at 127.0.0.1
and everything works fine now. I am not sure why Connectbot needs to look
this up, but that's how I got it to work.
To whoever (I'm new to this, so I don't know how to mark it as Fixed),
Adam's fix worked for me.