I’m running a Linux app in an Ubuntu docker image (locally for the time being). For information, the app is built using Untiy 3D, with extension “.x86_64”, and is launched via CMD. The app is meant to listen on port 8008.
In addition, my wep app, which is an Orleans app also runs inside this docker container, Cluster. Cluster is attempting to connect with the Unity app via the port 8008, however I receive a connection refused error, displayed via logs.
I have run toutside of Docker, and the grain successfully connects to Unity app (listener). So I’m somewhat convinced that my limited knowledge of Docker is related to this problem of being unable to connect.
I run the docker image via:
docker run -e XDG_RUNTIME_DIR=/home/user/tmp -p 8008:8008 --network host --name dm_cluster dm-server-cluster
Not sure if -p is required. but I found posts on the interweb regarding this tag and figured I’d give it a whirl.
I’ve exec into the docker image and confirm that my Unity app is running (via “ps aux”). I also tried a netstat inside the bash, though I note that there is nothing listening on port 8008. So perhaps my Unity app is not starting correctly. I don’t see why this should fail to start (works outside of Docker). Though I do note that the app uses a good proportion of the container hardware resources. Not usre if that’s related to it.
You exec into a docker container. The image is just a template. Remember that if you want everyone to understand you.
I am not sure I understand what wants to connect what, but if you got a connection refused error in the log, then your app rpobably wants to connect to a port, but gets “connection refused” and this is why it doesn’t start to listen on any port. Maybe… I can’t say more without a little more information. For example a Dockerfile.
Do I understand it correctly that you want to run multiple processes inside one container?
Hello Rimelek. Apologies for the confusion - I’m newish to Docker so I don’t yet quite communicate the correct terms, though I know what they mean.
Anyway, I managed to acheive what I wanted. I netstat in my container and realised that nothing was listening on my port. Utlitmately, I realised from logs that the Unity app hadn’t started correctly due to display related errors. I applied some fixes and managed to get it all working.
I realised that the app, internal to the dicker image, was not started correctly. As a result, the app was not listening on the port and, as a result, I was unable to connect. I fixed the issue that was preventing the app launch and checked, via net stat, that the port was being listened on. Ultimately, I was able to connect from my grain.