Announcement

Collapse
No announcement yet.

http stability

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • http stability

    The HTTP service stops responding with the cgi.c sample on MatchPort A/G Pro after about 24 hours.

    I've reproduced this three times.

    I followed the instructions to build and burn the cgi.c sample program on the MatchPort A/G Pro. I made no modifications to any code, however I did change the http server to listen at port 8080 (through XCR over the web). The program works as specified except that after about 1 day I cannot connect to the mpro over http. I'm not doing anything to the device during the 24 hours. I haven't been poking at it except late at night when I find it's in the weeds.

    show task state:
    PID Queue Thread Name
    12 SEMA Http1
    -> Semaphore: HTTP Ring Trigger (http.c 417)
    13 SEMA Http2
    -> Semaphore: HTTP Ring Trigger (http.c 417)
    14 SEMA Http3
    -> Semaphore: HTTP Ring Trigger (http.c 417)
    15 SEMA Http0
    -> Semaphore: Control Connection Signal (socket.c 723)
    If I use telnet 192.168.1.125 8080 to connect and attempt to type in an http get resource request it terminates the connection immediately after receiving the first character, 'G'. Also while connected over telnet ... 8080 I see this:
    show ip sockets
    Protocol RxQ TxQ Local Address:Port Remote Address:Port State
    UDP 0 0 192.168.001.125:161 255.255.255.255:0
    TCP 0 0 192.168.001.125:21 255.255.255.255:0 LISTEN
    UDP 0 0 192.168.001.125:69 255.255.255.255:0
    UDP 0 0 192.168.001.125:514 192.168.001.007:514 ESTABLISHED
    TCP 0 0 192.168.001.125:8080 255.255.255.255:0 LISTEN
    UDP 0 0 192.168.001.125:30718 255.255.255.255:0
    TCP 0 0 192.168.001.125:23 255.255.255.255:0 LISTEN
    TCP 0 0 192.168.001.125:22 255.255.255.255:0 LISTEN
    TCP 0 0 192.168.001.125:10001 255.255.255.255:0 LISTEN
    TCP 0 0 192.168.001.125:10002 255.255.255.255:0 LISTEN
    TCP 0 4 192.168.001.125:23 192.168.001.104:2000 ESTABLISHED
    shouldn't that be 'ESTABLISHED' ?

    I redirected all syslog to a remote linux server. Here's what was sent for the duration:
    Jan 24 00:12:17 ltrx lantronix nip/dynip.c: static IP: 192.168.1.125
    Jan 24 00:12:18 ltrx lantronix mon/start.c: ppp init
    Jan 24 00:12:18 ltrx lantronix mon/start.c: lpd Init
    Jan 24 00:12:18 ltrx lantronix mon/start.c: power management init
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim2 (unused)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim3 (unused)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling i2c (unused)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling iack (unused)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling uart2 (unused)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: power management peripheral audit begin
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim1 (no rs485)
    Jan 24 00:12:18 ltrx lantronix /pwr_mgmt.c: power management peripheral audit complete
    Jan 24 00:12:18 ltrx lantronix mon/start.c: calling SDK app
    Jan 24 00:12:18 ltrx lantronix ../cgi.c: Registering HTTP callback for sample.
    Jan 24 00:12:18 ltrx lantronix mon/start.c: rtos main task finished
    Jan 24 00:12:32 ltrx lantronix nip/dynip.c: static IP: 192.168.1.125
    Jan 24 00:12:32 ltrx lantronix mon/start.c: ppp init
    Jan 24 00:12:32 ltrx lantronix mon/start.c: lpd Init
    Jan 24 00:12:32 ltrx lantronix mon/start.c: power management init
    Jan 24 00:12:32 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim2 (unused)
    Jan 24 00:12:32 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim3 (unused)
    Jan 24 00:12:32 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling i2c (unused)
    Jan 24 00:12:32 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling iack (unused)
    Jan 24 00:12:32 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling uart2 (unused)
    Jan 24 00:12:33 ltrx lantronix /pwr_mgmt.c: power management peripheral audit begin
    Jan 24 00:12:33 ltrx lantronix /pwr_mgmt.c: pwr_mgmt: disabling dtim1 (no rs485)
    Jan 24 00:12:33 ltrx lantronix /pwr_mgmt.c: power management peripheral audit complete
    Jan 24 00:12:33 ltrx lantronix mon/start.c: calling SDK app
    Jan 24 00:12:33 ltrx lantronix ../cgi.c: Registering HTTP callback for sample.
    Jan 24 00:12:33 ltrx lantronix mon/start.c: rtos main task finished
    Jan 24 23:35:29 ltrx lantronix p/cli/cli.c: Telnet Session Started
    If I reset the ltrx device everything comes back as expected and http requests are honored.

    I haven't tried running the default .romz for 24 hours to see that the mgmt web interface survives a 24hour test. I will set that up tonight and report on it tomorrow.

    Is there any other debug you'd like to see?

    Thanks!

  • #2
    HTTP behavior

    Your syslog looks totally normal.

    Your IP sockets are also normal in the sense that it is listening on port 8080 for HTTP Requests. For the brief moment that an HTTP query takes place, you would see one or more additional sockets in the established state on port 8080.

    Your task states are normal idle for the three worker threads. However, the master thread Http0 appears to be hung on a semaphore (if it stays that way) and that is unusual. We will try to replicate the problem here. Are there any other tips you can give us about how you get it into this state?

    Comment

    Working...
    X