Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./altv-voice-server not starting #3

Closed
Konders opened this issue Aug 8, 2022 · 5 comments
Closed

./altv-voice-server not starting #3

Konders opened this issue Aug 8, 2022 · 5 comments

Comments

@Konders
Copy link
Contributor

Konders commented Aug 8, 2022

if I add echo to entry point, I will see only "server started"
but additionally it must print 'Starting voice server on 0.0.0.0:7798' from altv-voice-server

echo 'server started'
./altv-voice-server

atm output
"server started"

expected output
"server started"
"Starting voice server on 0.0.0.0:7798"

Can't connect to voice server from alt server too

@pixlcrashr
Copy link
Member

pixlcrashr commented Aug 8, 2022

Not reproducible for me when using the current Dockerfile and the following entrypoint.sh script:

#!/bin/bash

ALTV_VOICE_SERVER_HOST=${ALTV_VOICE_SERVER_HOST:-"0.0.0.0"}
ALTV_VOICE_SERVER_PLAYER_HOST=${ALTV_VOICE_SERVER_PLAYER_HOST:-"0.0.0.0"}
ALTV_VOICE_SERVER_PLAYER_PORT=${ALTV_VOICE_SERVER_PLAYER_PORT:-"7799"}
ALTV_VOICE_SERVER_PORT=${ALTV_VOICE_SERVER_PORT:-"7798"}
ALTV_VOICE_SERVER_SECRET=${ALTV_VOICE_SERVER_SECRET:-"1234"}

cat <<EOF >/opt/altv/voice.cfg
host: '$ALTV_VOICE_SERVER_HOST'
playerHost: '$ALTV_VOICE_SERVER_PLAYER_HOST'
playerPort: '$ALTV_VOICE_SERVER_PLAYER_PORT'
port: '$ALTV_VOICE_SERVER_PORT'
secret: '$ALTV_VOICE_SERVER_SECRET'
EOF

echo "server started"

./altv-voice-server

Maybe your problem is caused by Docker's caching.

@pixlcrashr
Copy link
Member

pixlcrashr commented Aug 8, 2022

The problem that you may not connect to the voice is because you have to forward the alt:V voice server ports from the Docker container to your host's network like so:

docker run --rm -it -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release

@Konders
Copy link
Contributor Author

Konders commented Aug 8, 2022

The problem that you may not connect to the voice is because you have to forward the alt:V voice server ports from the Docker container to your host's network like so:

docker run --rm -it -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release

Works fine, but when I'm using -d flag(detach), logs of startup are empty

ubuntu@maizen:~$ sudo docker kill voiceserver
voiceserver
ubuntu@maizen:~$ sudo docker rm voiceserver
voiceserver
ubuntu@maizen:~$ sudo docker run --name voiceserver -d --restart=unless-stopped -e ALTV_VOICE_SERVER_SECRET=1234 -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release-12.10
1a491bf300da7cbef762271188c0ca451c301dc969acce7c6478a2afc51fa2bc
ubuntu@maizen:~$ sudo docker logs 1a491bf300da7cbef762271188c0ca451c301dc969acce7c6478a2afc51fa2bc

(there is must be output of "voice server start bla bla bla"

@pixlcrashr
Copy link
Member

pixlcrashr commented Aug 8, 2022

The problem that you may not connect to the voice is because you have to forward the alt:V voice server ports from the Docker container to your host's network like so:

docker run --rm -it -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release

Works fine, but when I'm using -d flag(detach), logs of startup are empty

ubuntu@maizen:~$ sudo docker kill voiceserver
voiceserver
ubuntu@maizen:~$ sudo docker rm voiceserver
voiceserver
ubuntu@maizen:~$ sudo docker run --name voiceserver -d --restart=unless-stopped -e ALTV_VOICE_SERVER_SECRET=1234 -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release-12.10
1a491bf300da7cbef762271188c0ca451c301dc969acce7c6478a2afc51fa2bc
ubuntu@maizen:~$ sudo docker logs 1a491bf300da7cbef762271188c0ca451c301dc969acce7c6478a2afc51fa2bc

(there is must be output of "voice server start bla bla bla"

You can work around by enabling the TTY mode in Docker. Simply just add the -t param to your command:

docker run --name voiceserver -t -d --restart=unless-stopped -e ALTV_VOICE_SERVER_SECRET=1234 -p 7798:7798/udp -p 7799:7799/udp eisengrind/altv-voice-server:release-12.10

It might be the case that the alt:V server logs by default to STDOUT instead of logging to TTY output (which I think is needed for Docker logs - again, from my understanding).

@Konders
Copy link
Contributor Author

Konders commented Aug 8, 2022

Thanks!

@Konders Konders closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants