Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

RCON access not working #2

Closed
Leafgard opened this issue Nov 7, 2019 · 8 comments · Fixed by #26
Closed

RCON access not working #2

Leafgard opened this issue Nov 7, 2019 · 8 comments · Fixed by #26
Assignees
Labels
help wanted Extra attention is needed

Comments

@Leafgard
Copy link

Leafgard commented Nov 7, 2019

Hey !

I just created my CSGO container using your Dockerfile !
I did pass the SRCDS_RCONPW with password to environment variables, but RCON access is not working :/
In CSGO, it says "Unable to connect to remote server"..

Do you have a trick, or do you think I missed something ?

When inspecting container, Env array gives the good key with the good password, and it looks like to start the container using -usercon and +rcon_password $SRCDS_RCONPW, so I don't understand why it doesn't work :/

Thanks ! :p

@Saltzmann
Copy link

Saltzmann commented Nov 7, 2019

Hi,

I got it to work by adding EXPOSE 27015/udp and so on for every port at the end of the Dockerfile and then built it from scratch. If you have your image built already you may consider trying to use the -p flag with the docker run command and exposing the ports with udp that way (haven't tried it this way though). Good luck!

@CM2Walki
Copy link
Owner

CM2Walki commented Nov 7, 2019

@Leafgard
Can you give me your full docker run command? I suspect that you missed a port publish like @Saltzmann suggested.

@Leafgard
Copy link
Author

Leafgard commented Nov 7, 2019

@Saltzmann I will try it ! :p Thanks

@CM2Walki It looks like docker run -d --net=host --name=csgo-dedicated -e SRCDS_TOKEN=mytoken -e SRCDS_PW=mypassword -e SRCDS_RCONPW=myrconpassword cm2network/csgo !

But.. why should I expose the port if the used net is host ?

(I mean, i can connect myself to the csgo server using csgo, so why am I unable to connect to RCON xD)

@CM2Walki
Copy link
Owner

CM2Walki commented Nov 7, 2019

Thanks, I was just checking which variation you used and indeed when you use --net=host you don't need to publish any ports, it will mount the host interface directly.

Do you have any secondary interfaces setup? Like a second virtual interface?
Try the solution from here:
https://forums.alliedmods.net/showpost.php?s=35ec7fb3052dd59ba03afcc82a0cc218&p=2268614&postcount=3

Add:
-console -usercon +net_public_adr xx.xx.xx.xx +ip xx.xx.xx.xx -port 27015

I'm fairly sure that shouldn't be necessary but who knows.

@Leafgard
Copy link
Author

Leafgard commented Nov 7, 2019

@CM2Walki Thanks for your response!

I thought the same about port exposure!

To be honest, I don't think there is any other secondary interface, because i'm using a public cloud virtual instance by OVH to make it run ! I should only have one interface on the instance sooo..!

I will try this and give you a feedback as fast as possible! 👍

Thanks for everything again!

@CM2Walki CM2Walki self-assigned this Nov 7, 2019
@CM2Walki CM2Walki added the help wanted Extra attention is needed label Nov 7, 2019
@Leafgard
Copy link
Author

Leafgard commented Nov 7, 2019

It works !! Awesome !!

I manually added the line you told me to, (without playing with Envs, but putting ip directly into the line) and it works nice ! :)

Beautiful ! 🏆

May I tip you somewhere ? ☕️

Thanks again !

@CM2Walki
Copy link
Owner

CM2Walki commented Nov 7, 2019

Glad it works! You don't need to tip me but you could star the repository :)!

@wombastisch
Copy link

Thanks, I was just checking which variation you used and indeed when you use --net=host you don't need to publish any ports, it will mount the host interface directly.

Do you have any secondary interfaces setup? Like a second virtual interface? Try the solution from here: https://forums.alliedmods.net/showpost.php?s=35ec7fb3052dd59ba03afcc82a0cc218&p=2268614&postcount=3

Add: -console -usercon +net_public_adr xx.xx.xx.xx +ip xx.xx.xx.xx -port 27015

I'm fairly sure that shouldn't be necessary but who knows.

Hey quick question - how can I implement those start options in a docker-compose file ?
Tried everything and RCON still gives me this...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants