sap-labs-france / ev-server

The Open e-Mobility Charging Station management backend server (check also ev-dashboard and ev-mobile)
https://open-e-mobility.fr/
Apache License 2.0
141 stars 132 forks source link

Server running in Docker container, connecting via postman fails #4225

Closed gasparuff closed 6 months ago

gasparuff commented 6 months ago

I successfully setup ev-server using Docker, but when I try to connect to the Webservice using postman, I'm getting an error:

image

Launching the docker container looks fine, according to the logs:

--------------------------------------------------------
 docker-compose-wait 2.7.3
---------------------------
Starting with configuration:
 - Hosts to be waiting for: [ev_mongo:27017]
 - Timeout before failure: 90 seconds
 - TCP connection timeout before retry: 5 seconds
 - Sleeping time before checking for hosts availability: 0 seconds
 - Sleeping time once all hosts are available: 3 seconds
 - Sleeping time between retries: 1 seconds
--------------------------------------------------------
Checking availability of ev_mongo:27017
Host ev_mongo:27017 is now available!
--------------------------------------------------------
Waiting 3 seconds after hosts availability
--------------------------------------------------------
docker-compose-wait - Everything's fine, the application can now start!
--------------------------------------------------------
2023-12-27T16:03:27: PM2 log: Launching in no daemon mode
2023-12-27T16:03:27: PM2 log: App [start:0] starting in -fork mode-
2023-12-27T16:03:27: PM2 log: App [start:0] online
[Warning] Missing property 'Firebase' in config.json
12/27/2023, 4:03:32 PM - e-Mobility Server is starting...
12/27/2023, 4:03:32 PM - NodeJS is started in 'production' mode
[Warning] Missing property 'OICPService' in config.json
[Warning] Missing property 'Monitoring' in config.json
[Warning] Missing property 'Cache' in config.json
12/27/2023, 4:03:32 PM - Connecting to the Database...
12/27/2023, 4:03:32 PM - Connecting to 'mongodb'...
12/27/2023, 4:03:32 PM - Connecting to 'mongodb://evse-user:evse-user-pwd@mongodb:27017/evse?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1'
12/27/2023, 4:03:32 PM - Connected to 'mongodb' successfully
12/27/2023, 4:03:32 PM - Connected to the Database successfully in 0.346 secs
[Warning] Missing property 'Shield' in config.json
12/27/2023, 4:03:32 PM - Migration is starting...
12/27/2023, 4:03:32 PM - Migration has been run successfully in 0.025 secs
12/27/2023, 4:03:32 PM - Starting Rest Server...
12/27/2023, 4:03:32 PM - Starting Soap Server...
12/27/2023, 4:03:32 PM - Starting Json Server...
12/27/2023, 4:03:32 PM - Json Server listening on 'http://localhost:8010'
12/27/2023, 4:03:32 PM - Starting Ocpi Server...
12/27/2023, 4:03:32 PM - Starting OData Server...
12/27/2023, 4:03:32 PM - Scheduler is starting...
12/27/2023, 4:03:32 PM - Rest Server listening on 'http://127.0.0.1:81'
12/27/2023, 4:03:32 PM - Soap Server listening on 'http://127.0.0.1:8000'
12/27/2023, 4:03:32 PM - Ocpi Server listening on 'http://127.0.0.1:9090'
12/27/2023, 4:03:32 PM - OData Server listening on 'http://127.0.0.1:9292'
12/27/2023, 4:03:32 PM - Scheduler has been started successfully in 0.228 secs
12/27/2023, 4:03:32 PM - Async Task manager is starting...
12/27/2023, 4:03:32 PM - Async Task manager has been started successfully in 0.014 secs
12/27/2023, 4:03:32 PM - Local car catalogs are being imported...
12/27/2023, 4:03:32 PM - Local car catalogs has been imported successfully in 0.042 secs
12/27/2023, 4:03:32 PM - Rest, Soap, Json, Ocpi, OData server has been started successfully in 0.75 secs

I'm attaching my config.json file, which pretty much equals the default configuration.

config.json

Can somebody please help me? It feels like I'm almost there...

EDIT: managed to figure out I need a qualified URL, which I'm using now. Unofrutnately I'm having the same results. new URL: ws://10.53.9.219:8010/OCPP16/659047722f14b88bc2d0bb85/65904a932f14b88bc2d0beb6/CS-BASIC-00010

gasparuff commented 6 months ago

Alright, I finally managed to make it work! My charging station was in a different network than my OCPP backend and the firewall wouldn't allow any traffic on port 8010... I gained quite a lot of experience in working with this whole thing and I'm really grateful for it. If anyone else needs help connecting, I'm happy to help with my basic knowledge :).