EQMacEmu / Server

Other
26 stars 85 forks source link

Client requested a user to world but supplied an invalid id of #50

Closed bullr closed 6 days ago

bullr commented 1 month ago

After updating the loginserver from the old (login.ini) to the new (login.json) on 7/31/2024 I get the following error when logging in a client on the LOCAL NETWORK. Clients from the public side of the router can get through login to character select fine. Note this server has not been updated since 3/17/2024.

The server is sitting at 192.168.42.33 and is a dedicated Linux server

The client is on the 192.168.42.X network at 192.168.42.10

All worked fine before the change from login.ini to login.json. Previously login.ini contained:

local_network = 192.168.42.33 network_ip = 192.168.42.33

And both public and local clients could log in and play on the server.

The login.json file contains:

"client_configuration": { "listen_port": 5998, "local_network": "192.168.42.33", "network_ip": "192.168.42.33",

eqemu_config.json has been left unchanged since the update. The world server connects to the loginserver as expected during startup. Here is the console output when a client on the LOCAL NETWORK clicks the Play EverQuest button from server select screen:

Login | Info | Process client.cpp:Process:99 | Server list request received from client account_name [ACCOUNTNAME] account_id (10) ip_address [192.168.42.10] Login | Info | CreateOldServerListPacket server_manager.cpp:CreateOldServerListPacket:145 | Client is requesting server list from a local address [192.168.42.10] Login | Info | CheckExtraSettings database.cpp:CheckExtraSettings:391 | Entered CheckExtraSettings using type: [pop_count.] Login | Info | CheckExtraSettings database.cpp:CheckExtraSettings:401 | CheckExtraSettings type: [pop_count] exists. Login | Info | Process client.cpp:Process:92 | OP_LoginUnknown1 received from client. Login | Error | SendOldUserToWorldRequest server_manager.cpp:SendOldUserToWorldRequest:258 | Client requested a user to world but supplied an invalid id of 192.168.42.33 . Login | Info | ProcessDisconnect client_manager.cpp:ProcessDisconnect:99 | Client disconnected from the server, removing client.

The output when a PUBILC (Inbound from Internet) client does the same thing:

Login | Info | Process client.cpp:Process:99 | Server list request received from client account_name [ACCOUNTNAME] account_id (3) ip_address [CLIENT-PUBLIC-IP] Login | Info | CheckExtraSettings database.cpp:CheckExtraSettings:391 | Entered CheckExtraSettings using type: [pop_count.] Login | Info | CheckExtraSettings database.cpp:CheckExtraSettings:401 | CheckExtraSettings type: [pop_count] exists. Login | Info | Process client.cpp:Process:92 | OP_LoginUnknown1 received from client. Login | Info | Process world_server.cpp:Process:127 | User-To-World Response received. Login | Info | Process world_server.cpp:Process:130 | Trying to find client with user id of [3.] Login | Info | Process world_server.cpp:Process:162 | Found client with user id of 3 and account name of ACCOUNTNAME. Login | Info | SendPlayResponse client.cpp:SendPlayResponse:392 | Sending play response for account_name [ACCOUNTNAME] account_id (3) ip_address [CLIENT-PUBLIC-IP] Login | Info | ProcessDisconnect client_manager.cpp:ProcessDisconnect:99 | Client disconnected from the server, removing client. World | Info | operator() main.cpp:operator():423 | New connection from CLIENT-PUBLIC-IP:12192 World | Info | operator() main.cpp:operator():437 | Checking inbound connection [CLIENT_PUBLIC-IP] against BannedIPs table World | Info | operator() main.cpp:operator():439 | Connection [CLIENT-PUBLIC-IP] PASSED banned IPs check. Processing connection.

bullr commented 1 month ago

Note: I have tried various combinations of the local_network and network_ip values using the full server IP as well as just the first 3 octets of the network (ie. 192.168.42. ) all producing the same error.

bullr commented 1 week ago

Turns out the new loginserver does not play well with local clients and a world address specified in a dns name pointing to a public address on the outside of the router. This never was an issue in the older loginservers for takp. To fix this I needed to change the following:

"world": { "address": "public.domain.name", "local_address": "192.168.1.10",

TO

"world": { "address": "192.168.1.10", "local_address": "192.168.1.10",

And the issue is resolved for local clients. I now need to verify things still work for external clients in this configuration though. Hoping that port forwarding just works as intended and the public address is not needed in that 'address' field.

Edit: Tested from a remote client and it does not pass the client through to the world after login and server select. So in this case the address field needs to be set to the public IP address or the dns name for it to work for remote clients. Seems to be some sort of issue that crept in here that is causing this.

bullr commented 3 days ago

Confirmed the merge fixed the issue. Thank you!