Server Error DSMR-reader #1463
-
Hello there, I got the following error:
I check the following things:
What stuff do i use:
If need more information i will provide. |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments
-
It has something to do with the DB is guess, because if i use the ./deploy.sh i get the error below
|
Beta Was this translation helpful? Give feedback.
-
Hi, DSMR-reader is unable to connect to the database. If you are not running it on the same host/container, you will need to change the hostname used by the database client (DSMR-reader). See: If the DB can then be reached, but DSMR-reader is still unable to connect, the error message should at least change. You can also try
|
Beta Was this translation helpful? Give feedback.
-
Hi Dennis, When i try to telnet to 127.0.0.1 and port 5432 the connection is refused. |
Beta Was this translation helpful? Give feedback.
-
Are you running the database in Docker or did you install it directly into Ubuntu? Are you using docker-compose? Where is the DB running and where DSMR-reader? |
Beta Was this translation helpful? Give feedback.
-
I made a mistake to say my DSMR was in docker my HA is in docker, but DSMR is just a vitrual machine with ubuntu and i installed the docker on the Ubuntu machine. I followed this guide https://dsmr-reader.readthedocs.io/nl/v4/how-to/installation/quick.html So the DB running where die DSMR-reader is. |
Beta Was this translation helpful? Give feedback.
-
Are you sure PostgreSQL is running? If they are installed on the same host, the connection should be fine. If either runs on another host, then you'll need to allow "external" connections to the DB. Try:
Sample:
Check whether the DB port is bound and accepting connections:
E.g.:
|
Beta Was this translation helpful? Give feedback.
-
Yes, for sure is running When i sudo service postgresql status the following shows up.
When i try sudo netstat -plant | grep 5432 it gives no result, but when i do sudo netstat -plat the following shows up and i don't see any port 5432 between it.
|
Beta Was this translation helpful? Give feedback.
-
Are you sure that you used
Anyway, if it doesn't show up it's expected, since no connection could be made anyway. Next step is checking whether the DB actually runs, despite the service status.
E.g.:
Next, check the port set for the DB its config:
E.g:
|
Beta Was this translation helpful? Give feedback.
-
sudo ps faux | grep postgres
It is getting me more and more confusing, because when i try the command sudo grep port /etc/postgresql/11/main/postgresql.conf he comes with the message "No such file or directory" When i browse trough the files there is no folder "11" there is stops Ah found it i needed to use sudo grep port /etc/postgresql/12/main/postgresql.conf It comes with the following:
|
Beta Was this translation helpful? Give feedback.
-
You seem to run the commands as
If not, any Can you Because I see no reason why the DB should not run or cannot be accessed. In the end, try |
Beta Was this translation helpful? Give feedback.
-
This command did the trick! root@dsmr-Virtual-Machine:/home/dsmr# sudo systemctl restart postgresql.service The webinterface is showing up again but no value's |
Beta Was this translation helpful? Give feedback.
-
Great! Now it should run fine. If you do not see data after a few minutes, check the logs: Or perform a manual reading:
This assumes you've completed the (quick) installation and added the
|
Beta Was this translation helpful? Give feedback.
-
Oh, don't forget to run the deploy script once first:
Assuming you finished the installation before. The migrations should now run fine there. |
Beta Was this translation helpful? Give feedback.
-
Everthing is working fine, but only the live "usages" and "return" are not coming up. The ./deploy is working aswell. sudo tail -f /var/log/supervisor/dsmr_webinterface* sudo tail -f /var/log/supervisor/dsmr_webinterface* sudo tail -f /var/log/supervisor/dsmr_datalogger* ==> /var/log/supervisor/dsmr_datalogger.log.1 <== sudo tail -f /var/log/supervisor/dsmr_backend* (dsmrreader) dsmr@dsmr-Virtual-Machine:~/dsmr-reader$ sudo tail -f /var/log/supervisor/dsmr_backend* Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html ==> /var/log/supervisor/dsmr_backend.log.1 <== The above exception was the direct cause of the following exception: Traceback (most recent call last): ==> /var/log/supervisor/dsmr_backend.log.3 <== ==> /var/log/supervisor/dsmr_backend.log.4 <== The above exception was the direct cause of the following exception: Traceback (most recent call last): ==> /var/log/supervisor/dsmr_backend.log.5 <== |
Beta Was this translation helpful? Give feedback.
-
I just made a new Ubuntu server same version as before and use the guide what i showed before and now the live data is showing up. |
Beta Was this translation helpful? Give feedback.
-
Awesome! I assume everything works properly now. If not, always feel free to follow up later. |
Beta Was this translation helpful? Give feedback.
I just made a new Ubuntu server same version as before and use the guide what i showed before and now the live data is showing up.