OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Error when accessing OSPi’s web interface

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #22798

    DaveAZ
    Member

    I’ve just gotten my OSPi board, with a RPi Model B, and the software up and running in the last few days. When I start up the OS interval program via a SSH terminal window and then bring the web interface up in a browser window (Chrome version 33.0.1750.149 under Mac OS X 10.9.2).

    It all works fine to begin with, I have manually run the sprinklers and checked out other parts of the interface.

    The problem occurs when I let it run overnight. Twice now, when I refresh web page in the morning I get this error text in the browser window:

    Traceback (most recent call last):
    File “/home/pi/OSPi/web/wsgiserver/__init__.py”, line 1245, in communicate
    req.respond()
    File “/home/pi/OSPi/web/wsgiserver/__init__.py”, line 775, in respond
    self.server.gateway(self).respond()
    File “/home/pi/OSPi/web/wsgiserver/__init__.py”, line 2018, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
    File “/home/pi/OSPi/web/httpserver.py”, line 306, in __call__
    return self.app(environ, xstart_response)
    File “/home/pi/OSPi/web/httpserver.py”, line 274, in __call__
    return self.app(environ, start_response)
    File “/home/pi/OSPi/web/application.py”, line 290, in wsgi
    start_resp(status, headers)
    File “/home/pi/OSPi/web/httpserver.py”, line 303, in xstart_response
    self.log(status, environ)
    File “/home/pi/OSPi/web/httpserver.py”, line 319, in log
    print >> outfile, utils.safestr(msg)
    IOError: [Errno 5] Input/output error

    The OSPi process still seems to be running. I don’t have it set up to restart at boot time yet, I’m just running it manually with “sudo python ospi.py &”.

    I know the raspberry pi isn’t resetting due to a power glitch or something.

    Any idea what might be causing this?

    Thanks
    Dave

    #26202

    Dan in CA
    Participant

    Hi Dave,

    Can you still access the Pi via SSH when this problem shows up?
    The message indicates the built in server is having a problem but I’m not sure what’s causing it. When you say “refresh” the page, are you re-linking to it or just reloading the page?

    Dan

    #26203

    DaveAZ
    Member

    Hi Dan,

    Yes I can still access the RPi via SSH when it is in this state. Also, yes it fails the same way either when I do a refresh or I when I open a new browser window and access the same address (192.168.1.210:8080 in my case). I even tried a different browser (Safari) and I get the same error text.

    Dave

    #26204

    Dan in CA
    Participant

    Dave,

    Looking at the last couple of lines in the error message It seems that the server is trying to write to a log file and failing. As far as I know the server should not be logging anything.

    Did you use Ray’s pre-configured image file for the installation? The latest version of the program on GitHub includes a beta of a new UI but it is too early to use that for regular operation.

    If you installed the software from GitHub were you using the most recent rev of Raspbian as the operating system? something may have changed there.

    I would suggest setting it up for auto start at boot and see if that changes anything. It is interesting that the problem occurs overnight.

    I haven’t seen this before.

    Dan

    #26205

    DaveAZ
    Member

    Hi Dan,

    I installed the latest version of Raspian on the RPi and then installed OSPi from Github. I’m not using the new interface.

    I did just notice a difference when I start up OSPi via the SSH command window vs having it run at boot by way of adding lines to the /etc/rc.local file:

    When I disable it from starting at boot time and just it from the command line (via SSH and after a fresh reboot) with “sudo python ospi.py &” and then I check that it’s running via “ps aux | grep ospi”, there are two entries for ospi as follows:

    root 2528 0.5 0.3 4584 1484 pts/0 S 20:03 0:00 sudo python ospi.py
    root 2529 18.0 1.8 103828 8316 pts/0 Sl 20:03 0:01 python ospi.py
    pi 2542 0.0 0.1 3544 812 pts/0 S+ 20:03 0:00 grep –color=auto ospi

    Whereas, if I set it up to run at boot via the /etc/rc.local file, and run the same “ps … ” command, I get:

    root 2277 4.5 1.8 102320 8272 ? Sl 19:52 0:01 python ospi.py
    pi 2549 0.0 0.1 3548 868 pts/0 S+ 19:53 0:00 grep –color=auto ospi

    I’ll try letting it run overnight and see if starting it via rc.local fixes the problem.

    Thanks,

    Dave

    #26206

    DaveAZ
    Member

    Two other notes:

    I’m not using the beta version of the UI, just the standard version.

    Also, when I have let it run overnight and the web interface stops working with the error I mentioned above, I also see that the SSH connection has also dropped in the command window.

    Dave

    #26207

    Dan in CA
    Participant

    Dave,

    Since it is also dropping the SSH connection it sounds like the Pi is rebooting for some reason. Is there any large appliance on the same circuit e.g. heater, microwave?

    You could add a line to /etc/rc.local like:

    date >> /home/pi/boot.log

    This will create a log file in the pi home dir with a time and date of each boot.

    Dan

    #26208

    Dan in CA
    Participant

    Dave,

    Its been a while since I tried running ospi.py without auto start.
    I forgot that if you start the program using SSH and then log out of SSH, the program will die. I tried it and got the same error message you did when I tried to access the web interface.

    Dan

    #26209

    Sepp1945
    Member

    Hi Dan,

    I have a similar problem, I can access the sprinkler via RDP, but even after reboot the web interface give the error HTTP 500

    it used to work for the first few days then I had to reboot in the morning and now even the reboot does not clear it

    Many thanks

    Sepp

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Error when accessing OSPi’s web interface