Can't connect to own server

Added by fox1980 almost 8 years ago

I followed the instructions and compiled both the client and the server just fine.
I also followed the instructions to create the mysql database and set everything up according to the tutorial.
When i was trying to connect to the server on my local network i could connect just fine, but when trying from the internet the client just hangs.
I have forwarded port 40916 to the machine running the server but i still can't connect through the internet. The client authenticates OK, but then hangs on "Connecting", when i check the client log there's lots of lines like this at the end:

2010/09/13 18:59:10 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:10 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:11 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:11 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:11 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:12 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:12 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:12 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:13 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:13 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:13 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:13 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:14 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:14 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:14 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:15 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:15 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'
2010/09/13 18:59:15 INF 106c client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02CD4178]: sent LOGIN cookie='0103B459|58F22001|00000001'

It seems to have entered an endless loop. Do i need to open any more ports ?


Replies (25)

RE: Can't connect to own server - Added by molator almost 8 years ago

The answer is here :)

http://dev.ryzom.com/wiki/ryzom/ClientConnectErrors

Client looping before character selection¶

2010/07/13 19:47:42 INF 104 client_ryzom_r.exe network_connection.cpp 646 CNetworkConnection::connect : CNET[014D8610]: Connecting to 'open.ryzom.com:47851' with cookie ''0C01A8C0|6AB47002|00000001''

2010/07/13 19:52:12 INF d94 client_ryzom_r.exe network_connection.cpp 1005 CNetworkConnection::sendSystemLogin : CNET[014D8610]: sent LOGIN cookie='0C01A8C0|7BF89003|00000001'

2010/07/13 19:52:12 INF d94 client_ryzom_r.exe network_connection.cpp 1005 CNetworkConnection::sendSystemLogin : CNET[014D8610]: sent LOGIN cookie='0C01A8C0|7BF89003|00000001'

Edit .../code/ryzom/server/frontend_service.cfg

FSListenHost = "open.ryzom.com";

Replace open.ryzom.com by your server domain name or ip.

It must be reachable by the client.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

Thank you molator but i already did that. Both the frontend_service.cfg at the server and client_default.cfg point to my hostname. I can even telnet that address on port 40916 from the client machine.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I checked the server and this shows up on the frontend service

INF 910 login_server.cpp 158 NLNET::cbWSChooseShard: LS: New cookie '802EB459|1E09A001|00000001' (name 'fox1980' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)
INF 910 frontend_service.cpp 1668 CFrontEndService::setClientsToSynchronizeState: Leaving STALLED mode

So i guess it means the client can reach the server. Still don't know why i can connect to with a computer on a LAN but not from the internet.

RE: Can't connect to own server - Added by molator almost 8 years ago

What OS are you using ?
Tell me what you put in the frontend and in the client config ?

The domain name or ip in the config must be the same in the frontend and the client.
But your clients will use a local ip or an external ip.

You can use my trick here to reach your server from your LAN and Internet :

http://dev.ryzom.com/wiki/ryzom/ConnectingShardFromInternetAndLAN

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I compiled everything on my dev machine, a Windows XP 32bit with SP3. I then copied everything to my server, running on Windows Server 2008 64bit, and ran the server from there.

On the client i opened client_default.cfg and replace StartupHost with this:

StartupHost = "static-b5-248-11.telepac.pt:40916";

On the server i edited frontend_service.cfg and replaced FSListenHost with this:

FSListenHost = "static-b5-248-11.telepac.pt";

In my router i forwarded port 40916 to my server address. I already deleted everything and started again from zero, i triple checked everything while following the tutorials and it still doesn't work. I also tried both using that hostname, and the server IP (i got a static IP), neither configuration worked. If i connect from a PC on the same LAN as the server with StartupHost = "internal_server_ip:40916"; then i can connect just fine, and everything works as expected.

I guess either there's some step missing from the tutorials, or i need to open more ports, are you sure Ryzom core needs to listen only on port 40916 ?

Thanks for taking the time to help me, i really appreciate it.

RE: Can't connect to own server - Added by molator almost 8 years ago

Port 40916 is enough, that's what i'm doing.

If the frontend is set to FSListenHost = "static-b5-248-11.telepac.pt",
StartupHost = "internal_server_ip:40916" in the client, it can't work.

You will have to set StartupHost = "static-b5-248-11.telepac.pt",
and add static-b5-248-11.telepac.pt in the client hosts file for LAN connection.

You're welcome.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

The LAN clients won't work with the server external address even when FSListenHost = "static-b5-248-11.telepac.pt" and even if i set it up in the client hosts file.

static-b5-248-11.telepac.pt is indeed my server hostname you can telnet to port 40916 and see for yourself that it's reacheable through the internet, but clients won't work with StartupHost = "static-b5-248-11.telepac.pt:40916", i also tried using the server IP instead (82.154.248.11) on the client and server configuration but it doesn't work either.

I installed wireshark on a client machine and i saw that it initiates authentication on TCP port 40916 but after logging in, it keeps sending UDP packets to port 47851, i forwarded that port on the server too, but still no good.

RE: Can't connect to own server - Added by molator almost 8 years ago

Do you have more logs from the client and the server to share ?

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I'm using the IP address atm in both client and server. The network part of the client log shows this:

2010/09/14 13:03:29 INF 7d4 client_ryzom_r.exe login.cpp 857 login : Using verbose log mode
2010/09/14 13:03:29 INF 7d4 client_ryzom_r.exe login.cpp 731 initLoginScreen : Using verbose log mode
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2713 checkLogin : Using verbose log mode
2010/09/14 13:03:34 DBG 7d4 client_ryzom_r.exe http_client.cpp 57 CHttpClient::connect : Connected to web server '82.154.248.11:40916'
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2718 checkLogin : Connected
2010/09/14 13:03:34 DBG 7d4 client_ryzom_r.exe http_client.cpp 81 CHttpClient::send : Sending 'GET /login/r2_login.php?cmd=ask&login=fox1980&lg=en

' to '82.154.248.11:40916 (82.154.248.11)'
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2726 checkLogin : Sent request for password salt
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe http_client.cpp 155 CHttpClient::receive : Receiving
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe http_client.cpp 170 CHttpClient::receive : Received CLOSE 4 bytes
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2731 checkLogin : Received request login check
2010/09/14 13:03:34 DBG 7d4 client_ryzom_r.exe http_client.cpp 57 CHttpClient::connect : Connected to web server '82.154.248.11:40916'
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2757 checkLogin : Connected
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2767 checkLogin : Sent request login check
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe http_client.cpp 155 CHttpClient::receive : Receiving
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe http_client.cpp 170 CHttpClient::receive : Received CLOSE 156 bytes
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe login.cpp 2772 checkLogin : Received request login check
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe client.cpp 534 WinMain : Login of Ryzom success
2010/09/14 13:03:34 INF 7d4 client_ryzom_r.exe client.cpp 537 WinMain : Post-Login Init of Ryzom...
2010/09/14 13:03:39 INF 7d4 client_ryzom_r.exe init.cpp 1426 postlogInit : PROFILE: 4 seconds for postlogInit
2010/09/14 13:03:39 INF 7d4 client_ryzom_r.exe client.cpp 539 WinMain : Post-Login Init of Ryzom success
2010/09/14 13:03:39 INF 7d4 client_ryzom_r.exe client.cpp 559 WinMain : Connection of Ryzom...
2010/09/14 13:03:39 INF 7d4 client_ryzom_r.exe connection.cpp 328 connection : PROFILE: 0 seconds (0 total) for Loading continents
2010/09/14 13:03:39 INF 7d4 client_ryzom_r.exe connection.cpp 335 connection : Using the nel launcher parameters '636DB559|4D5C0002|00000001' '82.154.248.11:47851'
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe connection.cpp 365 connection : PROFILE: 0 seconds (0 total) for Initializing outgame
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe connection.cpp 424 connection : PROFILE: 0 seconds (0 total) for Initializing user interface
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe connection.cpp 426 connection : PROFILE: 0 seconds for connection
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 445 CNetworkConnection::initCookie : Network initialisation with front end '82.154.248.11:47851' and cookie '636DB559|4D5C0002|00000001'
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 390 CNetworkConnection::init : Half-frequency mode
2010/09/14 13:03:40 DBG 7d4 client_ryzom_r.exe config_file.cpp 388 NLMISC::CConfigFile::reparse : CF: Adding config file 'R:/ryzom_client_open/' in the config file
2010/09/14 13:03:40 WRN 7d4 client_ryzom_r.exe big_file.cpp 392 NLMISC::CBigFile::getFile : BF: Couldn't load 'R:/ryzom_client_open/'
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe config_file.h 326 NLMISC::EUnknownVar::EUnknownVar : CF: Exception will be launched: variable "Use" not found in file "R:/ryzom_client_open/"
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 640 CNetworkConnection::connect : There's no shards.cfg, or bad file format, can't copy common files
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 643 CNetworkConnection::connect : CNET[02DE4178]: Connecting to '82.154.248.11:47851' with cookie ''636DB559|4D5C0002|00000001''
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 669 CNetworkConnection::connect : CNET[02DE4178]: Client connected to shard, attempting login
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe sound_manager.cpp 1394 CSoundManager::update : The current weather setup '' is unknown !
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:40 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:41 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:41 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:41 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:42 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'
2010/09/14 13:03:42 INF 7d4 client_ryzom_r.exe network_connection.cpp 1002 CNetworkConnection::sendSystemLogin : CNET[02DE4178]: sent LOGIN cookie='636DB559|4D5C0002|00000001'

then it enters an infinite loop with the last line, wich server logs should i be checking ? i see several logs files in the server.

RE: Can't connect to own server - Added by molator almost 8 years ago

frontend_service.log or log.log

Use pastbin.com to share the logs.

I successfully created an account on your server, but same thing, the client is looping.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

This is at the end of frontend_service.log

2010/09/14 13:03:19 INF 1138 192.168.0.16/FS-135 mirror.cpp 1809 CMirror::testMirrorReadyStatus : Mirror system ready, all MTR Tags
2010/09/14 13:03:22 INF 1138 192.168.0.16/FS-135 frontend_service.cpp 1480 CFrontEndService::update : Entering STALLED mode
2010/09/14 13:03:27 INF 1138 192.168.0.16/FS-135 login_server.cpp 158 NLNET::cbWSChooseShard : LS: New cookie '636DB559|48FDB001|00000001' (name 'fox1980' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)
2010/09/14 13:03:56 INF 1138 192.168.0.16/FS-135 frontend_service.cpp 1668 CFrontEndService::setClientsToSynchronizeState : Leaving STALLED mode
2010/09/14 13:04:37 INF 1138 192.168.0.16/FS-135 login_server.cpp 158 NLNET::cbWSChooseShard : LS: New cookie '636DB559|4D5C0002|00000001' (name 'fox1980' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)
2010/09/14 13:13:50 INF 1138 192.168.0.16/FS-135 login_server.cpp 158 NLNET::cbWSChooseShard : LS: New cookie '9189D856|6FECD003|00000004' (name 'molator' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)
2010/09/14 13:17:11 INF 1138 192.168.0.16/FS-135 login_server.cpp 158 NLNET::cbWSChooseShard : LS: New cookie '9189D856|7C75E004|00000004' (name 'molator' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)

it means the server is indeed reacheable by the clients doesn't it ?

RE: Can't connect to own server - Added by molator almost 8 years ago

Yeap it's.
There's something wrong with the frontend.

Could you share the full frontend_service.log ?

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I shutdown the server and deleted the logs, cause the server has been running for quite some time now and the logs were very big. I'm starting up the server now and reattempt to connect so i can upload the new logs somewhere.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

Uploaded the server log.log, frontend_service.log and client.log to

http://www.ageofmerlin.com/logs.zip

RE: Can't connect to own server - Added by kerozcak almost 8 years ago

fox1980 wrote:

I compiled everything on my dev machine, a Windows XP 32bit with SP3. I then copied everything to my server, running on Windows Server 2008 64bit, and ran the server from there.

On the client i opened client_default.cfg and replace StartupHost with this:

StartupHost = "static-b5-248-11.telepac.pt:40916";

On the server i edited frontend_service.cfg and replaced FSListenHost with this:

FSListenHost = "static-b5-248-11.telepac.pt";

In my router i forwarded port 40916 to my server address.

40916 is not enough, it's only for authentication. If you have server behind router you'll need other ports forwarded too. Check here (III. Outgoing Ports): http://forums.ryzom.com/showthread.php?t=7650

RE: Can't connect to own server - Added by molator almost 8 years ago

I didn't open anything else that 40916 and it is working :).
My firewall (on the router) is set not to let pass anything :).

Could be the server own firewall.
I don't use any.

RE: Can't connect to own server - Added by kerozcak almost 8 years ago

We're talking here about router (he had to forward 40916 on his router), not firewall on the same machine.

RE: Can't connect to own server - Added by molator almost 8 years ago

Yeap, it's the only port i'm forwarding on my router.
That's strange.

But i've just seen it's a windows 2003 server.
So could be 2003 own firewall.

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I already forwarded ports 47851 and 40916 on my router cause they're the only relevant ones on my server. For testing purposed i completely disabled the OS firewall, still no good.

RE: Can't connect to own server - Added by kerozcak almost 8 years ago

you can try "DisableNLDebug 0" on FES and see if it gives you more info

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

No more info when setting DisableNLDebug

2010/09/14 14:11:57 1388 192.168.0.16/FS-135 : Executing command : 'DisableNLDebug 0'
2010/09/14 14:11:57 1388 192.168.0.16/FS-135 : Variable DisableNLDebug = 0
2010/09/14 14:12:27 INF 1388 192.168.0.16/FS-135 login_server.cpp 158 NLNET::cbWSChooseShard : LS: New cookie '636DB559|4BBAA003|00000001' (name 'fox1980' priv '' extended '' instance 4294967295 slot 15) inserted in the pending user list (awaiting new client)

RE: Can't connect to own server - Added by molator almost 8 years ago

In mysql config, what did you set instead of open.ryzom, localhost or ?

RE: Can't connect to own server - Added by fox1980 almost 8 years ago

I set to the server internal address (the one starting with 192.168). but out of desperation i've tried changing it to localhost and to the external address. The external address causes the server not to start, both localhost or the internal ip work.

RE: Can't connect to own server - Added by molator almost 8 years ago

Don't know if you solved your probleme but here another issue i got with the same resulting log.

I'm testing ryzom core on a server with 2 IP, the real one and the proxy purpose one.
I was given the proxy ip.
The client and server were able to exchange some data but no cookie.
As soon as i changed my ip for the real one, it worked.

RE: Can't connect to own server - Added by xingbarking over 7 years ago

hi,GUYS,molator ,thx!

(1-25/25)