修改PostgreSQL集群端口后Atlassian Confluence无法启动求助
Hey John, let's walk through this startup issue step by step. Since you've already updated the port in your confluence.cfg.xml, here are the most common checks to identify what's going wrong:
1. Verify PostgreSQL 9.6 Cluster Reachability
First, rule out basic connectivity issues. Test if you can connect to the new PostgreSQL cluster directly from the Confluence server using the psql client (replace confluence_user with your actual database username):
psql -h localhost -p 5433 -U confluence_user confluence
- If this fails with "Connection refused", confirm the PostgreSQL cluster is running and listening on port 5433.
- If it fails with authentication errors, check your
pg_hba.conffile to ensure it allows connections fromlocalhostfor the Confluence database user. Look for an entry like:
(Note: PostgreSQL 9.6 may usehost confluence confluence_user 127.0.0.1/32 md5scram-sha-256by default, which older Confluence versions might not support—switching tomd5here could resolve auth issues.)
2. Double-Check confluence.cfg.xml Edits
It's easy to miss a typo when modifying config files:
- Confirm the JDBC URL line is exactly correct, no extra spaces or typos:
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5433/confluence</property> - Verify the database username and password properties below the URL are still valid for your PostgreSQL 9.6 cluster (cluster upgrades sometimes reset or modify user credentials):
<property name="hibernate.connection.username">confluence_user</property> <property name="hibernate.connection.password">your_secure_password</property>
3. Dig Into Confluence Logs for Exact Errors
The most reliable way to diagnose startup failures is checking Confluence's log files. Look in your Confluence installation directory for:
logs/atlassian-confluence.log: Contains application-specific errors (e.g., database connection failures, missing dependencies).logs/catalina.out: If Confluence is running on Tomcat, this log will show server-level startup issues.
Common errors to look for:
org.postgresql.util.PSQLException: Connection refused: PostgreSQL isn't listening on 5433, or firewall rules are blocking the port.FATAL: password authentication failed for user "confluence_user": Credentials are wrong, orpg_hba.confhas incorrect auth settings.database "confluence" does not exist: The database wasn't migrated or created in the new PostgreSQL cluster.
4. Confirm PostgreSQL Port Listening Status
Make sure PostgreSQL 9.6 is actually listening on port 5433. Run this command on the PostgreSQL server:
netstat -tuln | grep 5433
You should see an entry showing 0.0.0.0:5433 or 127.0.0.1:5433 (depending on your bind address config). If nothing shows up, check your postgresql.conf file to ensure port = 5433 is set and the service was restarted after changing it.
Once you've run through these checks, you'll likely have a clear direction to fix the issue. If you find a specific error in the logs, feel free to share it for more targeted help!
内容的提问来源于stack exchange,提问作者JohnDough

