liftoff / GateOne

Gate One is an HTML5-powered terminal emulator and SSH client
http://liftoffsoftware.com/Products/GateOne
Other
6.28k stars 924 forks source link

socket.error: [Errno 97] Address family not supported by protocol #242

Closed supermamie closed 11 years ago

supermamie commented 11 years ago

I just installed Gate One on my raspberry pi on debian (uname -a = Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux) My FAI enable IPV6 (seems that this error can be linked to that)

When I try to start gate on (./gateon.py) I get this error :

Traceback (most recent call last): File "./gateone.py", line 3480, in main() File "./gateone.py", line 3429, in main https_server.listen(port=go_settings['port'], address=addr) File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 113, in listen sockets = bind_sockets(port, address=address) File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 85, in bind_sockets sock.bind(sockaddr) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 99] Cannot assign requested address

liftoff commented 11 years ago

Can you paste your server.conf (or 10server.conf)?

supermamie commented 11 years ago

Here it is. I only changed the address and port part. (and I'll change the origins later when I'll have created some users to be authorized to use it)

I have installed the server from the git sources, using the provided installation script.

// This is Gate One's main settings file.
{
    // "gateone" server-wide settings fall under "*"
    "*": {
        "gateone": { // These settings apply to all of Gate One
            "address": "mamieserv.fr",
            "ca_certs": null,
            "cache_dir": "/tmp/gateone_cache",
            "certificate": "certificate.pem",
            "combine_css": "",
            "combine_css_container": "#gateone",
            "combine_js": "",
            "cookie_secret": "YmI2ODVjODBiNDJhNGMyM2FjNGZhNGViYTA3ZWMxYjg0M",
            "debug": false,
            "disable_ssl": false,
            "embedded": false,
            "enable_unix_socket": false,
            "gid": "0",
            "https_redirect": false,
            "js_init": "",
            "keyfile": "keyfile.pem",
            "locale": "en_GB",
            "log_file_max_size": 100000000,
            "log_file_num_backups": 10,
            "log_file_prefix": "/opt/gateone/logs/webserver.log",
            "log_to_stderr": null,
            "logging": "info",
            "origins": ["localhost", "127.0.0.1", "raspberrypi", "127.0.1.1"],
            "pid_file": "/tmp/gateone.pid",
            "port": 2222,
            "session_dir": "/tmp/gateone",
            "session_timeout": "5d",
            "ssl_auth": "none",
            "syslog_facility": "daemon",
            "syslog_host": null,
            "uid": "0",
            "unix_socket_path": "/tmp/gateone.sock",
            "url_prefix": "/",
            "user_dir": "/opt/gateone/users",
            "user_logs_max_age": "30d"
        }
    }
}
liftoff commented 11 years ago

It might have something to do with how your hostname is configured. Can you paste the output of this command?

grep mamieserv.fr /etc/hosts

...and also paste the output of:

ifconfig

I specifically want to see what address types are assigned and whatnot. If this is a raspberry pi device it may have something to do with usbnet being used for the interface and how it is enumerated by some underlying lib. Getting the ifconfig output will be helpful in figuring out if that's the problem.

supermamie commented 11 years ago

Thanks to your comment, I noticed that my hostname was not configured in /etc/hosts I added it and now the server starts :-) (now I have problem, I can't access it from my computer, but as "telnet 2222" is refused, I think it is a problem outside of gateOne, or a misconfiguration, not a bug :)

Thanks for your help (and sorry for being so long to answer, my personal computer is out of order and I wasn't able to access ssh via my corking computer, so I cofigure my server thru a GateOne instance on a friend's server ^^ )

liftoff commented 11 years ago

No worries. Please continue to open issues if you encounter them!

cemir commented 11 years ago

Hi,

I have the same issue, I tried various things including removing ipv6 support. I'm also on a raspberr pi

here are hosts and ipconfig

root@radio-pi:/opt/gateone# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 radio-pi root@radio-pi:/opt/gateone# ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:78:a4:78 inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:382 errors:0 dropped:0 overruns:0 frame:0 TX packets:346 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:49094 (47.9 KiB) TX bytes:39641 (38.7 KiB)

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:63 errors:0 dropped:0 overruns:0 frame:0 TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:10333 (10.0 KiB) TX bytes:10333 (10.0 KiB)

supermamie commented 11 years ago

My problem was due to the fact that my domain name was not in my /etc/hosts file

It seems you have the same problem (can you post your server.conf to check ?)

liftoff commented 11 years ago

If the problem is the domain name in /etc/hosts then it probably isn't Gate One's fault... Probably a quirk of the python interpreter on your platform. I have some embedded devices I can test with... What distro are you running on your Pi?

cemir commented 11 years ago

hin the only server.conf found is settings/10server.conf

// This is Gate One's main settings file. { // "gateone" server-wide settings fall under "" "": { "gateone": { // These settings apply to all of Gate One "address": "", "ca_certs": null, "cache_dir": "/tmp/gateone_cache", "certificate": "certificate.pem", "combine_css": "", "combine_css_container": "#gateone", "combine_js": "", "cookie_secret": "OWRiYmQ3Y2IxMWYxNDgzNzhlZDJjNDQ4ZGEzNDUwZmIxN", "debug": false, "disable_ssl": false, "embedded": false, "enable_unix_socket": false, "gid": "0", "https_redirect": false, "js_init": "", "keyfile": "keyfile.pem", "locale": "en_GB", "log_file_max_size": 100000000, "log_file_num_backups": 10, "log_file_prefix": "/opt/gateone/logs/webserver.log", "log_to_stderr": null, "logging": "info", "origins": ["localhost", "127.0.0.1", "radio-pi"], "pid_file": "/tmp/gateone.pid", "port": 443, "session_dir": "/tmp/gateone", "session_timeout": "5d", "syslog_facility": "daemon", "syslog_host": null, "uid": "0", "unix_socket_path": "/tmp/gateone.sock", "url_prefix": "/", "user_dir": "/opt/gateone/users", "user_logs_max_age": "30d" } } }

I use rasbian on raspberry, it's the last one

regards

liftoff commented 11 years ago

Have you tried adding something like this to your /etc/hosts file?

192.168.0.7 rasbian # <--or use some other suitable name
cemir commented 11 years ago

Yes, same error

but i realised my error is not exatly the same :+1: Traceback (most recent call last): File "./gateone.py", line 3493, in main() File "./gateone.py", line 3456, in main https_server.listen(port=go_settings['port'], address="") File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 113, in listen sockets = bind_sockets(port, address=address) File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 69, in bind_sockets sock = socket.socket(af, socktype, proto) File "/usr/lib/python2.7/socket.py", line 187, in init _sock = _realsocket(family, type, proto) socket.error: [Errno 97] Address family not supported by protocol

snehaldpatel1992 commented 9 years ago

I am starting Air Notifier service on Ubuntu server and I am getting error like this...

socket.error: [Errno 97] Address family not supported by protocol [I 150525 13:27:02 airnotifier:167] Starting AirNotifier server Traceback (most recent call last): File "airnotifier.py", line 253, in AirNotifierApp(services=services).main() File "airnotifier.py", line 169, in main http_server.listen(options.port) File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 113, in listen sockets = bind_sockets(port, address=address) File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 69, in bind_sockets sock = socket.socket(af, socktype, proto) File "/usr/lib/python2.7/socket.py", line 187, in init _sock = _realsocket(family, type, proto)