aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
414 stars 185 forks source link

AiiDA Daemon Starts Then Immediately Stops, Failing to Connect to PostgreSQL Database #6336

Closed mahuahuahua closed 2 months ago

mahuahuahua commented 3 months ago

### Describe the bug I am encountering an issue when attempting to start the AiiDA daemon. It appears to start successfully, but when I run verdi status to check its status, it shows that the daemon is not running. Upon checking the logs, it seems there's an issue with connecting to the PostgreSQL database.

Steps to Reproduce Start the AiiDA daemon: verdi daemon start Check the daemon status: verdi status (base)$ verdi daemon start Starting the daemon... RUNNING (base) $ verdi status ✔ config dir: /home/bailingyun/.aiida ✔ profile: On profile profile ✔ repository: /home/bailingyun/.aiida/repository/profile ✔ postgres: Connected as test@localhost:5432 ✔ rabbitmq: Connected to RabbitMQ v3.9.17 as amqp://guest:guest@127.0.0.1:5672?heartbeat=600 Warning: Deleted apparently stale daemon PID file as its associated process<1288312> does not exist anymore ⏺ daemon: The daemon is not running

Error Logs The above exception was the direct cause of the following exception: Traceback (most recent call last): ... django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

Troubleshooting Steps Attempted Verified that the PostgreSQL service is running. Checked firewall settings and found no rules that would block local connections. Reviewed PostgreSQL's pg_hba.conf and postgresql.conf configuration files to ensure settings are correct for local connections. Attempted to restart the PostgreSQL service. None of these steps resolved the issue.

### My environment Linux aiida-core 1.6.9 python 3.7.16

sphuber commented 2 months ago

Unfortunately we don't really support aiida-core v1.6 anymore. Is there a reason you are using this old version and not update to v2?

sphuber commented 2 months ago

I am closing this for now. But please feel free to open if you are still facing issues or cannot migrate to v2