Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.15 crashes without error files, after update to 5.0.21 no data measurement #234

Closed
Ericktz opened this issue Apr 3, 2017 · 12 comments
Closed

Comments

@Ericktz
Copy link
Contributor

Ericktz commented Apr 3, 2017

well, I having this problem some days ago, specifically when I noticed that haven't record after April 2, at 14:55 (this was the last record), when i looking in .../apache2/error.log:


[Mon Apr 03 11:13:39.974396 2017] [ssl:warn] [pid 31741:tid 1995915264] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 03 11:13:39.975207 2017] [wsgi:warn] [pid 31741:tid 1995915264] mod_wsgi: Compiled for Python/2.7.8.
[Mon Apr 03 11:13:39.975262 2017] [wsgi:warn] [pid 31741:tid 1995915264] mod_wsgi: Runtime using Python/2.7.9.
[Mon Apr 03 11:13:39.980044 2017] [mpm_event:notice] [pid 31741:tid 1995915264] AH00489: Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Mon Apr 03 11:13:39.980211 2017] [core:notice] [pid 31741:tid 1995915264] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 03 11:13:53.275563 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:13:53,274 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:14:39.436906 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:14:39,434 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:14:53.275712 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:14:53,275 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:15:39.272320 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:15:39,271 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:15:53.204503 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:15:53,204 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:16:31.613511 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:16:31,612 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:16:53.204607 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:16:53,204 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:17:29.664581 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:17:29,664 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:17:35.866504 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:17:35,865 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:17:48.113610 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:17:48,112 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:17:50.608388 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:17:50,607 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:17:53.098659 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:17:53,098 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:18:52.275791 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:18:52,275 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:18:53.099319 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:18:53,098 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:19:51.907238 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:19:51,906 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:19:53.092142 2017] [wsgi:error] [pid 31745:tid 1963119664] 2017-04-03 11:19:53,091 URL for 'daemon_active' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:20:37.181015 2017] [wsgi:error] [pid 31745:tid 1929565232] 2017-04-03 11:20:37,180 URL for 'inject_mycodo_version' raised and error: Connection refused. Is the daemon running?
[Mon Apr 03 11:20:51.069507 2017] [mpm_event:notice] [pid 31741:tid 1995915264] AH00491: caught SIGTERM, shutting down

i follow the instructions in this site.
and next I proceed with an upgrade for 5.0.21 with error:

...
Requirement already up-to-date: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.1->bcrypt->-r /home/pi/Mycodo/install/requirements.txt (line 7))
Requirement already up-to-date: decorator in /usr/local/lib/python2.7/dist-packages (from ratelim->geocoder==1.21.0->-r /home/pi/Mycodo/install/requirements.txt (line 16))
Installing collected packages: argparse
  Found existing installation: argparse 1.2.1
    Not uninstalling argparse at /usr/lib/python2.7, outside environment /home/pi/Mycodo/env
Successfully installed argparse-1.4.0

#### Upgrading database with alembic
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

#### Removing statistics file
rm: cannot remove '/home/pi/Mycodo/databases/statistics.csv': No such file or directory

#### Enabling mycodo startup script
Removed symlink /etc/systemd/system/multi-user.target.wants/mycodo.service.
Removed symlink /etc/systemd/system/mycodo.service.
Created symlink from /etc/systemd/system/mycodo.service to /home/pi/Mycodo/install/mycodo.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mycodo.service to /home/pi/Mycodo/install/mycodo.service.

#### Compiling Translations
compiling catalog mycodo_flask/translations/ko/LC_MESSAGES/messages.po to mycodo_flask/translations/ko/LC_MESSAGES/messages.mo
compiling catalog mycodo_flask/translations/es/LC_MESSAGES/messages.po to mycodo_flask/translations/es/LC_MESSAGES/messages.mo
compiling catalog mycodo_flask/translations/fr/LC_MESSAGES/messages.po to mycodo_flask/translations/fr/LC_MESSAGES/messages.mo
#### Updating crontab entry
Removing crontab entry ...
Appending to crontab:
-----------------------------------------------
@reboot /usr/local/bin/pigpiod &-----------------------------------------------
To remove previously added crontab entry, run: /home/pi/Mycodo/install/crontab.sh mycodo --remove


#### Creating proper users, directories, and permissions
useradd: user 'mycodo' already exists
The user `mycodo' is already a member of `gpio'.
The user `mycodo' is already a member of `adm'.
The user `mycodo' is already a member of `video'.

#### Reloading systemctl, Mycodo daemon, and apache2
Restarting apache2 (via systemctl): apache2.service.
WARNING: combining -O with -r or -p will mean that all downloaded content
will be placed in the single file you specified.

converted 'http://127.0.0.1' (ANSI_X3.4-1968) -> 'http://127.0.0.1' (UTF-8)
converted 'http://127.0.0.1/' (ANSI_X3.4-1968) -> 'http://127.0.0.1/' (UTF-8)
--2017-04-03 11:13:41--  http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://127.0.0.1/login [following]
converted 'http://127.0.0.1/login' (ANSI_X3.4-1968) -> 'http://127.0.0.1/login' (UTF-8)
--2017-04-03 11:13:50--  http://127.0.0.1/login
Reusing existing connection to 127.0.0.1:80.
HTTP request sent, awaiting response... 200 OK
Length: 2345 (2.3K) [text/html]
Saving to: '/dev/null'

     0K ..                                                    100% 98.9M=0s

2017-04-03 11:13:51 (98.9 MB/s) - '/dev/null' saved [2345/2345]

Loading robots.txt; please ignore errors.
--2017-04-03 11:13:51--  http://127.0.0.1/robots.txt
Reusing existing connection to 127.0.0.1:80.
HTTP request sent, awaiting response... 200 OK
Length: 27 [text/plain]
Saving to: '/dev/null'

     0K                                                       100% 1.72M=0s

2017-04-03 11:13:51 (1.72 MB/s) - '/dev/null' saved [27/27]

FINISHED --2017-04-03 11:13:51--
Total wall clock time: 9.9s
Downloaded: 2 files, 2.3K in 0s (60.2 MB/s)
Job for mycodo.service failed. See 'systemctl status mycodo.service' and 'journalctl -xn' for details.
Failed: Error while running post-upgrade script.


The upgrade has failed: Attempting to revert moving the old Mycodo install.

Successfully reverted moving the old Mycodo install directory. Moved /var/Mycodo-backups/Mycodo-backup-2017-04-03_11-09-03-5.0.15 to /home/pi/Mycodo

#### Creating proper users, directories, and permissions
useradd: user 'mycodo' already exists
The user `mycodo' is already a member of `gpio'.
The user `mycodo' is already a member of `adm'.
The user `mycodo' is already a member of `video'.
Done.

then i decide reboot the rpi, the deamon its ready but no data are recorded with error in apache2:


[Mon Apr 03 11:21:02.305388 2017] [ssl:warn] [pid 1146:tid 1995857920] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Apr 03 11:21:02.323195 2017] [ssl:warn] [pid 1146:tid 1995857920] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 03 11:21:02.390462 2017] [ssl:warn] [pid 1173:tid 1995857920] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Apr 03 11:21:02.390606 2017] [ssl:warn] [pid 1173:tid 1995857920] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 03 11:21:02.469881 2017] [wsgi:warn] [pid 1173:tid 1995857920] mod_wsgi: Compiled for Python/2.7.8.
[Mon Apr 03 11:21:02.469968 2017] [wsgi:warn] [pid 1173:tid 1995857920] mod_wsgi: Runtime using Python/2.7.9.
[Mon Apr 03 11:21:02.475066 2017] [mpm_event:notice] [pid 1173:tid 1995857920] AH00489: Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Mon Apr 03 11:21:02.475208 2017] [core:notice] [pid 1173:tid 1995857920] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 03 11:21:41.487565 2017] [wsgi:error] [pid 1193:tid 1963062320] 2017-04-03 11:21:41,479 URL for 'last_data' raised and error: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+lux%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27bebb9eb3-e426-4a39-9d16-25f59a337331%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd4fb50>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.487747 2017] [wsgi:error] [pid 1193:tid 1963062320] Traceback (most recent call last):
[Mon Apr 03 11:21:41.487770 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/var/www/mycodo/mycodo/mycodo_flask/general_routes.py", line 245, in last_data
[Mon Apr 03 11:21:41.487789 2017] [wsgi:error] [pid 1193:tid 1963062320]     sensor_period)).raw
[Mon Apr 03 11:21:41.487806 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 325, in query
[Mon Apr 03 11:21:41.487824 2017] [wsgi:error] [pid 1193:tid 1963062320]     expected_response_code=expected_response_code
[Mon Apr 03 11:21:41.487842 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 241, in request
[Mon Apr 03 11:21:41.487860 2017] [wsgi:error] [pid 1193:tid 1963062320]     raise e
[Mon Apr 03 11:21:41.487880 2017] [wsgi:error] [pid 1193:tid 1963062320] ConnectionError: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+lux%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27bebb9eb3-e426-4a39-9d16-25f59a337331%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd4fb50>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.719578 2017] [wsgi:error] [pid 1193:tid 1963062320] 2017-04-03 11:21:41,718 URL for 'last_data' raised and error: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+humidity%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd35ef0>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.719727 2017] [wsgi:error] [pid 1193:tid 1963062320] Traceback (most recent call last):
[Mon Apr 03 11:21:41.719847 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/var/www/mycodo/mycodo/mycodo_flask/general_routes.py", line 245, in last_data
[Mon Apr 03 11:21:41.719868 2017] [wsgi:error] [pid 1193:tid 1963062320]     sensor_period)).raw
[Mon Apr 03 11:21:41.719886 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 325, in query
[Mon Apr 03 11:21:41.719906 2017] [wsgi:error] [pid 1193:tid 1963062320]     expected_response_code=expected_response_code
[Mon Apr 03 11:21:41.719923 2017] [wsgi:error] [pid 1193:tid 1963062320]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 241, in request
[Mon Apr 03 11:21:41.719941 2017] [wsgi:error] [pid 1193:tid 1963062320]     raise e
[Mon Apr 03 11:21:41.726057 2017] [wsgi:error] [pid 1193:tid 1963062320] ConnectionError: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+humidity%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd35ef0>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.738159 2017] [wsgi:error] [pid 1193:tid 1937896496] 2017-04-03 11:21:41,731 URL for 'last_data' raised and error: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+dewpoint%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd35f10>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.738285 2017] [wsgi:error] [pid 1193:tid 1937896496] Traceback (most recent call last):
[Mon Apr 03 11:21:41.738306 2017] [wsgi:error] [pid 1193:tid 1937896496]   File "/var/www/mycodo/mycodo/mycodo_flask/general_routes.py", line 245, in last_data
[Mon Apr 03 11:21:41.738324 2017] [wsgi:error] [pid 1193:tid 1937896496]     sensor_period)).raw
[Mon Apr 03 11:21:41.738341 2017] [wsgi:error] [pid 1193:tid 1937896496]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 325, in query
[Mon Apr 03 11:21:41.738358 2017] [wsgi:error] [pid 1193:tid 1937896496]     expected_response_code=expected_response_code
[Mon Apr 03 11:21:41.738374 2017] [wsgi:error] [pid 1193:tid 1937896496]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 241, in request
[Mon Apr 03 11:21:41.738391 2017] [wsgi:error] [pid 1193:tid 1937896496]     raise e
[Mon Apr 03 11:21:41.738412 2017] [wsgi:error] [pid 1193:tid 1937896496] ConnectionError: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+dewpoint%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bd35f10>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.746607 2017] [wsgi:error] [pid 1193:tid 1929507888] 2017-04-03 11:21:41,745 URL for 'last_data' raised and error: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+temperature%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bdb2c10>: Failed to establish a new connection: [Errno 111] Connection refused',))
[Mon Apr 03 11:21:41.746737 2017] [wsgi:error] [pid 1193:tid 1929507888] Traceback (most recent call last):
[Mon Apr 03 11:21:41.746757 2017] [wsgi:error] [pid 1193:tid 1929507888]   File "/var/www/mycodo/mycodo/mycodo_flask/general_routes.py", line 245, in last_data
[Mon Apr 03 11:21:41.746774 2017] [wsgi:error] [pid 1193:tid 1929507888]     sensor_period)).raw
[Mon Apr 03 11:21:41.746790 2017] [wsgi:error] [pid 1193:tid 1929507888]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 325, in query
[Mon Apr 03 11:21:41.746855 2017] [wsgi:error] [pid 1193:tid 1929507888]     expected_response_code=expected_response_code
[Mon Apr 03 11:21:41.746873 2017] [wsgi:error] [pid 1193:tid 1929507888]   File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 241, in request
[Mon Apr 03 11:21:41.746889 2017] [wsgi:error] [pid 1193:tid 1929507888]     raise e
[Mon Apr 03 11:21:41.746907 2017] [wsgi:error] [pid 1193:tid 1929507888] ConnectionError: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=SELECT+last%28value%29%0A++++++++++++++++++++++++++++++++++FROM+temperature%0A++++++++++++++++++++++++++++++++++WHERE+device_id%3D%27d7286512-c3cb-4b42-8786-dc87115ad1a7%27%0A++++++++++++++++++++++++++++++++++++++++AND+time+%3E+now%28%29+-+30m%0A+++++++++++++++++++++++++++++++&db=mycodo_db (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6bdb2c10>: Failed to establish a new connection: [Errno 111] Connection refused',))
@Ericktz
Copy link
Contributor Author

Ericktz commented Apr 3, 2017

I do not know how it happened but while I was writing the problem, I go back to check out and all be normal again :/

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

Connection refused. Is the daemon running?

This is returned when the web UI (frontned) cannot communicate with the daemon (backend). If this is happening, the daemon is most likely not running and "Mycodo" in the top-left of the web UI will be red, because this is the "check" that's occurring and failing.

Job for mycodo.service failed. See 'systemctl status mycodo.service' and 'journalctl -xn' for details.
Failed: Error while running post-upgrade script.
The upgrade has failed: Attempting to revert moving the old Mycodo install.

The upgrade failed because the mycodo daemon could not be restarted, and the install was reverted back. An upgrade cannot occur if the mycodo daemon isn't functioning properly, so always make sure it's running and responding before performing an upgrade.

ConnectionError: HTTPConnectionPool(host='localhost', port=8086)

This error occurs when influxdb (measurement database) is not responding, and typically happens at startup because it can sometimes take a long time to start. Slower systems (Pi Zero, Pi1) have more of an issue with this than faster (Pi3). Measurements cannot be retrieved or written while influxdb is starting, and until it fully starts, this is the error it returns. Once started, these errors go away and everything works fine (reading/writing to the measurement database).

@Ericktz
Copy link
Contributor Author

Ericktz commented Apr 3, 2017

Excellent, I already understood that it turns red when the deamon is not running, but try to find the error that had caused it to stop, about 2 hours ago, I realize that I was not running, when I check the logfiles , I found nothing more than the following, and that's where I started what I said before

[Sun Apr 02 07:35:53.287332 2017] [ssl:warn] [pid 1192:tid 1996259328] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Apr 02 07:35:53.287501 2017] [ssl:warn] [pid 1192:tid 1996259328] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Sun Apr 02 07:35:53.288285 2017] [wsgi:warn] [pid 1192:tid 1996259328] mod_wsgi: Compiled for Python/2.7.8.
[Sun Apr 02 07:35:53.288318 2017] [wsgi:warn] [pid 1192:tid 1996259328] mod_wsgi: Runtime using Python/2.7.9.
[Sun Apr 02 07:35:53.289900 2017] [mpm_event:notice] [pid 1192:tid 1996259328] AH00489: Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Apr 02 07:35:53.290015 2017] [core:notice] [pid 1192:tid 1996259328] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 03 07:35:55.210626 2017] [mpm_event:notice] [pid 1192:tid 1996259328] AH00493: SIGUSR1 received.  Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

There's nothing abnormal in that log, and only web UI (frontend) errors will appear there, not the daemon. You will need to refer to the daemon log for those errors (through web UI or /var/log/mycodo/mycodo.log).

@Ericktz
Copy link
Contributor Author

Ericktz commented Apr 3, 2017

The problem is that there was nothing strange in that logfile:

2017-03-31 13:08:31,893 - mycodo - INFO - 47.076 MB ram in use
2017-04-01 13:08:32,081 - mycodo - INFO - 47.076 MB ram in use
2017-04-02 13:08:32,167 - mycodo - INFO - 47.076 MB ram in use
2017-04-03 11:21:31,587 - mycodo - INFO - Mycodo daemon v5.0.21 starting
2017-04-03 11:21:32,094 - mycodo - INFO - Anonymous statistics enabled

It is as if he had not registered the error that caused him to stop executing

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

The worst kind of bugs. How long had it been running before the issue?

@Ericktz
Copy link
Contributor Author

Ericktz commented Apr 3, 2017

Had been running since Friday, March 31, and from what I saw in graphics, the last measurement was recorded on April 2 at 2:45 pm, there I think that the daemon stopped and did not register anymore

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

I was meaning, that you have been running Mycodo for weeks and this is the first time the daemon stopped? The code hasn't changed that much in the last few updates that I think would start to cause daemon issues, so I think this may be operating system-related and not Mycodo. I would test some more and if it continually happens, then you should try to narrow down what part of Mycodo is causing it, be selectively turning off (or on) features until you can isolate the problem area.

@Ericktz
Copy link
Contributor Author

Ericktz commented Apr 3, 2017

No no sorry, I was having problems with the daemon for some time ago, but I did not find out what the cause was, I rebooted the raspberry and everything was fixed, I always look for updates to keep the latest version of mycodo. Now I will be more attentive, it usually happened every 3-4 days that worked perfect and then stopped, I suspected that it was DHT-22 sensor problems (I have the AM2302, but I understand they use the same library), but I have not Confirm it. Apparently my problem are similar to #198

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

I use both the DHT22 and AM2315 and those systems haven't had issues, even running for weeks between updates. So, I would be hard-pressed to believe it's Mycodo. Power supplies can be an issue, specifically those that don't filter out spikes caused by things such as refrigerators, generators, motors, etc. I would change variables (connected sensors, controllers activated, power supplies, locations power supply is plugged in at your location, etc.) and see if you can isolate the issue.

@Ryobidelacroix
Copy link

I'm also having this intermittent issue with 5.0.21.

When using sudo service mycodo status -l I get:

● mycodo.service - Mycodo server
Loaded: loaded (/home/pi/Mycodo/install/mycodo.service; enabled)
Active: failed (Result: exit-code) since Mon 2017-04-03 22:51:47 ACST; 8h ago
Process: 31674 ExecStop=/var/www/mycodo/env/bin/python /var/www/mycodo/mycodo/mycodo_client.py -t (code=exited, status=1/FAILURE)
Process: 535 ExecStart=/var/www/mycodo/env/bin/python /var/www/mycodo/mycodo/mycodo_daemon.py (code=exited, status=0/SUCCESS)
Main PID: 1161 (code=killed, signal=ABRT)

Apr 03 22:51:46 raspberrypi systemd[1]: mycodo.service: main process exited, code=killed, status=6/ABRT
Apr 03 22:51:47 raspberrypi python[31674]: Traceback (most recent call last):
Apr 03 22:51:47 raspberrypi python[31674]: File "/var/www/mycodo/mycodo/mycodo_client.py", line 180, in
Apr 03 22:51:47 raspberrypi python[31674]: daemon_control = DaemonControl()
Apr 03 22:51:47 raspberrypi python[31674]: File "/var/www/mycodo/mycodo/mycodo_client.py", line 55, in init
Apr 03 22:51:47 raspberrypi python[31674]: raise Exception("Connection refused. Is the daemon running?")
Apr 03 22:51:47 raspberrypi python[31674]: Exception: Connection refused. Is the daemon running?
Apr 03 22:51:47 raspberrypi systemd[1]: mycodo.service: control process exited, code=exited status=1
Apr 03 22:51:47 raspberrypi systemd[1]: Unit mycodo.service entered failed state.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

I'll see if I can start the Daemon in debug mode, change power supplies and see how it goes.

@kizniche
Copy link
Owner

kizniche commented Apr 3, 2017

Not sure about those errors. Perhaps a fresh install could fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants