Error deserializing request

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

Moderators: Lapo, Bax

atoneday
Posts: 52
Joined: 18 Jun 2012, 08:44

Error deserializing request

Postby atoneday » 04 Dec 2013, 07:18

The CPU of My server reaches 100% suddenly and have no response after that.
When i check the log, the latest output is
WARN | SocketReader | v2.protocol.SFSProtocolCodec | | Error deserializing request: java.nio.BufferUnderflowException


My server runs nearly one month and it happened twice this week. I have no change in the server, so I don't know what's happened here. Is there any clue to fix this issue?
User avatar
Lapo
Site Admin
Posts: 21726
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error deserializing request

Postby Lapo » 04 Dec 2013, 08:38

I wouldn't be sure those two things are correlated.
You should inspect the logs and see what other errors there are.

Also please provide more details. Read here: viewtopic.php?f=18&t=16497
Lapo
--
gotoAndPlay()
...addicted to flash games
atoneday
Posts: 52
Joined: 18 Jun 2012, 08:44

Re: Error deserializing request

Postby atoneday » 04 Dec 2013, 09:58

Thank you all the same.

My server is in an unresponsive state after this is happened and Java process is the only one that use 100% CPU. In smartfox.log the last output is "Error deserializing request". Everything above this line are normal. I haven't seen this error before. I only see it after server is down twice, so I think it may cause the sever down. I will capture a Thread Dump if this happen again.
User avatar
Lapo
Site Admin
Posts: 21726
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error deserializing request

Postby Lapo » 04 Dec 2013, 10:09

Ok. If you are running an older version (e.g. < 2.6.0) please make sure to upgrade. At the moment the latest version is 2.8.0
http://www.smartfoxserver.com/download/sfs2x#p=updates
Lapo

--

gotoAndPlay()

...addicted to flash games
rparker
Posts: 19
Joined: 18 Oct 2010, 09:10

Re: Error deserializing request

Postby rparker » 28 Feb 2014, 01:53

Anything come of this? I too have an intermittent failure very similar. The machine will be running fine and then I get this error in the log:
27 Feb 2014 | 17:05:37,297 | WARN | SocketReader | v2.protocol.SFSProtocolCodec | | Error deserializing request: java.nio.BufferUnderflowException

Every operation after that is a disconnect, the server stops responding and no one is able to login:

27 Feb 2014 | 17:05:41,753 | INFO | Scheduler1-thread-1 | v2.entities.SFSZone | | User: 1a722f19-970f-4959-912b-fc691f8f3f6c was disconnected.
27 Feb 2014 | 17:05:41,753 | INFO | Scheduler1-thread-1 | v2.api.SFSApi | | User disconnected: { Zone: JumpStart }, ( User Name: 1a722f19-970f-4959-912b-fc691f8f3f6c, Id: 28453, Priv: 1, Sess: XxXxXxXxXxX:50722 ) , SessionLen: 8172, Type: Unity
27 Feb 2014 | 17:05:41,753 | INFO | pool-1-thread-1 | v2.entities.SFSZone | | User: 1a722f19-970f-4959-912b-fc691f8f3f6c was disconnected.
27 Feb 2014 | 17:05:41,754 | INFO | pool-1-thread-1 | v2.api.SFSApi | | User logout: { Zone: JumpStart }, ( User Name: 1a722f19-970f-4959-912b-fc691f8f3f6c, Id: 28453, Priv: 1, Sess: XxXxXxXxXxX:50722 ) , SessionLen: 8173, Type: Unity
27 Feb 2014 | 17:05:41,754 | INFO | pool-1-thread-4 | v2.entities.SFSZone | | User: 1a722f19-970f-4959-912b-fc691f8f3f6c was disconnected.
27 Feb 2014 | 17:05:43,755 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 97835, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:50293 }
27 Feb 2014 | 17:05:43,755 | INFO | Scheduler1-thread-1 | v2.entities.SFSZone | | User: bfbbf300-74df-4247-8aa9-1cd6db9bf736 was disconnected.
27 Feb 2014 | 17:05:43,755 | INFO | Scheduler1-thread-1 | v2.api.SFSApi | | User disconnected: { Zone: JumpStart }, ( User Name: bfbbf300-74df-4247-8aa9-1cd6db9bf736, Id: 28004, Priv: 1, Sess: XxXxXxXxXxX:50293 ) , SessionLen: 427742, Type: Unity
27 Feb 2014 | 17:05:43,755 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Terminated idle logged-in session: { Id: 97835, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:50293 }
27 Feb 2014 | 17:05:43,756 | INFO | pool-1-thread-2 | v2.entities.SFSZone | | User: bfbbf300-74df-4247-8aa9-1cd6db9bf736 was disconnected.
27 Feb 2014 | 17:05:43,756 | INFO | pool-1-thread-2 | v2.api.SFSApi | | User logout: { Zone: JumpStart }, ( User Name: bfbbf300-74df-4247-8aa9-1cd6db9bf736, Id: 28004, Priv: 1, Sess: XxXxXxXxXxX:50293 ) , SessionLen: 427743, Type: Unity
27 Feb 2014 | 17:05:43,756 | INFO | pool-1-thread-3 | v2.entities.SFSZone | | User: bfbbf300-74df-4247-8aa9-1cd6db9bf736 was disconnected.
27 Feb 2014 | 17:05:53,760 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 98250, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:53766 }
27 Feb 2014 | 17:05:53,760 | INFO | Scheduler1-thread-1 | v2.entities.SFSZone | | User: 09705226-87ea-4eda-ad67-04811ea7168b was disconnected.
27 Feb 2014 | 17:05:53,760 | INFO | Scheduler1-thread-1 | v2.api.SFSApi | | User disconnected: { Zone: JumpStart }, ( User Name: 09705226-87ea-4eda-ad67-04811ea7168b, Id: 28127, Priv: 0, Sess: XxXxXxXxXxX:53766 ) , SessionLen: 318207, Type: Unity
27 Feb 2014 | 17:05:53,760 | INFO | pool-1-thread-1 | v2.entities.SFSZone | | User: 09705226-87ea-4eda-ad67-04811ea7168b was disconnected.
27 Feb 2014 | 17:05:53,760 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Terminated idle logged-in session: { Id: 98250, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:53766 }
27 Feb 2014 | 17:05:53,760 | INFO | pool-1-thread-1 | v2.api.SFSApi | | User logout: { Zone: JumpStart }, ( User Name: 09705226-87ea-4eda-ad67-04811ea7168b, Id: 28127, Priv: 0, Sess: XxXxXxXxXxX:53766 ) , SessionLen: 318207, Type: Unity
27 Feb 2014 | 17:05:53,760 | INFO | pool-1-thread-4 | v2.entities.SFSZone | | User: 09705226-87ea-4eda-ad67-04811ea7168b was disconnected.
27 Feb 2014 | 17:06:03,765 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 95333, Type: DEFAULT, Logged: No, IP: XxXxXxXxXxX:49473 }
27 Feb 2014 | 17:06:03,765 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 99498, Type: DEFAULT, Logged: No, IP: XxXxXxXxXxX:58817 }
27 Feb 2014 | 17:06:13,771 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 97890, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:62477 }
27 Feb 2014 | 17:06:13,771 | INFO | Scheduler1-thread-1 | v2.entities.SFSZone | | User: 28d82dde-4734-4674-9702-9168e67f71e2 was disconnected.
27 Feb 2014 | 17:06:13,773 | INFO | Scheduler1-thread-1 | v2.api.SFSApi | | User disconnected: { Zone: JumpStart }, ( User Name: 28d82dde-4734-4674-9702-9168e67f71e2, Id: 28019, Priv: 1, Sess: XxXxXxXxXxX:62477 ) , SessionLen: 447339, Type: Unity
27 Feb 2014 | 17:06:13,773 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Terminated idle logged-in session: { Id: 97890, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:62477 }
27 Feb 2014 | 17:06:13,773 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 98247, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:26519 }
27 Feb 2014 | 17:06:13,773 | INFO | Scheduler1-thread-1 | v2.entities.SFSZone | | User: 847c3df0-06da-4093-98f2-3887867a5ac5 was disconnected.
27 Feb 2014 | 17:06:13,773 | INFO | pool-1-thread-2 | v2.entities.SFSZone | | User: 28d82dde-4734-4674-9702-9168e67f71e2 was disconnected.
27 Feb 2014 | 17:06:13,773 | INFO | pool-1-thread-2 | v2.api.SFSApi | | User logout: { Zone: JumpStart }, ( User Name: 28d82dde-4734-4674-9702-9168e67f71e2, Id: 28019, Priv: 1, Sess: XxXxXxXxXxX:62477 ) , SessionLen: 447339, Type: Unity
27 Feb 2014 | 17:06:13,773 | INFO | pool-1-thread-3 | v2.entities.SFSZone | | User: 28d82dde-4734-4674-9702-9168e67f71e2 was disconnected.
27 Feb 2014 | 17:06:13,774 | INFO | Scheduler1-thread-1 | v2.api.SFSApi | | User disconnected: { Zone: JumpStart }, ( User Name: 847c3df0-06da-4093-98f2-3887867a5ac5, Id: 28126, Priv: 1, Sess: 189.130.170.144:26519 ) , SessionLen: 338412, Type: Unity
27 Feb 2014 | 17:06:13,774 | INFO | Scheduler1-thread-1 | bitswarm.sessions.DefaultSessionManager | | Terminated idle logged-in session: { Id: 98247, Type: DEFAULT, Logged: Yes, IP: XxXxXxXxXxX:26519 }

.... repeat until all connections are gone... then just sits
User avatar
Lapo
Site Admin
Posts: 21726
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error deserializing request

Postby Lapo » 28 Feb 2014, 09:29

In essence this error:
27 Feb 2014 | 17:05:37,297 | WARN | SocketReader | v2.protocol.SFSProtocolCodec | | Error deserializing request: java.nio.BufferUnderflowException

is simply saying that a malformed packet was received. Chances are the client wasn't a real SmartFoxServer client.

Also the error above doesn't pose any specific problem for the server. Can you describe the failure more in details? What happens? Have you ever captured a thread dump when the problem shows up?
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DavinVicy, DerikFent, Kevengar and 21 guests