Extension debugging error

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

Moderators: Lapo, Bax

Post Reply
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Extension debugging error

Post 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.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post 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
iceshaft07
Posts: 33
Joined: 28 Jan 2011, 20:10

Post by iceshaft07 »

When I run my debug file, the file says "Listening on 8787". Does this happen with you?
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post by appels »

no, when i attach the debugger, it disconnects again. I get a connection refused in the log of the IDE.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post by appels »

anyone have an idea?
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Post 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.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post 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 ?
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Post by tchen »

No. The batch file will invoke java directly with the parameters. The standalone.exe doesn't invoke the batch file.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post 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.
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Post 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  ....
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post by appels »

yep, that did it. should be added to the docs :)
Post Reply