Page 1 of 1

Extension debugging error

Posted: 15 Feb 2011, 12:36
by appels
Hi,

When i try to attach NetBeans for extension debugging i get this error :

15:05:46,916 INFO [main] v2.SmartFoxServer - SmartFoxServer 2X (2.0.0-RC1b)
READY!
15:05:59,169 INFO [SocketReader] core.SocketAcceptor - Session created: { I
d: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:52850 } on Server port: 9933 <---
> 52850
15:05:59,175 INFO [SocketReader] sessions.DefaultSessionManager - Session r
emoved: { Id: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:52850 }
15:05:59,187 WARN [SocketReader] binary.BinaryIoHandler - Incoming request
size too large: 1146572845, Current limit: 8000000, From: { Id: 1, Type: DEFAULT
, Logged: No, IP: 127.0.0.1:52850 }


I added the debug string from the docs to the server shortcut.
Can someone tell me whats going wrong or what setting i need to change ?
Thanks.

Posted: 15 Feb 2011, 13:00
by appels
ok, found out i need to connect to 8787 but then i get a connection refused :

Attaching to localhost:8787
Connection refused.

this is my debug.bat :

@java -cp "./;lib/*;lib/Jetty/*;extensions/__lib__/*" -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2 $3 -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

Posted: 15 Feb 2011, 16:53
by iceshaft07
When I run my debug file, the file says "Listening on 8787". Does this happen with you?

Posted: 15 Feb 2011, 21:59
by appels
no, when i attach the debugger, it disconnects again. I get a connection refused in the log of the IDE.

Posted: 16 Feb 2011, 19:27
by appels
anyone have an idea?

Posted: 16 Feb 2011, 19:51
by tchen
When you startup via the batch.. do you see

Listening for transport dt_socket at address: 8787

anywhere in the console? Make sure you're not running the sfs2x-standalone.exe because I forgot where my shortcut was pointing and did that myself.

Posted: 16 Feb 2011, 20:02
by appels
appels wrote:no, when i attach the debugger, it disconnects again. I get a connection refused in the log of the IDE.
i get a diconnect on 8787.
I am using it as a standalone, doesn't that work ?

Posted: 16 Feb 2011, 20:09
by tchen
No. The batch file will invoke java directly with the parameters. The standalone.exe doesn't invoke the batch file.

Posted: 16 Feb 2011, 20:14
by appels
oh yes the debug.bat from the docs, when i use that i get :
Attaching to 127.0.0.1:8787
Connection refused.

Posted: 16 Feb 2011, 21:24
by tchen
I kinda forgot to mention it earlier (sorry), but move the debug options in your batch file to before the -cp option.

:D Don't ask me why.

Code: Select all

java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -cp  ....

Posted: 16 Feb 2011, 21:33
by appels
yep, that did it. should be added to the docs :)