qyqx / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

When starting shellinaboxd, I always get the erroro message "Failed to find any available port" #142

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When running under root "shellinaboxd" I always get the erroro message 
"Failed to find any available port". What do I have to do to make sellinabox 
work?

What is the expected output? What do you see instead?
That the shellinabox demon would start

What version of the product are you using? On what operating system?
ShellInABox: shellinabox_2.10-1_amd64.deb
OS: Debian Lenny v5.0 54bit

Please provide any additional information below.

Original issue reported on code.google.com by olaf.tri...@gmail.com on 1 Oct 2011 at 2:41

GoogleCodeExporter commented 9 years ago
As far as I understand it, that way you are attempting to run SiAB without of 
the required parameters.  Try this instead:

/etc/init.d/shellinabox  start

...which will start it with the options defined in that script.  I have asked a 
question here regarding the best way to set different options, but I have never 
got an answer, so I edit that script directly.

Original comment by gomez...@gmail.com on 2 Oct 2011 at 1:23

GoogleCodeExporter commented 9 years ago
I get this error currently and its  not because of how im starting it!

Original comment by M4dH4TT3...@gmail.com on 18 Dec 2014 at 1:41

GoogleCodeExporter commented 9 years ago
This error means that some other application is already listening on port 4200.
Maybe it is even shellinabox.

You could add --port parameter so that shellinabox will run on port 4201.

./shellinaboxd --port 4201

Original comment by luka.kra...@gmail.com on 13 Mar 2015 at 2:40

GoogleCodeExporter commented 9 years ago
Hello Dears,
I am facing something similar in Raspbian.

When I perform netstat -ntl I got:

   Active Internet connections (only servers)
   Proto Recv-Q Send-Q Local Address           Foreign Address         State
   tcp        0      0 127.0.0.1:4200          0.0.0.0:*               LISTEN
   tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
   tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN
   tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
   tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN

That means that the port 4200 has been configured to shellinabox (line 1), 
right?

But when I run the command shellinabox -d:

   Failed to find any available port

If I try to change the port (shellinaboxd -p 4201), the shell stops and after a 
control Z I have repeated the netstat -ntl:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:4200          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:4201            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN

I try to access the shellinabox in my browser, but I got a timeout.
Any idea?

Original comment by imgent...@gmail.com on 17 Mar 2015 at 1:02

GoogleCodeExporter commented 9 years ago
Hi, shellinabox is probably already running on port 4200. Try to run command 
"ps axl | grep shellinabox"
and check the output.

Output "127.0.0.1:4200" is telling us that shellinabox is configured to listen 
only on localhost, with 
option "--localhost-only". You can only connect to it from browser running on 
raspberry.

You should remove option "--localhost-only" from startup script and try again. 
I think that your startup 
script is "/etc/init.d/shellinabox". To restart shellinabox run 
"/etc/init.d/shellinabox restart".

PS: running shellinabox by hand is only usefull for testing (like "shellinaboxd 
-p 4201"), but as I can
see from your second output you should be able to connect to 
http://{IP_ADDRESS}:4201

Bye :)

Original comment by luka.kra...@gmail.com on 17 Mar 2015 at 8:23