Influxdb not installing properly

Installing Mycodo onto raspberry pi zero. Using 32bit OS. Everything loads without error until the end of the installation when I get problems installing infuxdb. I can run Mycodo at the end of the installation and even add inputs. However I am unable to get any readings from any of the inputs (CO2 monitor and temp/humidity sensors) which I am assuming is due to the data base not working.
I have attempted 4 seperate installations with two different SD cards (16GB and 64GB) all with the same result.
I have looked for the data base to see if it exists but canā€™t find it (basically cause I donā€™t know were to look/it is stored).
Checking the Mycodo Log I get this result:-

2023-04-26 15:07:39,451 - INFO - mycodo - Mycodo daemon v8.15.8 starting
2023-04-26 15:07:40,103 - INFO - mycodo.pyro_daemon - Starting Pyro5 daemon
2023-04-26 15:07:51,430 - INFO - mycodo.controllers.controller_output - Activated in 6782.3 ms
2023-04-26 15:07:51,932 - INFO - mycodo - All activated Conditional controllers started
2023-04-26 15:07:51,936 - INFO - mycodo - All activated Trigger controllers started
2023-04-26 15:08:02,876 - INFO - mycodo.controllers.controller_input_97708267 - Activated in 8229.8 ms
2023-04-26 15:08:13,870 - INFO - mycodo.controllers.controller_input_d40532e2 - Activated in 6542.3 ms
2023-04-26 15:08:13,876 - INFO - mycodo - All activated Input controllers started
2023-04-26 15:08:13,907 - INFO - mycodo - All activated PID controllers started
2023-04-26 15:08:13,919 - INFO - mycodo - All activated Function controllers started
2023-04-26 15:08:19,852 - INFO - mycodo.controllers.controller_widget - Activated in 5897.8 ms
2023-04-26 15:08:20,869 - INFO - mycodo - Mycodo daemon started in 41.408 seconds

If I tick the logging within the input function I get from the mycodo log:-

2023-04-26 15:07:39,451 - INFO - mycodo - Mycodo daemon v8.15.8 starting
2023-04-26 15:07:40,103 - INFO - mycodo.pyro_daemon - Starting Pyro5 daemon
2023-04-26 15:07:51,430 - INFO - mycodo.controllers.controller_output - Activated in 6782.3 ms
2023-04-26 15:07:51,932 - INFO - mycodo - All activated Conditional controllers started
2023-04-26 15:07:51,936 - INFO - mycodo - All activated Trigger controllers started
2023-04-26 15:08:02,876 - INFO - mycodo.controllers.controller_input_97708267 - Activated in 8229.8 ms
2023-04-26 15:08:13,870 - INFO - mycodo.controllers.controller_input_d40532e2 - Activated in 6542.3 ms
2023-04-26 15:08:13,876 - INFO - mycodo - All activated Input controllers started
2023-04-26 15:08:13,907 - INFO - mycodo - All activated PID controllers started
2023-04-26 15:08:13,919 - INFO - mycodo - All activated Function controllers started
2023-04-26 15:08:19,852 - INFO - mycodo.controllers.controller_widget - Activated in 5897.8 ms
2023-04-26 15:08:20,869 - INFO - mycodo - Mycodo daemon started in 41.408 seconds
2023-04-26 16:50:40,970 - INFO - mycodo.controllers.controller_input_97708267 - Deactivated in 99.5 ms
2023-04-26 16:51:12,510 - DEBUG - mycodo.controllers.controller_input_97708267 - get_measurement() found
2023-04-26 16:51:12,540 - DEBUG - mycodo.controllers.controller_input_97708267 - listener() not found
2023-04-26 16:51:12,544 - INFO - mycodo.controllers.controller_input_97708267 - Activated in 6475.9 ms
2023-04-26 16:51:13,396 - DEBUG - mycodo.controllers.controller_input_97708267 - Adding measurements to InfluxDB with ID 97708267-5b68-4419-8bb9-bc7ed9949f77: {0: {ā€˜measurementā€™: ā€˜temperatureā€™, ā€˜unitā€™: ā€˜Cā€™, ā€˜valueā€™: 20.698100251773866, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 12, 630035)}, 1: {ā€˜measurementā€™: ā€˜humidityā€™, ā€˜unitā€™: ā€˜percentā€™, ā€˜valueā€™: 74.90653849088274, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 12, 630240)}, 3: {ā€˜measurementā€™: ā€˜vapor_pressure_deficitā€™, ā€˜unitā€™: ā€˜Paā€™, ā€˜valueā€™: 612.4658600360754, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 12, 630552)}}
2023-04-26 16:51:27,315 - DEBUG - mycodo.controllers.controller_input_97708267 - Adding measurements to InfluxDB with ID 97708267-5b68-4419-8bb9-bc7ed9949f77: {0: {ā€˜measurementā€™: ā€˜temperatureā€™, ā€˜unitā€™: ā€˜Cā€™, ā€˜valueā€™: 20.698100251773866, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 26, 993409)}, 1: {ā€˜measurementā€™: ā€˜humidityā€™, ā€˜unitā€™: ā€˜percentā€™, ā€˜valueā€™: 74.87907225146868, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 26, 993550)}, 3: {ā€˜measurementā€™: ā€˜vapor_pressure_deficitā€™, ā€˜unitā€™: ā€˜Paā€™, ā€˜valueā€™: 613.1362392078995, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 26, 993850)}}
2023-04-26 16:51:45,540 - DEBUG - mycodo.controllers.controller_input_97708267 - Adding measurements to InfluxDB with ID 97708267-5b68-4419-8bb9-bc7ed9949f77: {0: {ā€˜measurementā€™: ā€˜temperatureā€™, ā€˜unitā€™: ā€˜Cā€™, ā€˜valueā€™: 20.724803540093077, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 42, 5017)}, 1: {ā€˜measurementā€™: ā€˜humidityā€™, ā€˜unitā€™: ā€˜percentā€™, ā€˜valueā€™: 74.9034866865034, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 42, 5162)}, 3: {ā€˜measurementā€™: ā€˜vapor_pressure_deficitā€™, ā€˜unitā€™: ā€˜Paā€™, ā€˜valueā€™: 613.5480974693311, ā€˜timestamp_utcā€™: datetime.datetime(2023, 4, 26, 6, 51, 42, 5462)}}

So I am assuming that something is being logged somewhere but it is just not available were Mycodo expects it to be.

I will add the outputs of the installation log as well as any further info I can find, but if anyone has any pointers on what I am doing wrong it would be appreciatedā€¦

This is from the setup.log:-

Ensuring compatible version of influxdb 1.x is installed

Incorrect InfluxDB version (v(none)) installed. Should be v1.8.10-1

Stopping influxdb 2.x (if installed)ā€¦

Failed to stop influxd.service: Unit influxd.service not loaded.

Uninstalling influxdb 2.x (if installed)ā€¦

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package listsā€¦

Building dependency treeā€¦

Reading state informationā€¦

E: Unable to locate package influxdb2

E: Unable to locate package influxdb2-cli

Installing InfluxDB v1.8.10-1ā€¦

Selecting previously unselected package influxdb.

(Reading database ā€¦ 46544 files and directories currently installed.)

Preparing to unpack influxdb_1.8.10_armhf.deb ā€¦

Unpacking influxdb (1.8.10-1) ā€¦

Setting up influxdb (1.8.10-1) ā€¦

Created symlink /etc/systemd/system/influxd.service ā†’ /lib/systemd/system/influxdb.service.

Created symlink /etc/systemd/system/multi-user.target.wants/influxdb.service ā†’ /lib/systemd/system/influxdb.service.

Processing triggers for man-db (2.9.4-2) ā€¦

Flux found to not be enabled. Enabling and restarting InfluxDB.

Job for influxdb.service failed because a timeout was exceeded.

See ā€œsystemctl status influxdb.serviceā€ and ā€œjournalctl -xeā€ for details.

Creating InfluxDB 1.x database and user

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Attempting to connectā€¦

Could not connect to Influxdb. Waiting 60 seconds then trying againā€¦

Running initialization

Creating mycodo user

And finally:-

dcj@raspberrypi:~ $ systemctl status influxdb.service
ā— influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: activating (start) since Wed 2023-04-26 16:27:37 AEST; 18s ago
Docs: InfluxDB OSS 2.7 Documentation
Cntrl PID: 12431 (influxd-systemd)
Tasks: 7 (limit: 724)
CPU: 15.325s
CGroup: /system.slice/influxdb.service
ā”œā”€12431 /bin/bash -e /usr/lib/influxdb/scripts/influxd-systemd-start.sh
ā”œā”€12432 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
ā””ā”€12495 sleep 1

Apr 26 16:27:43 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 4 attemptsā€¦
Apr 26 16:27:44 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 5 attemptsā€¦
Apr 26 16:27:46 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 6 attemptsā€¦
Apr 26 16:27:47 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 7 attemptsā€¦
Apr 26 16:27:48 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 8 attemptsā€¦
Apr 26 16:27:50 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 9 attemptsā€¦
Apr 26 16:27:51 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 10 attemptsā€¦
Apr 26 16:27:53 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 11 attemptsā€¦
Apr 26 16:27:54 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 12 attemptsā€¦
Apr 26 16:27:55 raspberrypi influxd-systemd-start.sh[12431]: InfluxDB API unavailable after 13 attemptsā€¦

Have you searched the github issues for ā€œPi zero Could not connect to InfluxDBā€?

Thanks Kyle, despite numerous searches I was previously not able to find any help (I thought discord was the place to look, not github) but with your pointer on what to search for I have managed to get the database up and running so far. Thank you for your help and timeā€¦

1 Like