Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websockify successfully telnets to a device but no output is shown #216

Open
beeelze opened this issue Dec 16, 2015 · 10 comments
Open

Websockify successfully telnets to a device but no output is shown #216

beeelze opened this issue Dec 16, 2015 · 10 comments
Labels
bug Something isn't working

Comments

@beeelze
Copy link

beeelze commented Dec 16, 2015

I have a couple of switches and routers that have their serial console port connected to a console server. To get console access of those devices I make a websockify connection from my server to the console server + port like this:

websockify 2115 --wrap-mode=respawn < console server ip >:2115 --ssl-only --cert=/etc/ssl/ca-certificates.crt --key=/etc/ssl/private/some.key

The fact that I see a 'Disconnect' button on my webpage tells me that a connection to the device was made. On my ubuntu server a $ netstat -antp shows me the following:

tcp        0      0 < public server ip >:2115      < public client ip >:32163   ESTABLISHED 3504/python 
tcp        0      0 < private server ip >:41522       < console server ip >:2115      ESTABLISHED 3504/python

This tells me the connection from the place I am to the console server + port has been successfully established. Everything seems to be working fine except for the fact that I 'do not always' get a console output. What am I missing here?

@beeelze
Copy link
Author

beeelze commented Dec 16, 2015

Update:

A lot of devices do give me console output, but some of them don't. What could I check why some devices do work and why some don't?

Doing a regular telnet to the console server + port works for all devices, so it's probably not telnet related.

@beeelze
Copy link
Author

beeelze commented Jan 5, 2016

bump?

@DirectXMan12
Copy link
Member

Sorry for the delay, your issue caught me right before holiday break ;-). Are you using the sample websockify telnet client? It's possible that there's a bug in that. One thing that you could try would be to use a different websocket client (e.g. https://github.com/progrium/wssh), and see if that still has the issue where you don't get output occasionally.

@DirectXMan12 DirectXMan12 added the bug Something isn't working label Jan 6, 2016
@beeelze
Copy link
Author

beeelze commented Jan 12, 2016

Hi @DirectXMan12 , yes I'm using the websockify telnet client: wstelnet.html file. The problem usually occurs when connecting to Ipoman PDU's and several routers and switches. The < span > elements that make up the telnet window stay black even when the button says 'Disconnect'. If I was not clear enough, this is the problem I'm having.

I took a quick look at wssh. With websockify I'm proxying from a port on my Ubuntu server (2115 in my OP) to my console server (< console server ip >:2115 in my OP). How would wssh do the proxying? In the README I only see that it listens on a port:

wssh -l localhost:8000/websocket

Oh, and what could that bug you're talking about be?

Thanks for responding. I hope you had a nice holiday!

@beeelze
Copy link
Author

beeelze commented Jan 27, 2016

Any news?

@kanaka
Copy link
Member

kanaka commented Jan 27, 2016

@beeelze telnet is almost but not quite a raw character stream and wstelnet is a very simple demonstration program so it may be the case that some of your systems are using/requiring parts of the telnet protocol that wstelnet has not implemented yet. It would be interesting to enable debugging before you connect and comparing between the systems that work and those that don't.

To enable debugging, load wstelnet.html, open the javascript console, then run this:

WebUtil.init_logging("debug"); 

and then connect and you should get verbose debug information to the javascript console about everything that is sent and received.

@beeelze
Copy link
Author

beeelze commented Jan 28, 2016

@kanaka The following debug information is what I get when I successfully connect to a PDU for example and then press enter a couple of times, but get no output on screen. It's like the other end doesn't receive any keys or something.

screen shot 2016-01-28 at 11 10 02

And debug information on successful connection with response:

screen shot 2016-01-28 at 11 12 01

What does this tell you?

@beeelze
Copy link
Author

beeelze commented Feb 3, 2016

I notice a clear difference between the unsuccessful and successful logs, but what actions can I take next according to them? Does getch mean that it is waiting for user input, but that it never receives any and decides to refresh? Or is there perhaps a compatibility issue with the terminal type VT100?

@beeelze
Copy link
Author

beeelze commented Feb 26, 2016

Has there been any updates on this one?

@beeelze
Copy link
Author

beeelze commented Apr 21, 2016

It has been quite some time since I've seen replies on my issue. It would be nice if someone would look at the debug output I posted and tell me what the problem could be. So here's another bump :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants