Error: Connection refused (os error 111)

I am trying to deploy my Axum App (Rust). But, on successful build & then on running a function that initializes which includes connecting to databases. It seems failing at connecting with Redis DB.

I have passed the env variable correctly.

The BE code works absolutely fine locally. And I also checked with Heroku. It works fine over there as well. There the problem is with PORT binding. Don’t know what exactly it is.

I am using correct rust code:

	// Create the socket address
	let socket_addr = SocketAddr::from(([0, 0, 0, 0], PORT.parse::<u16>()?));
	tracing::info!("Listening on {}", socket_addr);

	// Bind the listener to the address
	let listener = tokio::net::TcpListener::bind(socket_addr).await?;

	/* Start the server or server the App */
	axum::serve(listener, app).await?;

But, still heroku throws that error.

Anyway need help on Render issue.

It could be because the machine provided at Render doesn’t have CA installed.

send the render’s error logs