Smartfox kicks user "randomly"
Smartfox kicks user "randomly"
Hello,
I've got problems with the connection of users. Each user is been kicked from smartfox after a different time. Sometimes it's just after 10 minutes, sometimes after 2 hours. Everytime just one user is kicked and sometimes is the next the same, otherwise another one.
I checked chapter 3.6 "Troubleshooting common runtime problems" but all proposes don't help.
The problem is given just in network. If I open 1-10 clients on my own desktop which are connecting to local smartfox (connected 127.0.0.1), nobody is been kicked.
But on my VPS is the problem given (coneccted ip 200.55...). I thought it depend on the VPS, but now I tested e.g. in a network (connected 192.168...) with different pcs, and users including me are being kicked. I had the chance to run eclipse to see, what happens if a user get this strange disconnect. I made a screen.
I am running java extensions. The log says nothing. The disconnect is on much different action, so it is not one line code which causes this.
http://www.speedupload.eu/bild.php/176, ... 11SW16.jpg
So what's this?
I've got problems with the connection of users. Each user is been kicked from smartfox after a different time. Sometimes it's just after 10 minutes, sometimes after 2 hours. Everytime just one user is kicked and sometimes is the next the same, otherwise another one.
I checked chapter 3.6 "Troubleshooting common runtime problems" but all proposes don't help.
The problem is given just in network. If I open 1-10 clients on my own desktop which are connecting to local smartfox (connected 127.0.0.1), nobody is been kicked.
But on my VPS is the problem given (coneccted ip 200.55...). I thought it depend on the VPS, but now I tested e.g. in a network (connected 192.168...) with different pcs, and users including me are being kicked. I had the chance to run eclipse to see, what happens if a user get this strange disconnect. I made a screen.
I am running java extensions. The log says nothing. The disconnect is on much different action, so it is not one line code which causes this.
http://www.speedupload.eu/bild.php/176, ... 11SW16.jpg
So what's this?
Last edited by Jipii on 27 Dec 2009, 14:26, edited 1 time in total.
Hi,
SFS can kick users if you have turned on the anti-flood and/or the bad-words filters, according to the rules that you have configured.
Another reason for auto-kicking depends on your settings as regards dropped packets. Take a look at your Admin Tool and see if you have at least several thousand dropped packets. If so it is very likely that some "slow" user have been disconnected after a while.
All this is explained in detail here:
http://www.smartfoxserver.com/docs/docP ... ooting.htm
See the 2nd section --> Understanding Dropped Messages
SFS can kick users if you have turned on the anti-flood and/or the bad-words filters, according to the rules that you have configured.
Another reason for auto-kicking depends on your settings as regards dropped packets. Take a look at your Admin Tool and see if you have at least several thousand dropped packets. If so it is very likely that some "slow" user have been disconnected after a while.
All this is explained in detail here:
http://www.smartfoxserver.com/docs/docP ... ooting.htm
See the 2nd section --> Understanding Dropped Messages
I read this section before your post, but I have already turned off anti-flood and bad-word-filters and I never see in my server control Dropped Msg, it displays always 0. So this is a strange thing.
What reasons are also possible?
What reasons are also possible?
Last edited by Jipii on 27 Dec 2009, 14:26, edited 2 times in total.
Generic network problems. These are more difficult to figure out because there are so many variables.
In general I would say that it can be normal that some users complain about connection dropping from time to time, especially for very large applications with big traffic.
Clients can have all sorts of problems, firewalls, bad OS configurations, slow or unreliable connections etc...
Of course these complaints should be in a reasonable number, let's say 10-20% especially if you don't use the BlueBox (which helps users behind proxies or firewalls to connect)
If the problem is on a different scale you should better investigate with your hosting provider, monitor your bandwidth etc... to diagnose possible network issues on your side.
In general I would say that it can be normal that some users complain about connection dropping from time to time, especially for very large applications with big traffic.
Clients can have all sorts of problems, firewalls, bad OS configurations, slow or unreliable connections etc...
Of course these complaints should be in a reasonable number, let's say 10-20% especially if you don't use the BlueBox (which helps users behind proxies or firewalls to connect)
If the problem is on a different scale you should better investigate with your hosting provider, monitor your bandwidth etc... to diagnose possible network issues on your side.
Lapo wrote:
If the problem is on a different scale you should better investigate with your hosting provider, monitor your bandwidth etc... to diagnose possible network issues on your side.
Sometimes 0-5% of the users are being kicked, sometimes 80%-all.
Now we have also the problem, that idle users after some seconds are being kicked together, including me Admin in the Remote tool. Therefore, our users are very frustrated.
Our network admin does not see any problems in the network. The bandwith is constant, we don't know what to observe next.
By the way: What does this mean? This comes sometimes.
INFO | jvm 1 | 2009/12/27 20:41:49 | 20:41:49.433 - [ INFO ] > Server is up and running!
INFO | jvm 1 | 2009/12/27 20:41:53 | java.net.ConnectException: Connection refused
INFO | jvm 1 | 2009/12/27 20:41:53 | at sun.nio.ch.Net.connect(Native Method)
INFO | jvm 1 | 2009/12/27 20:41:53 | at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
INFO | jvm 1 | 2009/12/27 20:41:53 | at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81)
INFO | jvm 1 | 2009/12/27 20:41:53 | at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.xsocket.stream.io.impl.IoProvider.openSocket(IoProvider.java:346)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.xsocket.stream.io.impl.IoProvider.createClientIoHandler(IoProvider.java:209)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.xsocket.stream.Connection.<init>(Connection.java:160)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java:394)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java:209)
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.utils.net.xmlsocket.XMLSocket.connect(XMLSocket.java:54)
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHandshake.java:29)
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:114)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.Server.handle(Server.java:324)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
INFO | jvm 1 | 2009/12/27 20:41:53 | Invalid connection = null
INFO | jvm 1 | 2009/12/27 20:41:53 | java.lang.NullPointerException
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.utils.net.xmlsocket.XMLSocket.send(XMLSocket.java:93)
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHandshake.java:30)
INFO | jvm 1 | 2009/12/27 20:41:53 | at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:114)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.Server.handle(Server.java:324)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
INFO | jvm 1 | 2009/12/27 20:41:53 | at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
INFO | jvm 1 | 2009/12/27 20:42:10 | java.net.ConnectException: Connection refused
INFO | jvm 1 | 2009/12/27 20:42:10 | at sun.nio.ch.Net.connect(Native Method)
INFO | jvm 1 | 2009/12/27 20:42:10 | at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
INFO | jvm 1 | 2009/12/27 20:42:10 | at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81)
INFO | jvm 1 | 2009/12/27 20:42:10 | at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.xsocket.stream.io.impl.IoProvider.openSocket(IoProvider.java:346)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.xsocket.stream.io.impl.IoProvider.createClientIoHandler(IoProvider.java:209)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.xsocket.stream.Connection.<init>(Connection.java:160)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java:394)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java:209)
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.utils.net.xmlsocket.XMLSocket.connect(XMLSocket.java:54)
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHandshake.java:29)
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:114)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.Server.handle(Server.java:324)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
INFO | jvm 1 | 2009/12/27 20:42:10 | Invalid connection = null
INFO | jvm 1 | 2009/12/27 20:42:10 | java.lang.NullPointerException
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.utils.net.xmlsocket.XMLSocket.send(XMLSocket.java:93)
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHandshake.java:30)
INFO | jvm 1 | 2009/12/27 20:42:10 | at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:114)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.Server.handle(Server.java:324)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
INFO | jvm 1 | 2009/12/27 20:42:10 | at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
The above problem is related with the BlueBox, not SmartFoxServer itself and it looks like the BBox and SFS are not able to communicate.
Are you sure people is able to use sockets in order to connect to your SFS instance? This would be the first thing I need to know.
Can you provide us the IP address and port number of your SFS, we can run a connection test from here. You can send me a PM or an email.
Thanks
Are you sure people is able to use sockets in order to connect to your SFS instance? This would be the first thing I need to know.
Can you provide us the IP address and port number of your SFS, we can run a connection test from here. You can send me a PM or an email.
Thanks
OMG It seems that <ServerIP> in the config file must be the public server ip, not the local ip 127.0.0.1. Since changing it works perfectly, users are not being kicked. Sadly this is not written in the docs.
Could the sever ip which is given client side in smartfox.connect() also be a domain? We are fighting against ddos-attacks, now we get a protection between domain and server (its a load-balancing-server for itself which relays all legal requests). We try to hidden the real server ip, because requests to this server are dont going through the protection, that's why we want to let clients connect through domain and fox port to SmartFoxServer.
Could the sever ip which is given client side in smartfox.connect() also be a domain? We are fighting against ddos-attacks, now we get a protection between domain and server (its a load-balancing-server for itself which relays all legal requests). We try to hidden the real server ip, because requests to this server are dont going through the protection, that's why we want to let clients connect through domain and fox port to SmartFoxServer.
Thanks!