You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

配置Rundeck的MySQL后服务停止,访问报HTTP 503错误

Troubleshooting Rundeck 503 Error After Configuring MySQL

Been there, done that—configuring MySQL for Rundeck and hitting a 503 is super common, almost always tied to bad connection settings or missing dependencies. Let’s walk through the fix step by step:

1. Double-Check Your rundeck-config.properties MySQL Settings

First, make sure your database config is spot-on. Here’s what a valid MySQL setup should look like (adjust values to match your environment):

# Database configuration
dataSource.driverClassName=com.mysql.cj.jdbc.Driver
dataSource.url=jdbc:mysql://your-mysql-host:3306/rundeck_db?autoReconnect=true&useSSL=false&serverTimezone=UTC
dataSource.username=rundeck_db_user
dataSource.password=your_secure_password
rundeck.projectsStorageType=db
rundeck.storage.provider.1.type=db
rundeck.storage.provider.1.path=keys

Key things to verify:

  • If you’re using MySQL 8+, use com.mysql.cj.jdbc.Driver (not the old com.mysql.jdbc.Driver).
  • The JDBC URL includes correct host, port, database name, and critical parameters like serverTimezone (mandatory for MySQL 8+).
  • Username/password have no typos, and the user has explicit access to the target database.

2. Ensure MySQL JDBC Driver Is Installed

Rundeck doesn’t ship with the MySQL driver out of the box. You need to download the correct driver JAR and drop it into Rundeck’s lib directory:

  • For RPM/deb installs: Copy mysql-connector-java-8.x.x.jar to /var/lib/rundeck/lib
  • For manual installs: Copy it to /opt/rundeck/server/lib
    After adding the driver, restart the Rundeck service to apply changes:
sudo systemctl restart rundeckd

3. Dig Into Rundeck’s Startup Logs

The 503 error is a generic "service down" message—real clues are hidden in the logs. Check the main service log:

tail -f /var/log/rundeck/service.log

Or the server-specific log:

tail -f /opt/rundeck/server/logs/rundeck.log

Look for these common error patterns:

  • Cannot create PoolableConnectionFactory: Usually means wrong credentials, missing database, or network blocks between Rundeck and MySQL.
  • ClassNotFoundException: com.mysql.cj.jdbc.Driver: Means the JDBC driver is missing or placed in the wrong directory.

4. Verify MySQL Database Accessibility

Test if Rundeck can reach your MySQL server from its host:

  1. Use the MySQL client to connect with the exact credentials from your Rundeck config:
mysql -u rundeck_db_user -p -h your-mysql-host
  1. If connection fails, fix these common issues:
    • MySQL firewall rules allow traffic from Rundeck’s IP on port 3306.
    • The MySQL user has permissions to connect from Rundeck’s host (run GRANT ALL PRIVILEGES ON rundeck_db.* TO 'rundeck_db_user'@'rundeck-host-ip' IDENTIFIED BY 'your_password'; then FLUSH PRIVILEGES;).
    • The rundeck_db database exists (create it with CREATE DATABASE IF NOT EXISTS rundeck_db; if missing).

5. Check Rundeck Service Status

Make sure the service is actually running (sometimes it crashes silently on startup):

sudo systemctl status rundeckd

If it’s failed, start it manually and watch for immediate errors:

sudo systemctl start rundeckd
journalctl -u rundeckd -f

Common Gotchas to Watch For

  • MySQL Version Compatibility: Rundeck 4.x and above require MySQL 5.7+ (preferably 8.x). Older versions will cause compatibility breaks.
  • SSL Settings: If your MySQL server enforces SSL, adjust the JDBC URL to useSSL=true and add truststore configurations if needed.
  • File Permissions: Ensure the Rundeck user (usually rundeck) has read access to the JDBC driver JAR and rundeck-config.properties file.

内容的提问来源于stack exchange,提问作者Sudhir Gosavi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 07:06:15