Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access the gateway after initializing from a Docker container #2905

Open
LucasFerrazBR opened this issue Dec 29, 2021 · 0 comments
Open
Labels

Comments

@LucasFerrazBR
Copy link

I've installed the gateway through the Docker image found that can be found at this link: https://hub.docker.com/r/webthingsio/gateway
I'm trying to connect to the gateway after starting the container, but nothing seems to work. I've tried to connect to the gateway with my IPv4 address, localhost and hostname from the Docker container, but i can't reach the gateway screen on my browser (using the 8080 port).

How can i connect to the gateway after starting a Docker container?

Here is my docker log:

WebThings
webthingsio/gateway:latest
RUNNING
chown: cannot access '/home/node/.webthings': No such file or directory

  • WEBTHINGS_HOME=/home/node/.webthings
  • args=
  • start_task=run-only
  • is_container
  • '[' -f /.dockerenv ']'
  • return 0
    ++ node --version
    ++ egrep -o '[0-9]+'
    ++ head -n1
  • _node_version=12
  • [[ ! -f /home/node/.webthings/.node_version ]]
  • cd /home/node/webthings/gateway
  • mkdir -p /home/node/.webthings/config
  • ./tools/update-addons.sh
    Creating database: /home/node/.webthings/config/db.sqlite3
    Checking for add-on updates...
    Finished updating add-ons
  • cd -
    /home/node/webthings/gateway
  • echo 12
  • [[ /home/node/.webthings == /\h\o\m\e/\n\o\d\e/.\w\e\b\t\h\i\n\g\s ]]
  • [[ -d /home/node/.mozilla-iot ]]
  • mkdir -p /home/node/.webthings/log
  • '[' -f /home/node/.webthings/log/run-app.log ']'
  • run_app
  • export NVM_DIR=/home/node/.nvm
  • NVM_DIR=/home/node/.nvm
  • '[' '!' -s /home/node/.nvm/nvm.sh ']'
  • '[' '!' is_container ']'
  • echo 'node version'
    node version
  • node --version
    v12.20.0
  • echo 'npm version'
    npm version
  • npm --version
    6.14.8
  • echo 'Starting gateway ...'
    Starting gateway ...
  • npm run run-only --

webthings-gateway@1.0.0 run-only /home/node/webthings/gateway
node build/gateway.js
Opening database: /home/node/.webthings/config/db.sqlite3
2021-12-29 00:47:29.284 INFO : Creating database: /home/node/.webthings/log/logs.sqlite3
2021-12-29 00:47:29.395 INFO : HTTP server listening on port 8080
2021-12-29 00:47:29.434 DEBUG : Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/schema.json because it has no messageType
2021-12-29 00:47:29.626 DEBUG : Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json because it has no messageType
2021-12-29 00:47:39.955 INFO : Checking for add-on updates...
2021-12-29 00:47:41.230 INFO : Finished updating add-ons
Process 10 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

  • WEBTHINGS_HOME=/home/node/.webthings
  • args=
  • start_task=run-only
  • is_container
  • '[' -f /.dockerenv ']'
  • return 0
    ++ node --version
    ++ egrep -o '[0-9]+'
    ++ head -n1
  • _node_version=12
  • [[ ! -f /home/node/.webthings/.node_version ]]
  • [[ 12 != \1\2 ]]
  • [[ /home/node/.webthings == /\h\o\m\e/\n\o\d\e/.\w\e\b\t\h\i\n\g\s ]]
  • [[ -d /home/node/.mozilla-iot ]]
  • mkdir -p /home/node/.webthings/log
  • '[' -f /home/node/.webthings/log/run-app.log ']'
  • rm -f /home/node/.webthings/log/run-app.log
  • run_app
  • export NVM_DIR=/home/node/.nvm
  • NVM_DIR=/home/node/.nvm
  • '[' '!' -s /home/node/.nvm/nvm.sh ']'
  • '[' '!' is_container ']'
  • echo 'node version'
    node version
  • node --version
    v12.20.0
  • echo 'npm version'
    npm version
  • npm --version
    6.14.8
  • echo 'Starting gateway ...'
    Starting gateway ...
  • npm run run-only --

webthings-gateway@1.0.0 run-only /home/node/webthings/gateway
node build/gateway.js
Opening database: /home/node/.webthings/config/db.sqlite3
2021-12-29 00:55:17.788 INFO : Opening database: /home/node/.webthings/log/logs.sqlite3
2021-12-29 00:55:17.899 INFO : HTTP server listening on port 8080
2021-12-29 00:55:17.908 DEBUG : Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/schema.json because it has no messageType
2021-12-29 00:55:18.101 DEBUG : Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json because it has no messageType
2021-12-29 00:55:28.434 INFO : Checking for add-on updates...
2021-12-29 00:55:29.653 INFO : Finished updating add-ons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants