OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) can't create shell listen socket. network failed

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #48305

    Rudolph Terblanche
    Participant

    I update the software on my PI and did an OS update but getting the following error when
    trying to run OpenSprinkler. It builds without errors

    /usr/local/OpenSprinkler $ sudo ./OpenSprinkler
    /usr/local/OpenSprinkler/
    can’t create shell listen socket
    network failed.

    Anybody have an idea how I can fix this. Next solution is totally rebuilding the SD card.
    Rudolph

    #48416

    Ray
    Keymaster

    Is this using the pre-configured SD card image? If so, that image doesn’t work with the latest firmware anymore, you should install the latest Raspbian fresh, and then install the OpenSprinkler firmware.

    #48435

    stroale
    Participant

    Hi!

    I Just had the same problem and fixed it.

    Yesterday I made a fresh install on rasbian image – usual install of opensprinkler, all updates, all worked fine.

    Today I was disabling IPv6 on startup command.txt and sysctl. after reboot opensprinkler was giving me that error message.
    Now i did enable ipv6 again and now it is loading again.
    Funny thing I didn’t recon it is running only on ipv6 localhost. I am not sure but i belive i saw the process yesterday on ipv4:8080 too. Some commented there may be an issue on netstat. Personally I think there is a glitch when IPv6 is not available.

    netstat -l -n -p
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      497/sshd
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      607/nginx: master p
    tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      528/vncserver-x11-c
    tcp6       0      0 :::22                   :::*                    LISTEN      497/sshd
    tcp6       0      0 :::5900                 :::*                    LISTEN      528/vncserver-x11-c
    tcp6       0      0 :::8080                 :::*                    LISTEN      1350/OpenSprinkler
    

    PS: Running nginx as a simple reverse proxy to get SSL.

    So just check if ipv6 is enabled.
    (I used the instructinos on https://www.raspberrypi.org/forums/viewtopic.php?t=138899 to disable and reenable it).

    #50531

    Robert
    Participant

    I just ran into this when upgrading. Any suggestions on how to get OpenSprinkler binding to ipv4 instead of ipv6?

    #50532

    Robert
    Participant

    Strike that. It is a netstat and a OpenSprinkler glitch from what I can tell –

    OpenSprinkler glitch because it requires IPv6 to work
    netstat because it reports OpenSprinkler is only binding to IPv6 when it fact it is binding to IPv4 and IPv6 both.

    I’ve got this running on the old firmware now (didn’t feel like going to the barn to reflash it) – I just had to load the “ipv6” kernel module and I was good to go (other than netstat telling lies about what’s going on). I’ll probably get around to updating the image sometime…

    #50569

    Ray
    Keymaster

    “OpenSprinkler glitch because it requires IPv6 to work” — the current firmware binds both IPv4 and IPv6. I can definitely access it with IPv4. You need to have a fairly recent Raspbian because the compilation requires IPv6, but when you run it, it provides both interfaces.

    #51497

    bobm
    Participant

    Old thread but I just finally moved from the Python version to the C++ version.

    I didn’t really want to go through the effort to reinstall an new Raspbian so I just changed the etherport.cpp file to use IPv4 and that seems to be working just fine.

    I searched the rest of the code and there isn’t really anywhere where v6 is needed and I feel better not using ipv6 at this time.

    Note that I don’t allow my opensprinkler to access the internet (I did to get the position setup but it’s locked down again). I don’t know if that matters to others.

    I will do a PR back to the repo once I figure out what’s up with logging and the nvm.dat file locations. (i.e. I run OpenSprinkler from /usr/local/bin, I would have thought that the nvm.dat would live in /etc/OpenSprinkler and the logs in /var/log but they don’t).

    #52302

    Darwinian
    Participant

    I just added “ipv6” to the end of /etc/modules , ran “modprobe ipv6” and then “/etc/init.d/OpenSprinkler.sh restart”
    I can connect once again. 🙂

    Oh, I had also done an “rpi-update” first.

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) can't create shell listen socket. network failed