OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler stops working

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #37556

    Wokkeltje
    Participant

    I have a new OSpi with the latest unified firmware installe 2 weeks ago. I checked for updates almost on a daily basis for OS and for RaspBerrian.
    Currently I experience an unresponsive OpenSprinkler.
    in the last week it stopped working a few times. I am able to connect to RasBerian and using top I can’t see the OpenSprinkler process anymore.
    A reboot solves the problem for a couple of days.
    It stops working during the day if no program or so is running.

    * Is this something other people are experiencing?
    * Are there things (logfiles or so) I can troubleshoot?

    please help since I go on holiday within 2 weeks and won’t be able to manually reboot the device.

    thanks

    #37577

    Samer
    Keymaster

    I know you said you are checking for updates but be sure you are downloading the latest github repo source code. In fact, I suggest doing a backup of your current configuration and just deleting and recloning the repository at https://github.com/OpenSprinkler/OpenSprinklerGen2.

    This should resolve the instability issues which were addressed in 2.1.4 (which version of the firmware do you see in the about page).

    #37591

    Wokkeltje
    Participant

    I see 2.1.4 and this was already the case when I 1st installed the application.
    However when I installed a couple of weeks ago, version 2.1.3 was out but for some reason the GIT clone gave me already 2.1.4

    I will reïnstall OS and check again.

    tnx for the help

    #37631

    Wokkeltje
    Participant

    Yesterday evening I formatted the SD card, loaded the latest Raspberian image and installed OS again.
    I configured a small program (die NOT import old config) To test and after 10 hours, OS stoppen werking. A reboot was needed.

    How can I continue To troubleshoot?

    I gave a rPI2 with a 16GB SD card. I installed Rasberin without using Noobs.

    #37755

    Ray
    Keymaster

    Could you not import old configuration, and just use a fresh installation to test? This way we can isolate problems of the firmware itself with problems that potentially occurred during import.

    #37771

    Wokkeltje
    Participant

    Currently the OS is running without issues for 5 days, I keep you informed if there should be problems again.

    #38110

    Wokkeltje
    Participant

    I have the problem again, the OSpi was working for 15 days without any issue when I did a reboot.
    Now it already stopped 2 times in the last 24 hours.

    please advise how I can troubleshoot

    #38111

    Samer
    Keymaster

    I think we need to clarify exactly what has stopped working because it is not clear right now.

    Is the network going down? Can you still SSH or ping to the OSPi?
    Do sprinkler programs stop running? Do scheduled programs not run?

    Thanks

    #38112

    Wokkeltje
    Participant

    SSH is working
    The App/Webpage is not working.

    When using top, I can’t see the OS process anymore, but I am not sure if it is not running or just not using any resources. This evening I will check if the process is still running or not (I am not at home for the moment)

    Can I start OS manually without restarting the Rpi?

    #38116

    Wokkeltje
    Participant

    There is no OpenSprinkler process running, SSH is fully working.

    The config is:
    {“programs”:{“nprogs”:2,”nboards”:1,”mnp”:13,”mnst”:4,”pnsize”:12,”pd”:[[3,127,0,[360,0,0,0],[1800,0,0,0,0,0,0,0],”Program 1″],[8,127,0,[360,0,0,0],[1800,0,0,0,0,0,0,0],”Program 2″]]},”stations”:{“masop”:[255],”ignore_rain”:[0],”masop2″:[0],”stn_dis”:[254],”rfstn”:[0],”stn_seq”:[255],”snames”:[“Valve 1″,”S02″,”S03″,”S04″,”S05″,”S06″,”S07″,”S08″],”maxlen”:16},”options”:{“fwv”:214,”tz”:56,”ntp”:1,”dhcp”:1,”ip1″:0,”ip2″:0,”ip3″:0,”ip4″:0,”gw1″:0,”gw2″:0,”gw3″:0,”gw4″:0,”hp0″:144,”hp1″:31,”hwv”:64,”ext”:0,”sdt”:0,”mas”:0,”mton”:0,”mtof”:0,”urs”:0,”rso”:1,”wl”:0,”den”:1,”ipas”:0,”devid”:0,”con”:110,”lit”:100,”dim”:15,”uwt”:1,”ntp1″:192,”ntp2″:168,”ntp3″:1,”ntp4″:100,”lg”:1,”mas2″:0,”mton2″:0,”mtof2″:0,”reset”:0,”dexp”:-1,”mexp”:5},”status”:[0,0,0,0,0,0,0,0],”settings”:{“devt”:1433265719,”nbrd”:1,”en”:1,”rd”:0,”rs”:0,”rdst”:0,”loc”:”Staden, Belgium”,”wtkey”:”410dbabb84ff1b75″,”sunrise”:337,”sunset”:1314,”eip”:2147483647,”lwc”:1433265622,”lswc”:1433265623,”sbits”:[0,0],”ps”:[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0]],”lrun”:[0,0,0,0]}}

    #38264

    Jerry
    Participant

    I’m seeing the exact same thing. The application crashes and has to be restarted. Debugging it I see: Received a SIGPIPE: Broken pipe in EthernetClient::write. I also use HomeSeer and the issue is much worse when the OpenSprinkler plugin is enabled although I also can get the same thing by just using the web interface for OpenSprinkler. Seems like the code may not be handling cases where the other side drops the connection for whatever reason or possibly it has difficulty handling multiple simultaneous requests???

    #38265

    Jerry
    Participant

    Samer,

    Ok, I found I could duplicate the problem by opening http://ospi:8080/jc?pw=xxxxxx in Chrome and then repeatedly clicking the reload button (xxxxxx is the MD5 hashed password). Usually within 10 to 20 seconds I would get the crash based on the unhandled SIGPIPE. This exception occurs when the remote computer closes it’s connection before the write. The code change below will allow the write to no longer generate the signal. See http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly for more.

    size_t EthernetClient::write(const uint8_t *buf, size_t size)
    {
    // Replace the write below:
    //return ::write ( m_sock, buf, size );
    // With this instead:
    return ::send ( m_sock, buf, size, MSG_NOSIGNAL );
    }

    #38267

    Samer
    Keymaster

    Jerry,

    Thank you for the debugging the issue and finding a resolution. I was able to recreate the problem by following the steps you mentioned. I went ahead and created a pull request with the proposed fix and can confirm it resolves the symptoms described. I will merge the pull request after a few more tests. I test/debug on OS X so I added a define for MSG_NOSIGNAL which isn’t available in OS X (however SO_NOSIGPIPE is).

    https://github.com/OpenSprinkler/OpenSprinklerGen2/pull/20

    Thanks!

    Update: I went ahead and merged this. So please update and let us know if the issue is resolved or if it persists.

    #38279

    Jerry
    Participant

    Thanks for your quick attention to this issue. The updates resolve my issue. I have to say, that was fast! I haven’t even received my new hardware yet and this was fixed. Although I have been running an OpenSprinklerPi for about a year I purchased new hardware with the purpose of developing my own software to run it. I had been running a different package than yours and hadn’t been totally happy. Then I found OpenSprinklerGen2. It addressed all the “shortcomings” that kept me from running the older version. I no longer feel the need to write my own 🙂 Nice work!

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler stops working