rfvgyhn / docker-avorion

Docker container for Avorion dedicated server
https://hub.docker.com/r/rfvgyhn/avorion
MIT License
26 stars 12 forks source link

"Error initializing server command line input interface: assign: Operation not permitted" #14

Closed jonathanturcotte closed 2 years ago

jonathanturcotte commented 3 years ago

I'm using the latest tag, image 2.0.0.32377-beta, and am seeing this error on server startup in the docker logs:

"Error initializing server command line input interface: assign: Operation not permitted"

The server seems to run fine but when I tried to enable RCON I'm unable to issue commands to the server, they just hang. I did make sure that I port forwarded 27015 and set an RCON password, and I see the RCON enabled log during startup.

I'm also wondering if this might be related to the fact that I can't do "docker attach" and issue commands, I just get a blank input line and typing commands doesn't seem to do anything. Though I'm honestly not super familiar with docker so this could just be something I'm doing wrong.

Let me know if you need any debug info.

Thanks for the help!

Holt31 commented 3 years ago

I've got the same problem and I know how to use docker. More strangely the container isn't opening the port 27000 like it should. Even when changing the port in the server.ini and expose the port in the Dockerfile, then I still get the same exception.

The funny thing is I use kubernetes to deploy the docker-container. The same config I use worked 1 year ago, now not anymore. Even with the modifications I made.

rfvgyhn commented 2 years ago

Better late then never I suppose (sorry about the late response).

A pseudo-TTY needs to be allocated to prevent that error message. That's --tty or -t for docker and tty: true for docker-compose.

If you want to attach to your container to run commands, you'll need a TTY and also be in interactive mode which is -i for docker. For docker-compose, it's stdin_open: true.

docker run -dti --name avorion \
   -p 27000:27000 \
   -p 27000:27000/udp \
   -p 27003:27003/udp \
   -p 27020:27020/udp \
   -p 27021:27021/udp \
   -p 27015:27015 \
   -v /host/path/saves:/home/steam/.avorion/galaxies/avorion_galaxy \
   rfvgyhn/avorion
BloodyIron commented 3 months ago

@rfvgyhn I'm trying to use the tty and stdin method in kubernetes to get an interactive shell for the Avorion application itself inside the container. I'm using Rancher as a cluster management tool BTW. Without the tty/stdin declarations I can get a shell (with Rancher) inside the container itself, but not entirely sure how to get a CLI for the Avorion Server application itself.

Any advice you can lend on what I might need to do here? Thanks for this container image and any help you can lend! :)

rfvgyhn commented 3 months ago

@BloodyIron Unfortunately, I'm not familiar with kubernetes and Rancher. Just from my random searching, have you tried to use some form of exec with --tty and --interactive enabled? It looks like kubectl exec will talk to the container via the API and might be the way to go about it. Not sure what the equivalent is in Rancher (if it's even different).

BloodyIron commented 3 months ago

@BloodyIron Unfortunately, I'm not familiar with kubernetes and Rancher. Just from my random searching, have you tried to use some form of exec with --tty and --interactive enabled? It looks like kubectl exec will talk to the container via the API and might be the way to go about it. Not sure what the equivalent is in Rancher (if it's even different).

Well Rancher is primarily a convenient admin tool I use to interact with stuff in my k8s clusters. So I'm not sure how much of the functionality it changes (if anything). But currently it (rancher) gives me a CLI within the pod (container in this context) as if it were bash (I think it is bash anyways). So I can traverse the files/folders, do typical Linuxy CLI stuff. But so far I haven't quite figured out how to connect to the CLI for the game server itself.

I'm able to get this when I select "Execute shell" in a nice GUI interface for the pod.

Due to how I have the ecosystem set up, I don't actually declare the execution parameters, I define stuff with YAML manifests. So deployments (containers), services (port openings), PVs/PVCs (storage).

I have the tty part enabled, as there's a kubernetes-centric setting for that. As for the interactive part, uhh I don't yet know :P I still have lots to learn about kubernetes!

So far using rcon I think gets me what I want, but I would like to somehow figure out how to get the (game) server CLI from my tasty Rancher webGUI.