eargollo / smartthings-influx

A simple program to bring to Influx your SmartThings data through the SmartThings API. No SmartApp installation needed.
Apache License 2.0
22 stars 6 forks source link

Docker image not working? #18

Closed andygodber closed 1 year ago

andygodber commented 1 year ago

Also cant get the image to work. Tried the docker-compose and Portainer and another web method to pull from DockerHub.

Message: standard_init_linux.go:230: exec user process caused: exec format error or exec /app: exec format error

eargollo commented 1 year ago

I just updated the docker compose and instructions to use the published image.

Can you try again and let me know what happened?

andygodber commented 1 year ago

Hi Eduardo - thanks for looking into this. I can confirm the Grafana, Influx and Chrono containers seem to start ok (I stopped my native versions of these services so the port mapping etc wouldnt fail).

EDIT Something is happening! Despite the errors below, I decided to hunt around in the grafana and influx services. I can see data is being sent from Smartthings to the DB. I had to manually add the InfluxDB data source into Grafana, and can then proceed to graph the data etc. But there was no other Grafana content (e.g the default dashboard mentioned). So I manually copied the provisioning files into the correct location and the dashboard appears. Im guessing the same would be true for the datasource.

So looks like the creation/copying of the provisioning files is the problem.

However, the main SmarThings container stops and still has this message: exec /app: exec format error .....is that how it should be?

That may then be the cause of these other types of error in Influx and Grafana? Influx: ts=2022-12-01T12:31:42.058360Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0eVQ_wFG000

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:31:42 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 1c49eac8-7174-11ed-8001-0242ac120002 7481

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:31:50 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 211f9c81-7174-11ed-8002-0242ac120002 6806

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:31:58 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 25f1f2da-7174-11ed-8003-0242ac120002 5472

[httpd] 172.18.0.1 - root [01/Dec/2022:12:32:02 +0000] "POST /write?db=vue HTTP/1.1 " 404 33 "-" "python-requests/2.26.0" 286bdb86-7174-11ed-8004-0242ac120002 154

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:32:06 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 2ac57217-7174-11ed-8005-0242ac120002 7557

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:32:14 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 2f905907-7174-11ed-8006-0242ac120002 6930

[httpd] 192.168.1.171 - grafana [01/Dec/2022:12:32:22 +0000] "POST /write?db=SmartThings HTTP/1.1 " 204 0 "-" "Linux UPnP/1.0 SmartThings" 345f52fe-7174-11ed-8007-0242ac120002 6457

Grafana: logger=query_data t=2022-12-01T12:31:42.921961887Z level=info msg="Query Service initialization"

logger=live.push_http t=2022-12-01T12:31:42.927471697Z level=info msg="Live Push Gateway initialization"

logger=infra.usagestats.collector t=2022-12-01T12:31:43.156927404Z level=info msg="registering usage stat providers" usageStatsProvidersLen=2

logger=provisioning.datasources t=2022-12-01T12:31:43.1570624Z level=error msg="can't read datasource provisioning files from directory" path=/etc/grafana/provisioning/datasources error="open /etc/grafana/provisioning/datasources: no such file or directory"

logger=provisioning.plugins t=2022-12-01T12:31:43.157086446Z level=error msg="Failed to read plugin provisioning files from directory" path=/etc/grafana/provisioning/plugins error="open /etc/grafana/provisioning/plugins: no such file or directory"

logger=provisioning.notifiers t=2022-12-01T12:31:43.157104658Z level=error msg="Can't read alert notification provisioning files from directory" path=/etc/grafana/provisioning/notifiers error="open /etc/grafana/provisioning/notifiers: no such file or directory"

logger=provisioning.alerting t=2022-12-01T12:31:43.157123248Z level=error msg="can't read alerting provisioning files from directory" path=/etc/grafana/provisioning/alerting error="open /etc/grafana/provisioning/alerting: no such file or directory"

logger=provisioning.alerting t=2022-12-01T12:31:43.157130209Z level=info msg="starting to provision alerting"

logger=provisioning.alerting t=2022-12-01T12:31:43.157140084Z level=info msg="finished to provision alerting"

logger=grafanaStorageLogger t=2022-12-01T12:31:43.157278235Z level=info msg="storage starting"

logger=ngalert.state.manager t=2022-12-01T12:31:43.157539565Z level=info msg="Warming state cache for startup"

logger=provisioning.dashboard t=2022-12-01T12:31:43.158279047Z level=error msg="can't read dashboard provisioning files from directory" path=/etc/grafana/provisioning/dashboards error="open /etc/grafana/provisioning/dashboards: no such file or directory"

logger=http.server t=2022-12-01T12:31:43.16031771Z level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=

logger=ngalert.state.manager t=2022-12-01T12:31:43.221748968Z level=info msg="State cache has been initialized" states=0 duration=64.204781ms

logger=ticker t=2022-12-01T12:31:43.221834541Z level=info msg=starting first_tick=2022-12-01T12:31:50Z

logger=ngalert.multiorg.alertmanager t=2022-12-01T12:31:43.221825109Z level=info msg="starting MultiOrg Alertmanager"

logger=serviceaccounts.background t=2022-12-01T12:31:43.225518185Z level=warn msg="secret scan interval is too low, increasing to 5m0s"

eargollo commented 1 year ago

I am glad it worked.

The general idea was to clone the repository and run docker compose from its root, so it can find the Grafana files.

Closing the issue.