"Already in use" error when deploying Scala play
Hi all, I'm trying to deploy an example Scala play application, I've gone through the nixpacks scala docs and have built the package like it said, then I included the 2 service variables as shown in the second screenshot. However I'm getting this "Already in use" error.
Its my first time using railway so i just wanted to test it out. Please let me know if there is anything else I'm missing.
Service id: 700352af-cb3a-4d49-aa93-b1e2a0dc62ee
Thanks in advance
10 Replies
Project ID:
700352af-cb3a-4d49-aa93-b1e2a0dc62ee
Smells like a bug, have you tried redeploying?
you can do that by clicking on the 3 dots on the right of your deploy and clicking "redeploy"
Just tried redeploying but still getting the same issue
You are using the port railway provides, right? (
env.PORT
) "?Ah i had mine set up as
PORT
The build is active and i've generated a domain but got "Application failed to respond"
yea that normally happens when your application has a problem with its host and or port:
https://docs.railway.app/troubleshoot/fixing-common-errors
Okay, at least its deployed now.
I'll play with how I set the host and port env variables and see if I can get that figured out
If i get it sorted out I'll post in here
Thanks for the help @Fragly
No problem, good luck
Managed to get it working by overriding the port in the start command in the settings deploy section
./target/universal/stage/bin/main -Dhttp.port=$PORT
application.conf looks something like this