OpenSprinkler › Forums › OpenSprinkler Unified Firmware › ipv6 for OSPi appears to be required
Tagged: ipv6
- This topic has 7 replies, 1 voice, and was last updated 4 years, 1 month ago by Wolf.
-
AuthorPosts
-
July 25, 2018 at 9:40 pm #51392
tomnykdsParticipantTo add to the threads about ipv6 requirements, I just set up a new RPi with latest raspbian, installed OpenSprinkler and was able to bring it up and fiddle around. I spent some more time cleaning up the RPi install, setting IP address, disabling ipv6, etc. because I “know” I don’t need it, and a few other things. Low and behold, I can’t start OS anymore, it fails with:
pi@pi2b:~/OpenSprinklerGen2 $ sudo ./OpenSprinkler
/home/pi/OpenSprinklerGen2/
can’t create shell listen socket
network failed.
I found this in etherport.cpp (same message):
if ((m_sock = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
DEBUG_PRINTLN(“can’t create shell listen socket”);
return false;
Once I re-enabled ipv6 in /boot/cmdline.txt and rebooted, then OS would start and I could talk to it over the web.
What’s truely odd, is that netstat reports the process listening on tcp6 with an ipv4 address (more not listed):
pi@pi2b:~/OpenSprinklerGen2 $ netstat -an |& grep 8080
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 192.168.0.69:8080 192.168.0.183:49292 TIME_WAIT
tcp6 0 0 192.168.0.69:8080 192.168.0.183:49289 TIME_WAITIn any case, at least on an RPi, ipv6 is “required” to get the software to run, whether or not
it’s actually being used properly.Chris
July 27, 2018 at 7:17 pm #51456
RayKeymasterThe firmware has dual support for ipv4 and ipv6. There is no need to disable ipv6. You can still use ipv4 since it has dual support.
July 27, 2018 at 8:42 pm #51458
tomnykdsParticipantThe issue appears to be that you can’t disable ipv6, even if you don’t need it, because
of how the one piece of code is written. The web interface messes up the formatting, but
the error message matches the code block in the original note, and it only occurs here:pi@pi2b:~/OpenSprinklerGen2 $ grep -B3 -A1 -n ‘create shell listen socket’ *
etherport.cpp-57-
etherport.cpp-58- if ((m_sock = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
etherport.cpp-59- {
etherport.cpp:60: DEBUG_PRINTLN(“can’t create shell listen socket”);
etherport.cpp-61- return false;Chris
July 28, 2018 at 12:51 pm #51468
RayKeymasterIs there any particular reason you want to disable IPv6 in your Linux system?
July 28, 2018 at 2:25 pm #51473
tomnykdsParticipantOther than I have no real ipv6 traffic, it’s just to avoid loading something that doesn’t get used.
At least in terms of the documentation, a mention of the requirement would be nice.
There are a couple related threads from earlier. Anyhow, I’ll let this go for now as the
software works with ipv6 enabled.
Thx, ChrisJuly 29, 2018 at 8:08 pm #51486
dman776Participant[upgraded Raspbian]
July 31, 2018 at 11:25 am #51514
RayKeymasterIn the next version we will probably add some additional code so that if it can’t bind ipv6 it will go back to ipv4 only. Initially the ipv6 feature was added due to a pull request:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/pull/49
and those who had trouble with it are generally due to using a very old version of Raspbian that doesn’t support ipv6. The solution is to either upgrade Raspbian or roll back to an earlier version of firmware. Upgrading Raspbian is a better solution since the future firmwares may rely on other features that are not available in older Raspbians.November 28, 2020 at 11:58 pm #68773
WolfParticipantThis bit me too.
In my environment, I’ve forcefully removed ipv6. (necessary for reasons, vpn + mtu problems, DNS woes, long story.)
if ip6 is disabled, Opensprinkler (latest) will RUN, but won’t bind to a port. This was NOT obvious, as there’s no log emissions about problems.
I’d really like to encourage the team to allow ospi to behave as expected if ip6 is not enabled/present, rather than silently failing to function.
… Don’t get me wrong. I’m *VERY* thankful for OsPi’s existence. It’s really cool. AND, this is a bug, not a feature 🙂
Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › ipv6 for OSPi appears to be required