HTTP Server binded on http://localhost:8000 --- ERROR - [Errno 19] No such device

1,731 views
Skip to first unread message

Dominik

unread,
Apr 19, 2013, 11:00:53 AM4/19/13
to web...@googlegroups.com
Hello Eric,

i got a new problem, were i don't know how to find the reason why.

If i start webiopi automatically by booting i get this error in the log file:

2013-04-19 16:50:57 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-04-19 16:50:57 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-04-19 16:50:57 - WebIOPi - INFO - Loading configuration from /etc/webiopi/config
2013-04-19 16:50:57 - WebIOPi - INFO - Loading myscript from /home/pi/webiopi/examples/scripts/macros/script.py
2013-04-19 16:50:57 - WebIOPi - DEBUG - Script with macros - Setup
2013-04-19 16:50:57 - WebIOPi - INFO - Access protected using /etc/webiopi/passwd
2013-04-19 16:50:57 - WebIOPi - INFO - HTTP Server binded on http://localhost:8000/
2013-04-19 16:50:57 - WebIOPi - INFO - CoAP Server binded on coap://localhost:5683/
2013-04-19 16:50:57 - WebIOPi - ERROR - [Errno 19] No such device
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 73, in <module>
    main(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 67, in main
    server = Server(port=port, configfile=configfile)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/server.py", line 153, in __init__
    self.coap_server.enableMulticast()
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/protocols/coap.py", line 469, in enableMulticast
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 19] No such device
2013-04-19 16:50:57 - WebIOPi - INFO - Stopping...
2013-04-19 16:50:57 - WebIOPi - DEBUG - Script with macros - Destroy


Sometimes (for example starting with sudo /etc/init.d/webiopi start) it works and then the logfile looks like that:
2013-04-19 16:50:17 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-04-19 16:50:17 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-04-19 16:50:17 - WebIOPi - INFO - Loading configuration from /etc/webiopi/config
2013-04-19 16:50:17 - WebIOPi - INFO - Loading myscript from /home/pi/webiopi/examples/scripts/macros/script.py
2013-04-19 16:50:17 - WebIOPi - DEBUG - Script with macros - Setup
2013-04-19 16:50:17 - WebIOPi - INFO - Access protected using /etc/webiopi/passwd
2013-04-19 16:50:17 - WebIOPi - INFO - HTTP Server binded on http://192.168.178.41:8000/
2013-04-19 16:50:17 - WebIOPi - INFO - CoAP Server binded on coap://224.0.1.123:5683/ (MULTICAST)
2013-04-19 16:50:17 - WebIOPi - INFO - CoAP Server binded on coap://192.168.178.41:5683/
2013-04-19 16:50:18 - HTTP - DEBUG - "GET / HTTP/1.1" 200 -
2013-04-19 16:50:18 - HTTP - DEBUG - "GET /webiopi.js HTTP/1.1" 200 -
2013-04-19 16:50:18 - HTTP - DEBUG - "GET /webiopi.css HTTP/1.1" 200 -
2013-04-19 16:50:18 - HTTP - DEBUG - "GET /jquery.js HTTP/1.1" 200 -
2013-04-19 16:50:18 - HTTP - DEBUG - "GET /map HTTP/1.1" 200 -
2013-04-19 16:50:18 - HTTP - DEBUG - "GET /version HTTP/1.1" 200 -
2013-04-19 16:50:22 - HTTP - DEBUG - "POST /macros/switch_a_on/ HTTP/1.1" 200 -
2013-04-19 16:50:36 - WebIOPi - INFO - Stopping...
2013-04-19 16:50:36 - WebIOPi - DEBUG - Script with macros - Destroy
2013-04-19 16:50:36 - WebIOPi - INFO - CoAP Server stopped
2013-04-19 16:50:37 - WebIOPi - INFO - HTTP Server stopped


The differece is, that if it not works, HTTP Server binded on http://localhost:8000/, if it works fine, HTTP Server binded on http://192.168.178.41:8000/.

Do you have any Idea? Is it maybe a timing problem doring boot process and getting IP-Adress?

Thanks in advance
Dominik




trouch

unread,
Apr 19, 2013, 12:47:20 PM4/19/13
to web...@googlegroups.com
Disable coap multicast in config file.
It look like your network interface (wifi dongle I guess) has some trouble with multicast binding.

Eric / trouch.



Dominik




--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

trouch

unread,
Apr 19, 2013, 12:48:27 PM4/19/13
to web...@googlegroups.com
IP displayed is just a hint to access the Pi.
WebIOPi always try to bind to all IP availables.

Dominik

unread,
Apr 23, 2013, 1:51:48 PM4/23/13
to web...@googlegroups.com
Hello Eric,

thanks agin for your excelent advice. Now, all my Pis run with WebIOPi without a problem.

Thanks so much!!!!!
Dominik
Message has been deleted
Message has been deleted

King Pietr

unread,
May 5, 2013, 5:35:39 AM5/5/13
to web...@googlegroups.com
The long story:

	starting with:
	unmodified /etc/webiopi/config
	the ip-address from DHCP ( ...100 - ...149 ) on a cabled network
	it works fine ( great tool !!)
	and stops with ctrl-c

login as: pi
p...@192.168.1.103's password:
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat May  4 17:23:43 2013

[info] Mijn pi-aliassen zijn gedefineerd
pi@raspberrypi ~ $ sudo python -m webiopi
2013-05-04 17:25:31 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-05-04 17:25:31 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-05-04 17:25:31 - WebIOPi - WARNING - Access unprotected
2013-05-04 17:25:31 - WebIOPi - INFO - HTTP Server binded on http://192.168.1.103:8000/
2013-05-04 17:25:31 - WebIOPi - INFO - CoAP Server binded on coap://224.0.1.123:5683/ (MULTICAST)
2013-05-04 17:25:31 - WebIOPi - INFO - CoAP Server binded on coap://192.168.1.103:5683/
^C2013-05-04 17:25:56 - WebIOPi - INFO - Stopping...
2013-05-04 17:25:57 - WebIOPi - INFO - HTTP Server stopped
2013-05-04 17:25:57 - WebIOPi - INFO - CoAP Server stopped


	use script to go to 192.168.1.11 ( add ip=192.168.1.11 in /boot/cmdline.txt )
	and reboot



pi@raspberrypi ~ $ bash ipwissel.sh

Huidig IP Adres : 192.168.1.103

Selectie IP Addres toekenning :

Automatisch IP Address
Vast IP Addres op 192.168.1.11
Blauw IP Addres op 192.168.30.11
Grijs IP Addres op 192.168.30.10
maak uw keuze (a/v/b/g/-)?
v
gezet op 192.168.1.11

kaar om herop te starten ?






login as: pi
p...@192.168.1.11's password:
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat May  4 17:25:16 2013 from 192.168.1.101

[info] Mijn pi-aliassen zijn gedefineerd
pi@raspberrypi ~ $ sudo python -m webiopi
2013-05-04 17:28:37 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-05-04 17:28:37 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-05-04 17:28:37 - WebIOPi - WARNING - Access unprotected
2013-05-04 17:28:37 - WebIOPi - INFO - HTTP Server binded on http://localhost:8000/
2013-05-04 17:28:37 - WebIOPi - ERROR - [Errno 19] No such device
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 73, in <module>
    main(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 67, in main
    server = Server(port=port, configfile=configfile)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/server.py", line 153, in __init__
    self.coap_server.enableMulticast()
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/protocols/coap.py", line 469, in enableMulticast
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 19] No such device
2013-05-04 17:28:37 - WebIOPi - INFO - CoAP Server binded on coap://localhost:5683/
^C^Z
[1]+  Gepauzeerd              sudo python -m webiopi
pi@raspberrypi ~ $ sudo kill 1
pi@raspberrypi ~ $ 
pi@raspberrypi ~ $ sudo nano /etc/webiopi/config
pi@raspberrypi ~ $ stop
Broadcast message from root@raspberrypi (pts/0) (Sat May  4 17:37:11 2013):
The system is going down for system halt NOW!
pi@raspberrypi ~ $



	as you can see I get an errorlist
	but the website is working !!!
	to stop, ctrl-c is not working
	use ctrl-z and kill
	/etc/webiopi/config was:

[COAP]
# CoAP Server configuration
enabled = true
port = 5683
# Enable CoAP multicast
multicast = true

	/etc/webiopi/config modif.:


[COAP]
# CoAP Server configuration
enabled = false
port = 5683
# Enable CoAP multicast
multicast = false


	reboot else re-use-error


login as: pi
p...@192.168.1.11's password:
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat May  4 17:28:19 2013 from 192.168.1.101

[info] Mijn pi-aliassen zijn gedefineerd
pi@raspberrypi ~ $ sudo python -m webiopi
2013-05-04 17:38:17 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-05-04 17:38:17 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-05-04 17:38:17 - WebIOPi - WARNING - Access unprotected
2013-05-04 17:38:17 - WebIOPi - INFO - HTTP Server binded on http://localhost:8000/
2013-05-04 17:38:17 - WebIOPi - ERROR - [Errno 19] No such device
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 73, in <module>
    main(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/__main__.py", line 67, in main
    server = Server(port=port, configfile=configfile)
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/server.py", line 153, in __init__
    self.coap_server.enableMulticast()
  File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.6.0-py2.7-linux-armv6l.egg/webiopi/protocols/coap.py", line 469, in enableMulticast
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 19] No such device
2013-05-04 17:38:17 - WebIOPi - INFO - CoAP Server binded on coap://localhost:5683/
^C^Z
[1]+  Gepauzeerd              sudo python -m webiopi
pi@raspberrypi ~ $ sudo kill 1
pi@raspberrypi ~ $ bash ipwissel.sh

Huidig IP Adres : 192.168.1.11

Selectie IP Addres toekenning :

Automatisch IP Address
Vast IP Addres op 192.168.1.11
Blauw IP Addres op 192.168.30.11
Grijs IP Addres op 192.168.30.10
maak uw keuze (a/v/b/g/-)?
a
gezet op DHCP

kaar om herop te starten ?
y
Herstart

Broadcast message from root@raspberrypi (pts/0) (Sat May  4 17:40:00 2013):
The system is going down for reboot NOW!
pi@raspberrypi ~ $



	as you can see it is the same problem
	now restart with ip from DHCP


login as: pi
p...@192.168.1.103's password:
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat May  4 17:41:33 2013

[info] Mijn pi-aliassen zijn gedefineerd
pi@raspberrypi ~ $ sudo python -m webiopi
2013-05-04 17:45:02 - WebIOPi - INFO - Starting WebIOPi/0.6.0/Python2.7
2013-05-04 17:45:02 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2013-05-04 17:45:02 - WebIOPi - WARNING - Access unprotected
2013-05-04 17:45:02 - WebIOPi - INFO - HTTP Server binded on http://192.168.1.103:8000/
2013-05-04 17:45:02 - WebIOPi - INFO - CoAP Server binded on coap://224.0.1.123:5683/ (MULTICAST)
2013-05-04 17:45:02 - WebIOPi - INFO - CoAP Server binded on coap://192.168.1.103:5683/
^C2013-05-04 17:46:36 - WebIOPi - INFO - Stopping...
2013-05-04 17:46:36 - WebIOPi - INFO - HTTP Server stopped
2013-05-04 17:46:36 - WebIOPi - INFO - CoAP Server stopped
pi@raspberrypi ~ $


	now its running without error
	but I cant't see influance of the modif. CoAP settings in config !

I hope Eric, you can clear-up some things for us ?

Thank you in advance.

Marnix

Alex Luchiian

unread,
Feb 17, 2014, 2:40:00 PM2/17/14
to web...@googlegroups.com
Hello, i want some help is you are kind people.I made that with 2 buttons (light and send).How i can add 2 more buttons for controling an RGB LED?
THX in advance Alex

Alex Luchiian

unread,
Feb 17, 2014, 2:40:54 PM2/17/14
to web...@googlegroups.com
WebIOPi
Reply all
Reply to author
Forward
0 new messages