Open werto165 opened 1 year ago
@werto165 Thanks for the bug report.
Can you please test 1.1.0-beta.2 and let me know whether you're still seeing this issue? https://hub.docker.com/layers/webthingsio/gateway/1.1.0-beta.2/images/sha256-db33eda9461c15f08fce3118cdef3d2a08b6155721564293d97c9386e426deaf?context=explore
I'm running 1.1.0-beta.2 on bullseye (Raspbian, Pi 4 Model B) without any issue:
❯ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f8071075060f webthingsio/gateway:1.1.0-beta.2 "/init.sh" 10 days ago Up 10 days webthings
Hi, I have same issue with docker on Ubuntu. Was this fixed in stable release 1.1?
See also: https://discourse.mozilla.org/t/issue-starting-docker-image/109712/2 for someone else experiencing this issue.
@benfrancis OK so after few attempts I find out where the problem was. An incorrect config in the portainer stack with timezone settings. Image with Gateway 1.1.0 is fully working now! The correct config for portainer stack or docker-compose is:
version: '4'
services:
webthings:
container_name: webthings
image: "webthingsio/gateway"
volumes:
- /home/dell/docker/webthings/:/home/node/.webthings
network_mode: host
environment:
- "TZ=Europe/Prague"
restart: always
logging:
options:
max-size: "1m"
max-file: "10"
See also: #3065, in which the same error is produced on a Raspberry Pi 3.
https://github.com/WebThingsIO/gateway/issues/3065#issuecomment-1396054320 suggests that the 1.1 docker image only works when upgrading a 1.0 image and the 1.1 image doesn't work when installed from fresh. Possibly because the SQLite database doesn't get created properly on first start.
It would be good if someone could test that and report back if they can reproduce it.
Edit: It appears just copying an SQLite database from a 1.0 installation doesn't fix the problem, files generated by the 1.0 installation are needed https://github.com/WebThingsIO/gateway/issues/3065#issuecomment-1399559803
https://github.com/WebThingsIO/gateway/issues/3066#issue-1551494583 offers a workaround "putting a text file in the /home/node/.webthings folder named .node_version and ensure it's content is 12 will result in the image starting properly"
Thanks for the workaround, @kcusoundman.
It would be great if we could turn that into a patch so we can release a working 1.1.1 release of the docker image.
As far as I can tell, the .node_version
file is meant to be created by run-app.sh if the gateway is running inside a container and the file does not already exist. See lines 48-62 https://github.com/WebThingsIO/gateway/blob/v1.1.X/run-app.sh#L48
At a guess one of the lines between line 56 and 59 is failing to execute and causing the startup script to crash. If the file already exists and its contents matches the node version running inside the container then those lines are skipped.
Is anyone able to debug this inside a docker container and come up with a proposed fix?
See also #3109
I am trying to run the follow image: webthingsio/gateway:1.1.0-alpha.1 on bullseye
seems like addon_manager_1.default is not being created therefore its null. any help would be appreciated