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

Dynamic ip issue #348

Open
styla01 opened this issue May 3, 2018 · 8 comments
Open

Dynamic ip issue #348

styla01 opened this issue May 3, 2018 · 8 comments

Comments

@styla01
Copy link

styla01 commented May 3, 2018

Hello guys,
I have dynamic IP and in the config i added my domain name www.xyz.com, but there is a problem. If the IP are changed (router restart ) players can't join in game. They can join only if I restart the pvpgn server.
Can be make it a fix? Thanks

I use pvpgn for w3 and into windows server.

@cen1
Copy link
Collaborator

cen1 commented May 3, 2018

Either get a static IP or use dynamic DNS service. This is not a pvpgn problem.

@styla01
Copy link
Author

styla01 commented May 3, 2018

I can't get static IP. My dynamic DNS work great for a icecast server or the ghost++ after router is restarted. The problem is pvpgn server, because cant check and update for the new IP

@cen1
Copy link
Collaborator

cen1 commented May 3, 2018

What is your servaddrs in bnetd.conf?

@TurBoss
Copy link

TurBoss commented May 3, 2018

could address_translation.conf support domain names too?

@styla01
Copy link
Author

styla01 commented May 3, 2018

servaddrs = ":" # default interface (all) and default port (6112)

and from adress_translation:
192.168.1.1:6137 ingame.go.ro:6137 NONE ANY

@cen1
Copy link
Collaborator

cen1 commented May 3, 2018

Apparently address translation does support domain names but it only loads them on pvpgn startup so when IP changes pvpgn will keep translating on old address.

Digging through https://github.com/pvpgn/pvpgn-server/blob/74b06d022b0b61538590e8c30ec20830ebdd3c5c/src/bnetd/server.cpp it seems that you can send a POSIX signal to pvpgn process to reload various configurations via restart_action -> restart_sig_handle. One of the enums is restart_mode_transfile which is number 14 in enumeration.

So if I understand correctly, sending a SIGHUP to process shoud reload it. if this actually works you could setup a cronjob to trigger the reload periodically.

This is just quick digging around, I could be wrong.

One way it could be fixed programatically is to trigger the reload periodically from code via some config option but I'm not sure it's worth the effort, that is ofc my personal opinion and anyone is free to patch this in.

edit: Also, it seems /rehash transfile will do the exact same thing

@styla01
Copy link
Author

styla01 commented May 4, 2018

Thank you Cen for the elaborate solution.
I will wait to be integrated in future releases because is over my skill

@cen1
Copy link
Collaborator

cen1 commented May 4, 2018

Try to run /rehash transfile next time your IP changes and see if it actually works. Then, the easiest workaround would be to setup a chat bot that sends this command every minute.

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

4 participants
@TurBoss @cen1 @styla01 and others