Server dropping UDP packets

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 08 Jun 2017, 10:09

Hello,
Zed wrote:HI!
1) Run server on remove machine (trying on amazon and hetzner servers)

What is a "remove machine"?

Code: Select all

2) Run 10-15 client instances on other machine (behind router) and wait their connecting, logginig and "find game".
When client sends "find game" they are added to list of waitining players. After 10 players joined to "the lobby" - on the server side i
create room with "battle" extension and start loadind "battle scene" on the clients. After clients loaded the scene, they send
join battle request. After they have joined the battle, all clients send "Attack request" and some times i get this error.

So what you're basically saying is that you join 10 players in a Room, and the problem happens after a while?
What is the average packet rate of a client?

What is exactly an "Attack request"? What does it do?
Lapo
--
gotoAndPlay()
...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 08 Jun 2017, 10:22

What is a "remove machine"?

remote machine* (dedicated server on hetzner or amazon)

So what you're basically saying is that you join 10 players in a Room, and the problem happens after a while?

the problem happens exactly after sending "attack request".

What is the average packet rate of a client?

one request after joinig to the room per client. Server sends "move data" to clients each 40 millisec

What is exactly an "Attack request"? What does it do?

Attack request it's a dummy echo request in test project. In our project this request is used to attack by player.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 08 Jun 2017, 10:33

remote machine* (dedicated server on hetzner or amazon)

Ah sure, sorry. :)

one request after joinig to the room per client. Server sends "move data" to clients each 40 millisec
Attack request it's a dummy echo request in test project. In our project this request is used to attack by player.

So let me understand the communication better.
The server sends "move data" to clients every 40 millisec. But how often each client is updating their position in your test?

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 08 Jun 2017, 10:41

So let me understand the communication better.
The server sends "move data" to clients every 40 millisec. But how often each client is updating their position in your test?


In test they are not updating positions. They only recive data and do nothing with it.

In original project clients interpolate their position each time they receive move data from server.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 08 Jun 2017, 13:38

Thanks.
There still something not clear. The error message you have reported: "Discard UDP packet from..." appears only for incoming packets. If the server is the only one sending data and the client is not firing any updates I can't see how this can cause such an error.

Am I missing something else?

Meanwhile I will take a look at the files you have sent.
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 08 Jun 2017, 16:05

There still something not clear. The error message you have reported: "Discard UDP packet from..." appears only for incoming packets. If the server is the only one sending data and the client is not firing any updates I can't see how this can cause such an error.

Am I missing something else?

1) Client connect and login to ZoneExtension
2) On client login success, client send TCP ZoneExtension Request "FindGame".

2.1) ZoneExtension handle "FindGameHandler" Add player to list and send to all players in list response with data about players in list. (Lobby)
2.2) When 10 players added to list - battle begins:
2.3) ZoneExtension Creates Game Room and assign to the room battle RoomExtension
2.4) On RoomExtension Initialize - create schedule with fixed rate 40 milliseconds wich sends to all users in the room UDP Response "Move" with all players positions data
2.5) ZoneExtension send TCP Response "CreateGame" with battle data to all players in list and clear that list

3) Client receives TCP response from server "CreateGame" with battle data and start loading "BattleScene"
4) When BattleScene loaded - Client send TCP ZoneExtension Request "JoinGame"

4.1) ZoneExtension handle JoinGameHandler and join current user to the game room
4.2) Game RoomExtension Rise "JoinRoomHandler" and send to all users in the room TCP Response "EnterToBattle" with data about connected player

5) Client joined to the room and start receiving UDP Response "Move" with all players positions data.
6) Client receive TCP Response "EnterToBattle"
7) Client Send UDP Request "Attack" and some players got error about wrong port.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 08 Jun 2017, 16:20

Thanks.
We'll setup a test environment, see if we can reproduce this and report back
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 09 Jun 2017, 08:25

there my zone and server configurations
Attachments
TestUDP_zone.rar
(1.58 KiB) Downloaded 703 times
server.rar
(1.35 KiB) Downloaded 660 times
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 09 Jun 2017, 15:59

We have run a test reproducing a similar scenario with 10 players, 40 milliseconds messages to all players using the same data you use over UDP. The client doesn't do very much besides sending an occasional request every few seconds.

Run the test with a remote server for over an hour with no errors whatsoever.

Our client is Java rather than C# because it's easier for us to build tests with a Java-based tool. Although the type of client should make no difference whatsoever.

Do you run your test from a desktop machine? Which OS?
Any firewalls running?

Attached are a screenshot of the server's Dashboard screenshot of the test and the server's logs.
dashb.jpg
(165.59 KiB) Not downloaded yet


Code: Select all

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 >> Zone: BasicExamples
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

14:34:18,998 INFO  [main] managers.SFSRoomManager     - Room created: { Zone: BasicExamples }, [ Room: The Lobby, Id: 1, Group: default, isGame: false ], type = SFSRoom
14:34:18,999 INFO  [main] managers.SFSRoomManager     - Room created: { Zone: BasicExamples }, [ Room: UdpGame, Id: 2, Group: default, isGame: true ], type = SFSRoom
14:34:19,527 INFO  [main] Extensions     - {pyTest}: {{ UDP STRESS TEST Start }}: 
14:34:19,527 INFO  [main] Extensions     - {pyTest}: Version:  1.0.0
14:34:19,535 INFO  [main] managers.SFSRoomManager     - Room created: { Zone: --=={{{ AdminZone }}}==-- }, [ Room: AdminRoom, Id: 3, Group: default, isGame: false ], type = SFSRoom
14:34:19,575 INFO  [main] core.AdminToolService     - AdminTool Service started
14:34:19,781 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - Listening Sockets: { 0.0.0.0:9934, (Tcp) } { 0.0.0.0:9934, (Udp) }
14:34:19,784 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - 
 _____ _____ _____    ___ __ __
|   __|   __|   __|  |_  |  |  |
|__   |   __|__   |  |  _|-   -|
|_____|__|  |_____|  |___|__|__|                                         
 _____ _____ _____ ____  __ __
| __  |   __|  _  |    \|  |  |
|    -|   __|     |  |  |_   _|
|__|__|_____|__|__|____/  |_| 
[ 2.13.0 ]

14:34:19,784 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - SmartFoxServer 2X (2.13.0) READY!
14:34:20,815 INFO  [main] v3.SessionFilter     - BlueBox-2X Service (3.1.0) READY.
14:34:29,146 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 4, Type: DEFAULT, Logged: No, IP: 158.58.170.187:52901 } on Server port: 9934 <---> 52901
14:34:29,302 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 4, Type: DEFAULT, Logged: No, IP: 158.58.170.187:52901 }
14:34:29,484 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 5, Type: DEFAULT, Logged: No, IP: 158.58.170.187:52902 } on Server port: 9934 <---> 52902
14:34:29,778 INFO  [SFSWorker:Ext:4] api.SFSApi     - User login: { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: qqqwww, Id: 0, Priv: 0, Sess: 158.58.170.187:52902 ) , Type: Flash PlugIn:MAC 25,0,0,127
14:34:29,786 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: AdminRoom, Id: 3, Group: default, isGame: false ], { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: qqqwww, Id: 0, Priv: 0, Sess: 158.58.170.187:52902 ) , asSpect: false
14:34:54,384 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 6, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53342 } on Server port: 9934 <---> 53342
14:34:54,935 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 7, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53360 } on Server port: 9934 <---> 53360
14:34:55,024 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 8, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53361 } on Server port: 9934 <---> 53361
14:34:55,114 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 9, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53362 } on Server port: 9934 <---> 53362
14:34:55,209 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 10, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53363 } on Server port: 9934 <---> 53363
14:34:55,318 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 11, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53364 } on Server port: 9934 <---> 53364
14:34:55,373 INFO  [SFSWorker:Sys:4] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#2, Id: 2, Priv: 0, Sess: 158.58.170.187:53362 ) , Type: BitSmasher API
14:34:55,375 INFO  [SFSWorker:Sys:2] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#3, Id: 3, Priv: 0, Sess: 158.58.170.187:53360 ) , Type: BitSmasher API
14:34:55,375 INFO  [SFSWorker:Sys:3] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#4, Id: 4, Priv: 0, Sess: 158.58.170.187:53363 ) , Type: BitSmasher API
14:34:55,375 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#1, Id: 1, Priv: 0, Sess: 158.58.170.187:53361 ) , Type: BitSmasher API
14:34:55,422 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 12, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53365 } on Server port: 9934 <---> 53365
14:34:55,466 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#5, Id: 5, Priv: 0, Sess: 158.58.170.187:53364 ) , Type: BitSmasher API
14:34:55,541 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 13, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53366 } on Server port: 9934 <---> 53366
14:34:55,564 INFO  [SFSWorker:Sys:2] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#6, Id: 6, Priv: 0, Sess: 158.58.170.187:53365 ) , Type: BitSmasher API
14:34:55,635 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 14, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53367 } on Server port: 9934 <---> 53367
14:34:55,673 INFO  [SFSWorker:Sys:2] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#4, Id: 4, Priv: 0, Sess: 158.58.170.187:53363 ) , asSpect: false
user joined. Total count = 14:34:55,677 INFO  [SFSWorker:Sys:1] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#1, Id: 1, Priv: 0, Sess: 158.58.170.187:53361 ) , asSpect: false
 user joined. Total count =  2
2
14:34:55,690 INFO  [SFSWorker:Sys:3] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#2, Id: 2, Priv: 0, Sess: 158.58.170.187:53362 ) , asSpect: false
14:34:55,690 INFO  [SFSWorker:Sys:4] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#3, Id: 3, Priv: 0, Sess: 158.58.170.187:53360 ) , asSpect: false
user joined. Total count =  4
user joined. Total count =  4
14:34:55,696 INFO  [SFSWorker:Sys:2] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#7, Id: 7, Priv: 0, Sess: 158.58.170.187:53366 ) , Type: BitSmasher API
14:34:55,710 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 15, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53384 } on Server port: 9934 <---> 53384
14:34:55,774 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#8, Id: 8, Priv: 0, Sess: 158.58.170.187:53367 ) , Type: BitSmasher API
14:34:55,775 INFO  [SFSWorker:Sys:2] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#5, Id: 5, Priv: 0, Sess: 158.58.170.187:53364 ) , asSpect: false
user joined. Total count =  5
14:34:55,814 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 16, Type: DEFAULT, Logged: No, IP: 158.58.170.187:53385 } on Server port: 9934 <---> 53385
14:34:55,862 INFO  [SFSWorker:Sys:4] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#6, Id: 6, Priv: 0, Sess: 158.58.170.187:53365 ) , asSpect: false
user joined. Total count =  6
14:34:55,865 INFO  [SFSWorker:Sys:2] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#9, Id: 9, Priv: 0, Sess: 158.58.170.187:53384 ) , Type: BitSmasher API
14:34:55,961 INFO  [SFSWorker:Sys:4] api.SFSApi     - User login: { Zone: BasicExamples }, ( User Name: Guest#10, Id: 10, Priv: 0, Sess: 158.58.170.187:53385 ) , Type: BitSmasher API
14:34:55,985 INFO  [SFSWorker:Sys:2] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#7, Id: 7, Priv: 0, Sess: 158.58.170.187:53366 ) , asSpect: false
user joined. Total count =  7
14:34:56,048 INFO  [SFSWorker:Sys:4] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#8, Id: 8, Priv: 0, Sess: 158.58.170.187:53367 ) , asSpect: false
user joined. Total count =  8
14:34:56,155 INFO  [SFSWorker:Sys:1] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#9, Id: 9, Priv: 0, Sess: 158.58.170.187:53384 ) , asSpect: false
user joined. Total count =  9
14:34:56,228 INFO  [SFSWorker:Sys:2] api.SFSApi     - Room joined: [ Room: UdpGame, Id: 2, Group: default, isGame: true ], { Zone: BasicExamples }, ( User Name: Guest#10, Id: 10, Priv: 0, Sess: 158.58.170.187:53385 ) , asSpect: false
user joined. Total count =  10
14:34:56,247 INFO  [SFSWorker:Ext:2] Extensions     - {pyTest}: Player count reached --> Game started
14:55:19,794 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: SpaceWar }, CCU: 0/0
14:55:19,796 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: --=={{{ AdminZone }}}==-- }, CCU: 0/1
14:55:19,796 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: BasicExamples }, CCU: 3/10
14:55:19,796 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: CCU: 3/11
15:48:49,393 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 16, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53385 }
15:48:49,396 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#10, Id: 10, Priv: 0, Sess: 158.58.170.187:53385 ) , SessionLen: 4433435, Type: BitSmasher API
15:48:49,446 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 7, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53360 }
15:48:49,447 INFO  [SFSWorker:Sys:2] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#3, Id: 3, Priv: 0, Sess: 158.58.170.187:53360 ) , SessionLen: 4434074, Type: BitSmasher API
15:48:49,493 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 8, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53361 }
15:48:49,494 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#1, Id: 1, Priv: 0, Sess: 158.58.170.187:53361 ) , SessionLen: 4434121, Type: BitSmasher API
15:48:49,556 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 9, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53362 }
15:48:49,559 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#2, Id: 2, Priv: 0, Sess: 158.58.170.187:53362 ) , SessionLen: 4434186, Type: BitSmasher API
15:48:49,600 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 10, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53363 }
15:48:49,603 INFO  [SFSWorker:Sys:1] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#4, Id: 4, Priv: 0, Sess: 158.58.170.187:53363 ) , SessionLen: 4434229, Type: BitSmasher API
15:48:49,650 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 11, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53364 }
15:48:49,650 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#5, Id: 5, Priv: 0, Sess: 158.58.170.187:53364 ) , SessionLen: 4434184, Type: BitSmasher API
15:48:49,712 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 12, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53365 }
15:48:49,712 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#6, Id: 6, Priv: 0, Sess: 158.58.170.187:53365 ) , SessionLen: 4434148, Type: BitSmasher API
15:48:49,759 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 13, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53366 }
15:48:49,760 INFO  [SFSWorker:Sys:2] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#7, Id: 7, Priv: 0, Sess: 158.58.170.187:53366 ) , SessionLen: 4434064, Type: BitSmasher API
15:48:49,796 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 14, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53367 }
15:48:49,797 INFO  [SFSWorker:Sys:1] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#8, Id: 8, Priv: 0, Sess: 158.58.170.187:53367 ) , SessionLen: 4434023, Type: BitSmasher API
15:48:49,844 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 15, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:53384 }
15:48:49,848 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: BasicExamples }, ( User Name: Guest#9, Id: 9, Priv: 0, Sess: 158.58.170.187:53384 ) , SessionLen: 4433984, Type: BitSmasher API
15:48:50,039 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 17, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61475 } on Server port: 9934 <---> 61475
15:48:50,189 INFO  [SFSWorker:Ext:4] v290.SmasherReqController     - BS Test: UDPGameTest, Start: 1497019372857
15:48:50,190 INFO  [SFSWorker:Ext:4] sessions.DefaultSessionManager     - Session removed: { Id: 17, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61475 }
15:55:19,793 INFO  [pool-1-thread-1] stats.CCULoggerTask     - CCU stats: { Zone: SpaceWar }, CCU: 0/0
15:55:19,793 INFO  [pool-1-thread-1] stats.CCULoggerTask     - CCU stats: { Zone: --=={{{ AdminZone }}}==-- }, CCU: 1/1
15:55:19,793 INFO  [pool-1-thread-1] stats.CCULoggerTask     - CCU stats: { Zone: BasicExamples }, CCU: 8/10
15:55:19,793 INFO  [pool-1-thread-1] stats.CCULoggerTask     - CCU stats: CCU: 9/11


Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 12 Jun 2017, 13:34

Do you run your test from a desktop machine? Which OS?

Yes, from the desktop.
OS Windows 7 x64
Any firewalls running?

i have turned off firewall but this not solve the problem.

I think, maybe problem apear when server try to send TCP zone and UDP room response at same time?
Can you try run my test project on test environment?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 12 Jun 2017, 13:43

Zed wrote:
Any firewalls running?

i have turned off firewall but this not solve the problem.

Are you referring to the standard windows firewall or something else?

I think, maybe problem apear when server try to send TCP zone and UDP room response at same time?

No, it's not possible. TCP traffic is not a trigger for a UDP port change. This is typically done by a node in between or a firewall.

Can you try run my test project on test environment?

We'll try that.
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 12 Jun 2017, 13:59

Are you referring to the standard windows firewall or something else?

Standart windows firewall
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 12 Jun 2017, 15:49

We've run your test for over an hour. Clients behind a router and through a VPN from our office in Italy. Server is hosted on Rackspace (USA, Chicago I believe). We haven't found any issues. (see attached screenshot and logs)

If you want you can test on our servers from your place and see if it makes any difference. I don't expect it will though, as this is typically a client side issue.

You can reach us at our support@... email. Just add a reference to this discussion for clarity.

Thanks.

p.s. = here are the logs of the session:
udp-test.jpg
AdminTool Dashboard
(84.07 KiB) Not downloaded yet

Code: Select all

14:25:18,380 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - Listening Sockets: { 0.0.0.0:9934, (Tcp) } { 0.0.0.0:9934, (Udp) }
14:25:18,384 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - 
 _____ _____ _____    ___ __ __
|   __|   __|   __|  |_  |  |  |
|__   |   __|__   |  |  _|-   -|
|_____|__|  |_____|  |___|__|__|                                         
 _____ _____ _____ ____  __ __
| __  |   __|  _  |    \|  |  |
|    -|   __|     |  |  |_   _|
|__|__|_____|__|__|____/  |_| 
[ 2.13.0 ]

14:25:18,384 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - SmartFoxServer 2X (2.13.0) READY!
14:25:19,412 INFO  [main] v3.SessionFilter     - BlueBox-2X Service (3.1.0) READY.
14:27:03,062 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 4, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61887 } on Server port: 9934 <---> 61887
14:27:03,137 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 5, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61888 } on Server port: 9934 <---> 61888
14:27:03,255 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 6, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61889 } on Server port: 9934 <---> 61889
14:27:03,261 INFO  [SFSWorker:Sys:4] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181954, Id: 0, Priv: 0, Sess: 158.58.170.187:61887 ) , Type: Unity
14:27:03,330 INFO  [SFSWorker:Sys:3] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF18138, Id: 1, Priv: 0, Sess: 158.58.170.187:61888 ) , Type: Unity
14:27:03,405 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 7, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61893 } on Server port: 9934 <---> 61893
14:27:03,454 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181167, Id: 2, Priv: 0, Sess: 158.58.170.187:61889 ) , Type: Unity
14:27:03,578 INFO  [SFSWorker:Sys:3] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181285, Id: 3, Priv: 0, Sess: 158.58.170.187:61893 ) , Type: Unity
14:27:03,639 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 8, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61913 } on Server port: 9934 <---> 61913
14:27:03,655 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 9, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61915 } on Server port: 9934 <---> 61915
14:27:03,702 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 10, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61916 } on Server port: 9934 <---> 61916
14:27:03,812 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 11, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61918 } on Server port: 9934 <---> 61918
14:27:03,835 INFO  [SFSWorker:Sys:3] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543, Id: 4, Priv: 0, Sess: 158.58.170.187:61915 ) , Type: Unity
14:27:03,840 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181540, Id: 5, Priv: 0, Sess: 158.58.170.187:61913 ) , Type: Unity
14:27:03,845 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 12, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61921 } on Server port: 9934 <---> 61921
14:27:03,872 INFO  [SFSWorker:Sys:2] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181584, Id: 6, Priv: 0, Sess: 158.58.170.187:61916 ) , Type: Unity
14:27:03,877 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 13, Type: DEFAULT, Logged: No, IP: 158.58.170.187:61922 } on Server port: 9934 <---> 61922
14:27:04,014 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181720, Id: 7, Priv: 0, Sess: 158.58.170.187:61918 ) , Type: Unity
14:27:04,019 INFO  [SFSWorker:Sys:3] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181735, Id: 8, Priv: 0, Sess: 158.58.170.187:61921 ) , Type: Unity
14:27:04,077 INFO  [SFSWorker:Sys:1] api.SFSApi     - User login: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181792, Id: 9, Priv: 0, Sess: 158.58.170.187:61922 ) , Type: Unity
14:27:04,250 INFO  [SFSWorker:Ext:3] Extensions     - {testUdpRoomExtension}: Game extension initialize
14:27:04,252 INFO  [SFSWorker:Ext:3] managers.SFSRoomManager     - Room created: { Zone: TestUDP }, [ Room: 100, Id: 4, Group: default, isGame: true ], type = SFSRoom
14:27:04,556 INFO  [SFSWorker:Ext:1] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181792, Id: 9, Priv: 0, Sess: 158.58.170.187:61922 ) , asSpect: false
14:27:04,566 INFO  [SFSWorker:Ext:2] entities.SFSUser     - Can't find playerID -- User: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543 is not joined in the requested Room: [ Room: 100, Id: 4, Group: default, isGame: true ]
14:27:04,566 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF18138, Id: 1, Priv: 0, Sess: 158.58.170.187:61888 ) , asSpect: false
14:27:04,566 INFO  [SFSWorker:Ext:2] entities.SFSUser     - Can't find playerID -- User: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543 is not joined in the requested Room: [ Room: 100, Id: 4, Group: default, isGame: true ]
14:27:04,566 INFO  [SFSWorker:Ext:2] entities.SFSUser     - Can't find playerID -- User: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543 is not joined in the requested Room: [ Room: 100, Id: 4, Group: default, isGame: true ]
14:27:04,567 INFO  [SFSWorker:Ext:3] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543, Id: 4, Priv: 0, Sess: 158.58.170.187:61915 ) , asSpect: false
14:27:04,571 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181735, Id: 8, Priv: 0, Sess: 158.58.170.187:61921 ) , asSpect: false
14:27:04,582 INFO  [SFSWorker:Ext:3] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181720, Id: 7, Priv: 0, Sess: 158.58.170.187:61918 ) , asSpect: false
14:27:04,864 INFO  [SFSWorker:Ext:1] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181540, Id: 5, Priv: 0, Sess: 158.58.170.187:61913 ) , asSpect: false
14:27:04,869 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181167, Id: 2, Priv: 0, Sess: 158.58.170.187:61889 ) , asSpect: false
14:27:04,870 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181285, Id: 3, Priv: 0, Sess: 158.58.170.187:61893 ) , asSpect: false
14:27:04,875 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181584, Id: 6, Priv: 0, Sess: 158.58.170.187:61916 ) , asSpect: false
14:27:04,875 INFO  [SFSWorker:Ext:2] api.SFSApi     - Room joined: [ Room: 100, Id: 4, Group: default, isGame: true ], { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181954, Id: 0, Priv: 0, Sess: 158.58.170.187:61887 ) , asSpect: false
14:27:25,259 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 14, Type: DEFAULT, Logged: No, IP: 158.58.170.187:62288 } on Server port: 9934 <---> 62288
14:27:25,443 INFO  [SFSWorker:Ext:1] api.SFSApi     - User login: { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: qqqwww, Id: 10, Priv: 0, Sess: 158.58.170.187:62288 ) , Type: Flash PlugIn:MAC 25,0,0,127
14:27:25,452 INFO  [SFSWorker:Ext:1] api.SFSApi     - Room joined: [ Room: AdminRoom, Id: 3, Group: default, isGame: false ], { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: qqqwww, Id: 10, Priv: 0, Sess: 158.58.170.187:62288 ) , asSpect: false
14:55:18,393 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: TestUDP }, CCU: 4/10
14:55:18,393 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: SpaceWar }, CCU: 0/0
14:55:18,393 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: --=={{{ AdminZone }}}==-- }, CCU: 0/1
14:55:18,393 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: { Zone: BasicExamples }, CCU: 0/0
14:55:18,393 INFO  [pool-1-thread-3] stats.CCULoggerTask     - CCU stats: CCU: 5/11
15:38:46,910 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 12, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61921 }
15:38:46,913 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181735, Id: 8, Priv: 0, Sess: 158.58.170.187:61921 ) , SessionLen: 4302894, Type: Unity
15:38:46,920 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 7, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61893 }
15:38:46,920 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 4, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61887 }
15:38:46,923 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181285, Id: 3, Priv: 0, Sess: 158.58.170.187:61893 ) , SessionLen: 4303345, Type: Unity
15:38:46,924 INFO  [SFSWorker:Sys:1] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181954, Id: 0, Priv: 0, Sess: 158.58.170.187:61887 ) , SessionLen: 4303663, Type: Unity
15:38:46,926 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 13, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61922 }
15:38:46,926 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 8, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61913 }
15:38:46,927 INFO  [SFSWorker:Sys:2] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181792, Id: 9, Priv: 0, Sess: 158.58.170.187:61922 ) , SessionLen: 4302851, Type: Unity
15:38:46,927 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181540, Id: 5, Priv: 0, Sess: 158.58.170.187:61913 ) , SessionLen: 4303088, Type: Unity
15:38:46,932 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 10, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61916 }
15:38:46,933 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181584, Id: 6, Priv: 0, Sess: 158.58.170.187:61916 ) , SessionLen: 4303061, Type: Unity
15:38:46,938 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 6, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61889 }
15:38:46,938 INFO  [SFSWorker:Sys:1] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181167, Id: 2, Priv: 0, Sess: 158.58.170.187:61889 ) , SessionLen: 4303484, Type: Unity
15:38:46,943 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 5, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61888 }
15:38:46,944 INFO  [SFSWorker:Sys:2] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF18138, Id: 1, Priv: 0, Sess: 158.58.170.187:61888 ) , SessionLen: 4303614, Type: Unity
15:38:46,964 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 9, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61915 }
15:38:46,965 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181543, Id: 4, Priv: 0, Sess: 158.58.170.187:61915 ) , SessionLen: 4303130, Type: Unity
15:38:46,970 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 11, Type: DEFAULT, Logged: Yes, IP: 158.58.170.187:61918 }
15:38:46,971 INFO  [SFSWorker:Sys:4] managers.SFSRoomManager     - Room removed: { Zone: TestUDP }, [ Room: 100, Id: 4, Group: default, isGame: true ], Duration: 4302729
15:38:46,971 INFO  [SFSWorker:Sys:4] api.SFSApi     - User disconnected: { Zone: TestUDP }, ( User Name: AAEA06CC-1CCB-58C1-8A7F-25D6A98AF181720, Id: 7, Priv: 0, Sess: 158.58.170.187:61918 ) , SessionLen: 4302957, Type: Unity
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server dropping UDP packets

Postby Lapo » 12 Jun 2017, 16:12

One extra note: running 10 copies of the Unity client is pretty heavy on system resources causing my Intel i7, quad-core MBPro to use almost all CPU (94% overall, across all cores).

I would recommend to check the status of your testing machine CPU to avoid a 100% usage. If the test maxes out the CPU clients will start to lag and fall behind which ultimately can cause issues and invalidate the test. If that's the case it would be best to lower the number of clients so that the machine has some resources left.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Zed
Posts: 40
Joined: 03 Jul 2014, 15:24

Re: Server dropping UDP packets

Postby Zed » 13 Jun 2017, 09:11

One extra note

I get this error not only on PC. In original project the issue cause on one instance per client (IOS/Android) (MOBA for 4 players).
i have created test project with 10 client to show you the way i get the error.
This error does not depend on time. It appears on start of the clients after they connect and receive battle data.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 38 guests