kamikaze2002261 / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Local port forwarding doesn't work #550

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.jav
a: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)

Original issue reported on code.google.com by accov...@gmail.com on 14 Jan 2012 at 12:24

GoogleCodeExporter commented 8 years ago
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.

Original comment by Adam.H.O...@gmail.com on 14 Jan 2012 at 2:24

GoogleCodeExporter commented 8 years ago
To whoever (I'm new to this, so I don't know how to mark it as Fixed), Adam's 
fix worked for me.

Original comment by accov...@gmail.com on 14 Jan 2012 at 11:15

GoogleCodeExporter commented 8 years ago
For me it is still not working. I changed dev host setting so that it takes 
127.0.0.1:8080 instead of Virtual host after reading the above. I could not 
change hosts file on Android tablet so I changed virtual host setting to read 
into port :8080 but still no use.

Original comment by satyaka...@gmail.com on 4 Dec 2013 at 12:21

GoogleCodeExporter commented 8 years ago
Adam's fix also worked for me! Make sure you have the entry "127.0.0.1 
localhost" in your /etc/hosts

Original comment by mailserv...@gmail.com on 26 Jan 2014 at 5:37