janvda / balena-node-red-mqtt-nginx-TIG-stack

Composite docker application with "8" containers (2x Node-RED, 2x MQTT broker, Telegraf, InfluxDb, Grafana, Nginx) for deployment on Raspberry Pi through Balena.
Eclipse Public License 2.0
58 stars 42 forks source link

Influxdb stuck in start loop #14

Closed rutberg closed 5 years ago

rutberg commented 5 years ago

The symptoms are similar to what @janvda experienced here however, the ports are in the right order.

I've followed the steps to the point, I'm not using a USB drive and I'm running it on a RPi3

I've experienced the same issues with other builds involving influxdb. I have no idea where to start, as I'm really new to balena and have very limited experience with influxdb.

Amonst the errors presented, I found these as somewhat noteworthy;

May 22 10:47:57 3fc71e2 balenad[795]: /usr/bin/entry.sh: line 29: /etc/hostname: Permission denied
May 22 10:47:57 3fc71e2 balenad[795]: /usr/bin/entry.sh: line 30: /etc/hosts: Permission denied
May 22 10:47:57 3fc71e2 balenad[795]: hostname: you must be root to change the host name
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--types" option
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--move" option
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--move" option
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--move" option
May 22 10:47:57 3fc71e2 balenad[795]: time="2019-05-22T10:47:57.174124190Z" level=warning msg="unknown container" container=49c6f30a0d49f00bbe9546ce4b64194fe5c4828165174431a22721f33cb55699 module=libcontainerd namespace=plugins.moby
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--move" option
May 22 10:47:57 3fc71e2 balenad[795]: umount: /dev: umount failed: Operation not permitted
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--move" option
May 22 10:47:57 3fc71e2 balenad[795]: ln: cannot remove ‘/dev/ptmx’: Permission denied
May 22 10:47:57 3fc71e2 balenad[795]: mount: only root can use "--types" option
May 22 10:47:57 3fc71e2 balenad[795]: /sbin/udevd
May 22 10:47:57 3fc71e2 balenad[795]: mount: can't find LABEL=influxdb
May 22 10:47:57 3fc71e2 balenad[795]: Event: Service started {"service":{"appId":1465407,"serviceId":263421,"serviceName":"node-red","releaseId":929996}}
May 22 10:47:57 3fc71e2 balenad[795]: Event: Service started {"service":{"appId":1465407,"serviceId":262989,"serviceName":"influxdb","releaseId":929996}}
May 22 10:47:58 3fc71e2 balenad[795]: Warning: Ignoring unsupported or unknown compose fields: containerName
janvda commented 5 years ago

I am sorry to hear you have a problem.

  1. It is a bit unclear to me where the above log file comes from. FYI I have copy pasted my influxdb log file from the balena dashboard after restarting it (see below). So can you do the same in the balena dashboard ? For this you must set a filter on the "influxdb" container, then restart this container, then clear the log files just after the influxdb container is exited (but before it is restarted).

It is important that you copy-paste the start of the influx db log file as this most likely describes the issue why it is not starting properly.

  1. I understand that you are not using a USB drive, but did you make any changes for that (I don't think it is needed) ? If you modified any file of this repository, can you also specify what you have modified ?
23.05.19 17:58:44 (+0200)  influxdb  
23.05.19 17:58:44 (+0200)  influxdb   8888888           .d888 888                   8888888b.  888888b.
23.05.19 17:58:44 (+0200)  influxdb     888            d88P"  888                   888  "Y88b 888  "88b
23.05.19 17:58:44 (+0200)  influxdb     888            888    888                   888    888 888  .88P
23.05.19 17:58:44 (+0200)  influxdb     888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
23.05.19 17:58:44 (+0200)  influxdb     888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
23.05.19 17:58:44 (+0200)  influxdb     888   888  888 888    888 888  888   X88K   888    888 888    888
23.05.19 17:58:44 (+0200)  influxdb     888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
23.05.19 17:58:44 (+0200)  influxdb   8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"
23.05.19 17:58:44 (+0200)  influxdb  
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.082283Z        info    InfluxDB starting       {"log_id": "0FaMVcRl000", "version": "1.7.6", "branch": "1.7", "commit": "01c8dd416270f424ab0c40f9291e269ac6921964"}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.082949Z        info    Go runtime      {"log_id": "0FaMVcRl000", "version": "go1.11", "maxprocs": 4}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.202265Z        info    Using data dir  {"log_id": "0FaMVcRl000", "service": "store", "path": "/mnt/influxdb/data"}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.207289Z        info    Compaction settings     {"log_id": "0FaMVcRl000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.209532Z        info    Open store (start)      {"log_id": "0FaMVcRl000", "service": "store", "trace_id": "0FaMVcxG000", "op_name": "tsdb_open", "op_event": "start"}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.521649Z        info    Opened file     {"log_id": "0FaMVcRl000", "engine": "tsm1", "service": "filestore", "path": "/mnt/influxdb/data/_internal/monitor/200/000000001-000000001.tsm", "id": 0, "duration": "166.258ms"}
23.05.19 17:58:44 (+0200)  influxdb  2019-05-23T15:58:44.543885Z        info    Opened file     {"log_id": "0FaMVcRl000", "engine": "tsm1", "service": "filestore", "path": "/mnt/influxdb/data/_internal/monitor/193/000000011-000000002.tsm", "id": 0, "duration": "189.898ms"}
rutberg commented 5 years ago

I did another deployment, I missed this reply, but I recreated all steps exactly again and it worked. The key difference was that I created a new application and provisioned a new device instead of just switching from one package to another. As mentioned, really new to Balena so I assume I'll take that as a lesson.