I have a series of shell commands that are called to populate a remote device with an http command. The command works great from the command line. When called from an automation it tends to work but breaks things, like knocking the recorder offline. And caused an odd error when executed. The odd thing is that it does not always fail and it does always get to the point that the database becomes corrupted. It could be that they work great from the command line because they are not repeatedly called.
It almost seems like a memory leak or something else that builds up. With all of them disable (6), the system is stable. If I turn on a couple, the errors creep in over the next half hour or so. If all are enable it is minutes before it becomes unstable.
Am I making the calls properly, or have I missed a recent change that is causing this failure.
Is there a problem with the current version of curl?
I am running fully a updated Hass.io install at 65.5. System is a RPi2, ethernet connected. I have tried 2 piās, 4 memory cards and 2 different power supplies. This started either late in the 64 train or at the beginning of 65. I really need this to work, the unit that gets the data is a Wemos D1 with a display that in turn sends the data to other Wemos D1 units with displays. They are small info panels for current local weather and weather alerts now that we are in spring and tornadoes and strong storms will be the concern.
Here is one example of the automation and the shell command:
- id: "Broadcast Real Temp HTTP"
alias: 'Broadcast Real Temp HTTP'
initial_state: 'off'
hide_entity: false
trigger:
- platform: time
minutes: '/2'
seconds: '30'
action:
- service: shell_command.wu_temp_http
data_template:
state: '{{ states.sensor.pws_temp_f.state }}'
shell_command:
wu_temp_http: /usr/bin/curl "http://192.168.1.121/control?cmd=event,RealTemp={{state}}"
018-03-18 19:08:45 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8)
2018-03-18 19:08:45 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-03-18 19:12:45 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8)
2018-03-18 19:12:45 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-03-18 19:15:45 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8)
2018-03-18 19:15:45 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (sqlite3.OperationalError) disk I/O error (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-03-18 19:22:45 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/usr/bin/curl "http://192.168.1.121/control?cmd=event,FeelsLike={{state}}"`, return code: -11
NoneType: None
2018-03-18 19:24:30 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/usr/bin/curl "http://192.168.1.121/control?cmd=event,RealTemp={{state}}"`, return code: -11
NoneType: None
2018-03-18 19:24:45 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/usr/bin/curl "http://192.168.1.121/control?cmd=event,FeelsLike={{state}}"`, return code: -11
NoneType: None
Without the shell commands running, I am seeing this from time to time as well: I am not sure, but suspect this may be weather underground related.
2018-03-19 07:24:54 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 231, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp\_http_parser.pyx", line 295, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
I know, the logs are a few days old but I have turned off all of the automations in order to keep my install running. Tested last night and saw the same behavior.