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

Auth Server not connecting to Master Server #84

Closed
saltshaker opened this issue Dec 7, 2021 · 4 comments
Closed

Auth Server not connecting to Master Server #84

saltshaker opened this issue Dec 7, 2021 · 4 comments

Comments

@saltshaker
Copy link
Contributor

When running the Master Server, I get the following output:
image

The Destroying MySQL connection! is occurring because the Auth Server is breaking from the main while loop in AuthServer.cpp. The auth dServer gets constructed properly, but 30 frames pass without receiving a packet from master, so it shuts down. I've done a fair amount of additional logging to make sure this is what is happening, but I can't figure out why the connection isn't happening.

I am running this on Debian 10. I have external_ip in masterconfig.ini, authconfig.ini, and chatconfig.ini set to my machine's external ip and I have changed the client's boot.cfg to point to this ip as well. When attempting to login on the client, it always gives the "We could not sign you in to LEGO Universe." and the server does not recognize any attempted connections. I have tried re-running the Auth Server while the Master Server is running using sudo ./AuthServer, which results in the Auth Server shutting down with the same message.

This issue doesn't occur if the server config files have the external_ip set to localhost, but my client is on a different machine so that doesn't really help me. When signing in with this setup, the server does recognize an attempted connection, but then runs into the same issue as #45

@leolion3
Copy link

leolion3 commented Dec 7, 2021

Within the masterconfig ini set the Authserver and Chatserver to both be run as sudo (by changing the zero to a one). This fixed it in my case.

@saltshaker
Copy link
Contributor Author

Within the masterconfig ini set the Authserver and Chatserver to both be run as sudo (by changing the zero to a one). This fixed it in my case.

The Auth Server was already set to do this, but I changed the Chat Server do be run as sudo as well. Did not change the behavior. I've tried running the world server as sudo as well to no effect.

@CitrusHappy
Copy link

#40

@saltshaker
Copy link
Contributor Author

Ok I found a solution. Hopefully this helps someone else.

To clarify further, I'm running this on Google Cloud Platform. I have a static external ip set up with the vm I'm running but the server cannot bind to this ip. So the solution is to create a virtual network interface to allow the server to use this external ip.

First make sure the dummy kernel module is loaded.

$ sudo lsmod | grep dummy
$ sudo modprobe dummy
$ sudo lsmod | grep dummy

That should output something like
dummy 16384 0

Next create the network interface
$ sudo ip link add eth10 type dummy
This can be confirmed using

$ ip link show eth10
3: eth10: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether a2:f3:20:7e:6e:6a brd ff:ff:ff:ff:ff:ff

Finally create an alias for the network to link it with the external ip.

$ sudo ip addr add EXTERNAL_IP brd + dev eth10 label eth10:0

And confirm it with

$ ip a | grep -w inet
    inet 127.0.0.1/8 scope host lo
    inet 10.182.0.3/32 brd 10.182.0.3 scope global dynamic ens4
    inet 34.125.78.143/32 scope global eth10:0

This likely doesn't fix all of the destroying mysql connection issues that people are running into, but that should fix it if just the auth server is failing.

Based on stack exchange post here.

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

3 participants