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

MongoServerError: Unrecognized expression '$toString' #4211

Open fulup-bzh opened 12 months ago

fulup-bzh commented 12 months ago

Trying to start ev-server on OpenSuSE-15.5 I have an error Unrecognized expression '$toString' that I fail to trace.

My ev-server connect to mongo-DB, I neverthless have an error message after the connection. It looks like this error prevent server from starting its operation as any of the other port REST, OCCP, ... are open as we can see with lsof here after trace.

My configuration is dam-stupid, outside of changing captcha and mongodb credential, everything else come from demo template. (note: I tried with master and v2.7.8 tag)

any idea ?

07/07/2023, 14:35:18 - e-Mobility Server is starting...
07/07/2023, 14:35:18 - NodeJS is started in 'development' mode
[Warning] Missing property 'Monitoring' in config.json
[Warning] Missing property 'Cache' in config.json
07/07/2023, 14:35:18 - Connecting to the Database...
07/07/2023, 14:35:18 - Connecting to 'mongodb'...
07/07/2023, 14:35:18 - Connecting to 'mongodb://evse-admin:<YourPassword>@localhost:27017'
07/07/2023, 14:35:18 - Try to acquire the lock entity 'database' ('check-database') of type 'E' in Tenant ID 'default'
07/07/2023, 14:35:18 - Acquired successfully the lock entity 'database' ('check-database') of type 'E' in Tenant ID 'default'
07/07/2023, 14:35:18 - Released the lock entity 'database' ('check-database') of type 'E' in Tenant ID 'default' after 0.03 secs
07/07/2023, 14:35:18 - Connected to 'mongodb' successfully
07/07/2023, 14:35:18 - Connected to the Database successfully in 0.072 secs
[Warning] Missing property 'Shield' in config.json
07/07/2023, 14:35:18 - MongoServerError: Unrecognized expression '$toString'
sudo lsof -i | grep node
node18    14478   fulup   22u  IPv6 2681696      0t0  TCP localhost:43796->localhost:27017 (ESTABLISHED)
node18    14478   fulup   23u  IPv6 2681697      0t0  TCP localhost:43800->localhost:27017 (ESTABLISHED)
node18    14478   fulup   24u  IPv6 2681698      0t0  TCP localhost:43806->localhost:27017 (ESTABLISHED)
node18    14478   fulup   25u  IPv6 2681699      0t0  TCP localhost:43810->localhost:27017 (ESTABLISHED)
node18    14478   fulup   26u  IPv6 2681700      0t0  TCP localhost:43824->localhost:27017 (ESTABLISHED)
node18    14478   fulup   27u  IPv6 2681701      0t0  TCP localhost:43834->localhost:27017 (ESTABLISHED)
UBT-FJ commented 11 months ago

try this fix:

https://github.com/sap-labs-france/ev-server/issues/4209#issuecomment-1622026873