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

Issue logging in #45

Closed
Tomifier05 opened this issue Dec 6, 2021 · 19 comments
Closed

Issue logging in #45

Tomifier05 opened this issue Dec 6, 2021 · 19 comments
Labels
help wanted Extra attention is needed P-low This issue can affect gameplay, but does not prevent a user from playing or progressing

Comments

@Tomifier05
Copy link

I'm recognized by the server but my client says "enter nickname/password", then shows me the login again.

@Landshark77
Copy link

if the server is not running on the same machine as the client, make sure to update the external_ip setting in the three ini files with the IP address of your server.

@leolion3
Copy link

leolion3 commented Dec 6, 2021

DId you correctly configure the client version in CMakeVariables.txt? What is AuthServer in the client config set to?
If running locally AuthServer should be set to "localhost". If running the server in WSL the MasterServer needs to be executed as sudo.

@Luteinizing
Copy link

Luteinizing commented Dec 6, 2021

I had the same issue;
I used 171022 in CMakeVariables.txt,; files from server client came from blast, tried connecting with both blast and nexus clients.

External_ip settings in each ini matches the public external ip.

running on ubuntu 20.04.3 LTS and has been executed as sudo
Also get " [Server]: Unknown packet ID from master: 21"

Would appreciate any other ideas

@QuirkyTurtle101
Copy link

I'm having this issue, as well, with people outside of my LAN trying to join. To add - I've confirmed that I'm using the same exact client as my remote player, and that all my INI files are set up correctly, and all the ports that need forwarding should be forwarded. When he attempts to join the server, I get the following in my server's command line:

[07-12-21 00:03:49] [AuthPackets]: Received client version: 171022
[07-12-21 00:03:49] [MasterServer]: Received zone transfer req
[07-12-21 00:03:49] [InstanceManager]: Searching for an instance for mapID 0/0
[07-12-21 00:03:49] [MasterServer]: Instance: 0/0/0 -> 1
[07-12-21 00:03:49] [MasterServer]: Instance: 1200/0/9 -> 0
[07-12-21 00:03:49] [MasterServer]: Instance: 1900/0/10 -> 0
[07-12-21 00:03:49] [MasterServer]: Instance: 1201/0/12 -> 0
[07-12-21 00:03:49] [MasterServer]: Responding to transfer request 8 for zone 0 0
[07-12-21 00:03:49] [MasterServer]: Sent affirmation request 8 to 0/0
[07-12-21 00:03:49] [MasterServer]: Got affirmation request of transfer 8
[07-12-21 00:03:49] [MasterServer]: Got affirmation of transfer 8
[07-12-21 00:03:49] [MasterServer]: Affirmation complete 8
[07-12-21 00:03:50] [AuthPackets]: Set sessionKey: 1350490027 for user Omega
[07-12-21 00:03:50] [MasterServer]: Got sessionKey 1350490027 for user Omega
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21
[07-12-21 00:03:50] [Server]: Unknown packet ID from master: 21

@JenniferPylko
Copy link

I'm also having the same issue (works on my network, doesn't work for people outside my network). Here's the output of netstat -l on the server vm:

Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5001            0.0.0.0:*               LISTEN
tcp        0      0 localhost:mysql         0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:http            0.0.0.0:*               LISTEN
tcp        0      0 localhost:domain        0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
udp        0      0 0.0.0.0:2000            0.0.0.0:*
udp        0      0 0.0.0.0:2005            0.0.0.0:*
udp        0      0 0.0.0.0:2006            0.0.0.0:*
udp        0      0 0.0.0.0:3001            0.0.0.0:*
udp        0      0 0.0.0.0:3002            0.0.0.0:*
udp        0      0 0.0.0.0:3003            0.0.0.0:*
udp        0      0 0.0.0.0:3007            0.0.0.0:*
udp        0      0 0.0.0.0:3008            0.0.0.0:*
udp        0      0 0.0.0.0:3009            0.0.0.0:*
udp        0      0 0.0.0.0:3010            0.0.0.0:*
udp        0      0 0.0.0.0:3011            0.0.0.0:*
udp        0      0 0.0.0.0:3012            0.0.0.0:*
udp        0      0 0.0.0.0:3016            0.0.0.0:*
udp        0      0 0.0.0.0:3017            0.0.0.0:*
udp        0      0 0.0.0.0:3018            0.0.0.0:*
udp        0      0 0.0.0.0:3019            0.0.0.0:*
udp        0      0 0.0.0.0:3020            0.0.0.0:*
udp        0      0 0.0.0.0:3021            0.0.0.0:*
udp        0      0 localhost:domain        0.0.0.0:*
udp        0      0 0.0.0.0:1001            0.0.0.0:*
udp        0      0 0.0.0.0:1002            0.0.0.0:*
raw6       0      0 [::]:ipv6-icmp          [::]:*                  7

and my relevant NAT setup (we're all using the exact same boot.cfg, whether on the network or not, as i have set up a hairpin in addition to the outside-in rules, so i find it very odd that the problem is with users on a different network):

image

image

and auth server logs: (benzoic and typhon are on the same network as the server, celery is on a different network)

[06-12-21 23:15:15] [AuthServer]: Starting Auth server...
[06-12-21 23:15:15] [AuthServer]: Version: 1.0
[06-12-21 23:15:15] [AuthServer]: Compiled on: Sun Dec  5 21:05:43 2021
[06-12-21 23:15:15] [dServer]: Server is listening on 172.16.1.69:1001 with encryption: 1
[06-12-21 23:15:16] [Server]: Established connection to master
[06-12-21 23:17:17] [AuthPackets]: Received client version: 171022
[06-12-21 23:17:18] [AuthPackets]: Set sessionKey: 1804289383 for user benzoic
[07-12-21 00:00:14] [AuthPackets]: Received client version: 171022
[07-12-21 00:00:14] [AuthPackets]: Set sessionKey: 846930886 for user typhon
[07-12-21 00:01:24] [AuthPackets]: Received client version: 171022
[07-12-21 00:01:24] [AuthPackets]: Set sessionKey: 1681692777 for user celery
[07-12-21 00:01:59] [AuthPackets]: Received client version: 171022
[07-12-21 00:02:00] [AuthPackets]: Set sessionKey: 1714636915 for user celery
[07-12-21 00:02:00] [Server]: Unknown packet ID from master: 21

i was successfully able to sign in with celery's credentials on my computer and i was able to connect.

@JenniferPylko
Copy link

I found the problem. In the ini files, the "public IP" must literally be the public IP, it's not the IP the server binds to. I had the server's local IP address but I needed to put in my firewall's outside IP address. Well, technically domain name. The comment in the ini files should probably be changed to read something like "the public address clients will use to connect, it should match the AUTHSERVERIP variable in the client boot.cfg. 'localhost' will work for servers running on the same machine as the client".

@Liam3997
Copy link

Liam3997 commented Dec 7, 2021

Just ran into this too. Changing the IP in boot.cfg and the server config files to match fixed the issue. Any way an error could be logged on the server side if a client attempts to connect with a different IP than what's set in the server config files?

@JenniferPylko
Copy link

JenniferPylko commented Dec 7, 2021

I think it would take a bit of cleanup, the code seems to be confused as to whether it's an IP address or if it can be a domain name and whether it's binding to it or doing something else with it, considering this line in dNet/dServer.cpp:

mLogger->Log("dServer", "Server is listening on %s:%i with encryption: %i\n", ip.c_str(), port, int(useEncryption));

in the configuration i have that "ip address" set to a dns name, so i get this in the log:

[07-12-21 00:51:39] [dServer]: Server is listening on [redacted dns name]:1001 with encryption: 1

but clearly it's not listening on [redacted dns name], since that makes no sense, and it means something else which is probably why a bunch of people are running into this issue.

@codeshaunted
Copy link
Member

codeshaunted commented Dec 7, 2021

You should be setting this to your public facing IP, I’m not sure this is really an issue with any of our code.

@Liam3997
Copy link

Liam3997 commented Dec 7, 2021

Hm, my WSL2 DarkflameServer instance doesn't seem to like it when I set the external_ip to my public facing IP. It refuses to bind to anything except localhost or the current WSL2 hostname, neither of which are publicly accessible. Is this potentially just an issue with WSL2's routing?

@JenniferPylko
Copy link

Yeah @averysumner it's not a problem with your code, i was only making recommendations for changes to comments and logging messages, not behavior.

@JenniferPylko
Copy link

@Liam3997 what do you mean by it doesn't like it?

@Liam3997
Copy link

Liam3997 commented Dec 8, 2021

As in, it will attempt to listen on the public IP, and then almost immediately shut down and destroy its connections to the MySQL database. When using localhost or the WSL2 hostname, it starts up and runs just fine

@JenniferPylko
Copy link

That sounds like your NAT isn't set up correctly and it's not actually able to connect via the public IP.

@Liam3997
Copy link

Liam3997 commented Dec 8, 2021

After doing a lot of research, it appears this is a quite infamous issue with WSL2. I've opened a new issue to move relevant discussion there: #110

@Morthi
Copy link

Morthi commented Dec 9, 2021

Did you get it working with WSL1 @Liam3997 ?

@MickVermeulen MickVermeulen added help wanted Extra attention is needed P-low This issue can affect gameplay, but does not prevent a user from playing or progressing labels Dec 9, 2021
@gudenau
Copy link

gudenau commented Dec 30, 2021

I'm having some issues logging in myself, I'm wondering if it has to do with a missing port forward in my configuration.

I have a docker image running with the server and account manager and the database in it's own container, both containers share the same virtual network and the database connections appear to work.

I have the following port ranges exported:

  • 5000:5000
  • 1001:1001/udp
  • 2000:2000/udp
  • 2005:2005/udp
  • 3000-3300:3000-3300/udp

The IP I told the server to use via the configurations is 192.168.1.207, because I am not intending to let people outside my LAN from connecting for now.

I tried changing the boot.cfg file to have both

AUTHSERVERIP=0:192.168.1.207

and

AUTHSERVERIP=0:192.168.1.207,

I can use Firefox to connect to the account manager no problem, I was able to generate keys and everything. When trying to connect (via WINE if that matters) the client says it can't connect.

Does anyone know what I might be doing wrong here? I can recreate the primary container without too much fuss. I have all of the important files outside of it.

@codeshaunted
Copy link
Member

This seems to have been superseded by #110. Closing.

@gudenau
Copy link

gudenau commented Feb 17, 2022

That was WSL2, I was using Linux outside of a VM like WSL2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed P-low This issue can affect gameplay, but does not prevent a user from playing or progressing
Projects
None yet
Development

No branches or pull requests