3 months ago
My Flowndly application deployment is stuck in "Deploying" state for over 8 hours due to persistent SSL certificate chain errors when connecting to Railway's internal PostgreSQL database.
Current Status
Service: flowndly-main
Status: Stuck in "Deploying (08:11)" state
Environment: Production
Project: astonishing-cooperation
Error Details
self-signed certificate in certificate chain
Error: self-signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12)
What I've Tried
SSL Configuration Attempts:
Set POSTGRES_ENABLE_SSL="false" in environment variables
Modified application code to disable SSL for Railway internal connections
Tried rejectUnauthorized: false SSL configuration
Added ?sslmode=disable to DATABASE_URL
Environment Variables Verified:
All required security keys are set
DATABASE_URL is properly configured
REDISHOST is properly configured
All Railway variable substitutions are correct
Service Configuration:
PostgreSQL service (flowndly-database) is healthy
Redis service (flowndly-redis) is healthy
Services are properly connected in Architecture view
Technical Details
Application: Flowndly (Node.js/PostgreSQL/Redis)
Database: Railway PostgreSQL 14
Redis: Railway Redis 7.0
Connection: Internal Railway network (flowndly-database.railway.internal:5432)
Environment Variables:
DATABASE_URL=postgresql://postgres:password@flowndly-database.railway.internal:5432/railway
POSTGRES_ENABLE_SSL=false
APP_ENV=production
Expected Behavior
The application should connect to the PostgreSQL database using Railway's internal network without SSL certificate validation issues.
Actual Behavior
The application fails to start due to SSL certificate chain errors, preventing the deployment from completing.
Questions for Railway Support
SSL Configuration: What is the recommended SSL configuration for internal Railway PostgreSQL connections?
Certificate Trust: How should applications handle Railway's internal self-signed certificates?
Deployment Stuck: How can I force the deployment to proceed or restart it?
Best Practices: What are the recommended settings for Node.js applications connecting to Railway PostgreSQL?
1 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 PostgreSQL SSL connection: "self-signed certificate in certificate chain" on Node.js
🧵 Error: self-signed certificate with Better Auth and TypeORM on Railway
🧵 Failed to prune sessions: Error: self-signed certificate in certificate chain
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 3 months ago