XBeeInternetGateway / XIG

XBee Internet Gateway for the Digi ConnectPort and Digi XBee
11 stars 12 forks source link

Gateway crash #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 3 devices are using XIG / HTTP
2. Changed config file, 1 setting:   global_max_buf_size = 512
3. Communications have been fine, but occasionally 1 of the 3 devices will 
eventually stop being able to communicate (device does show up on the network 
via the X4 interface)
4. This is the first crash - I have been restarting XIG to get the 3rd device 
working.  It usually works for about 18 hours before stopping.

What is the expected output? What do you see instead?

Traceback (most recent call last):
  File "xig.py", line 237, in main
    ret = xig.go()
  File "xig.py", line 202, in go
    self.__io_kernel.ioLoop(timeout=None)
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/library/xig_io_kernel.py", line 284, in ioLoop
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 165, in handleSessionCommand
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 74, in __init__
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 129, in __connect
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 869, in getresponse
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 336, in begin
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 294, in _read_status
  File "./socket.py", line 325, in readline
error: (116, 'Connection timed out')

What version of the product are you using?
v1.4.1 of XIG on a ConnectPort X4

Please provide any additional information below.

Unsure of the 3rd device issue is related to the crash...

Original issue reported on code.google.com by rhaist...@gmail.com on 10 Feb 2012 at 1:08

GoogleCodeExporter commented 9 years ago
Thank you for reporting the issue.  It looks like the HTTP server you are 
communicating to, or the connection to your HTTP server, is timing out 
mid-response.  Neither Python's httplib or the XIG code have been "robustified" 
against these cases.

Was this a one time occurrence or are you able to reproduce this fairly easily?

Original comment by Jordan.H...@gmail.com on 13 Feb 2012 at 7:57

GoogleCodeExporter commented 9 years ago
This has only happened a single time.  I'm currently testing the system with 3 
devices transmitting about 250 bytes every 2 seconds to our servers through XIG.

Original comment by rhaist...@gmail.com on 13 Feb 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Thank you for reporting the issue! We likely wouldn't have caught this one if 
you hadn't reported it.

Would you mind testing this beta for us?  It catches the exception, closes the 
socket, and reports the error to the XBee rather than crashing the XIG.  Which, 
I believe, is a preferable behavior :)

Original comment by Jordan.H...@gmail.com on 14 Feb 2012 at 11:25

Attachments:

GoogleCodeExporter commented 9 years ago
Sure, uploading it to our test site right now.

This is mark @ clear blue, btw. :)

Original comment by rhaist...@gmail.com on 14 Feb 2012 at 1:37

GoogleCodeExporter commented 9 years ago
it immediately crashes on my X2.  

XBee Internet Gateway (XIG) v1.4.2b1 starting.
Unzipping and loading modules...
Traceback (most recent call last):
  File "<string>", line 35, in ?
zipimport.ZipImportError: can't find module 'library'

Will try my X4...

Original comment by rhaist...@gmail.com on 14 Feb 2012 at 1:45

GoogleCodeExporter commented 9 years ago
Same error on the X4

Original comment by rhaist...@gmail.com on 14 Feb 2012 at 1:56

GoogleCodeExporter commented 9 years ago
Haven't been able to get this version to run due to the missing 'library' file, 
and have had another crash since my last report.  Any idea when there will be a 
version for me to try that works ?

Original comment by rhaist...@gmail.com on 22 Feb 2012 at 8:52

GoogleCodeExporter commented 9 years ago
Here is a second beta to try.

Original comment by Jordan.H...@gmail.com on 1 Mar 2012 at 11:52

Attachments:

GoogleCodeExporter commented 9 years ago
1.4.2b2 crashed - 3 Xbee's transmitting:

Traceback (most recent call last):
  File "xig.py", line 237, in main
    ret = xig.go()
  File "xig.py", line 202, in go
    self.__io_kernel.ioLoop(timeout=None)
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/library/xig_io_kernel.py", line 284, in ioLoop
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 170, in handleSessionCommand
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 74, in __init__
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/http.py", line 130, in __connect
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 869, in getresponse
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 336, in begin
  File "/Users/jordanh/eclipse_workspaces/esp/xig/src/sessions/library/digi_httplib.py", line 300, in _read_status
BadStatusLine

Original comment by rhaist...@gmail.com on 2 Mar 2012 at 7:14

GoogleCodeExporter commented 9 years ago
Please find attached a beta 3 which adds a global exception handler.  You may 
still see connection exceptions (for valid errors such as the BadStatusLine 
exception) but the XIG won't crash.

Original comment by Jordan.H...@gmail.com on 4 Mar 2012 at 12:48

Attachments:

GoogleCodeExporter commented 9 years ago
It looks like this failure has been resolved. I'm going to release xig-1.4.2. 
Thanks for testing!

Original comment by Jordan.H...@gmail.com on 6 Mar 2012 at 2:43