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

Error when executing docker run #72

Open
Tokn59 opened this issue Oct 1, 2024 · 18 comments
Open

Error when executing docker run #72

Tokn59 opened this issue Oct 1, 2024 · 18 comments

Comments

@Tokn59
Copy link

Tokn59 commented Oct 1, 2024

When executing the following :

run --name rest980 -e BLID=************************ -e PASSWORD=***************** -e ROBOT_IP=192.168.1.74 -e FIRMWARE_VERSION=2 -p 3000:3000 koalazak/rest980:latest

I get Error : Error response from daemon: driver failed programming external connectivity on endpoint rest980 (68bf65ec9dbec368600a893459155a094efb3642814959db4d75a873b8bacebd): Bind for 0.0.0.0:3000 failed: port is already allocated.

It seems port 3000 is already in use by another addon (Doubletake). Can I simply use any other port ?

THANK YOU !!!!

@xnemesis
Copy link

Have you tried changing the ports in the addon or in the docker? There's no reason any port can't work as 3000 isn't an irobot port, just an addon port.

@jeremywillans
Copy link
Owner

jeremywillans commented Oct 18, 2024

As what @xnemesis said, you can change the binding to a different port

-p 3005:3000 for example which will map your computers port of 3005 to the container port of 3000

Just make sure you reference 3005 in the other yaml files

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

Thank you !!!! I have changed to port 3005 and so I can "see" the robot data on this page :

http://192.168.1.15:3005/api/local/info/state

So that part is OK. But still I get the same error after starting this docker command :

WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
GET / 200 33.924 ms - 89
GET /favicon.ico 200 11.450 ms - 15406
GET /api/state 404 12.839 ms - 136
Error: Endpoint not found.
at /usr/src/app/app.js:62:13
at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
at /usr/src/app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
at /usr/src/app/node_modules/express/lib/router/index.js:635:15
at next (/usr/src/app/node_modules/express/lib/router/index.js:260:14)
at Function.handle (/usr/src/app/node_modules/express/lib/router/index.js:174:3)
at router (/usr/src/app/node_modules/express/lib/router/index.js:47:12)
at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
at /usr/src/app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
at /usr/src/app/node_modules/express/lib/router/index.js:635:15
at next (/usr/src/app/node_modules/express/lib/router/index.js:260:14)
at jsonParser (/usr/src/app/node_modules/body-parser/lib/types/json.js:110:7)
at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
at /usr/src/app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
GET /api/local/info/state 200 118.002 ms - 4563

@jeremywillans
Copy link
Owner

GET /api/state 404 12.839 ms - 136

something is trying to reach this URL which is not correct - check and see if its in your configuration somewhere?

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

Also I noticed that I need to run te following according to the documentation :

docker run -name php-nginx -p 3001:8080 -v /<HA_CONFIG>/roomba:/app -e NGINX_WEBROOT=/app webhippie/php-nginx:latest

Not sure what should be. I used the following :

docker run -name php-nginx -p 3001:8080 -v /192.168.1.15:8443/roomba:/app -e NGINX_WEBROOT=/app webhippie/php-nginx:latest

I get this error :

unknown shorthand flag: 'n' in -name
See 'docker run --help'.

@jeremywillans
Copy link
Owner

jeremywillans commented Oct 18, 2024

The -v command needs the first part needs to reflect the
path to your HA config folder. I'm not sure what you have will work?

For the error - You need to use two dashes for name

--name

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

the path to the HA folder ... In what format should that be ? The full URL Like http://192.168.1.15:8443/config ?

@jeremywillans
Copy link
Owner

Are you running docker on the same server as home assistant? It needs to be the full path to the config folder.

If it's on a different server, then you might be better running the HA community store addon

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

Yes, on the same server ... So exactly like this http://192.168.1.15:8443/config. ???

Also when starting nginx docker I get the following error :

docker run --name php-nginx -p 3001:8080 -v /192.168.1.15:8443/config/vacuum:/app -e NGINX_WEBROOT=/app webhippie/php-nginx:latest

docker: Error response from daemon: invalid mode: /app.
See 'docker run --help'.
➜ ~

BIG THANKS FOR YOUR HELP !!!!

@jeremywillans
Copy link
Owner

Actually... What model robot do you have? The php container isn't really needed as iRobot removed the ability to do coordinates in all the i/s/j series

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

I have an irobot Roomba i5 series.

@jeremywillans
Copy link
Owner

Skip the php container, not needed.

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

So, I best remove the nginx php server right ? And then how do I continue with the other errors ?

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

The rest980 container is running still ....

@jeremywillans
Copy link
Owner

Yes you can remove that container.

I suggest reviewing the configuration, specifically the entries in the secrets file

@Tokn59
Copy link
Author

Tokn59 commented Oct 18, 2024

Just to be sure Jeremy, the location of secrets.yaml is in te config folder. The location of the vacuum.yaml also ?

@jeremywillans
Copy link
Owner

Secrets yes.

For the vacuum I recommend using packages feature - it's documented in the instructions

@Tokn59
Copy link
Author

Tokn59 commented Oct 19, 2024

Ok, done, added the packages in configuration.yaml. I see that there are some MQTT entries ... Does this look like "generated" by the RES980 API ?

image

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

No branches or pull requests

3 participants