Server won't run.

I tried changing the port and un-forwarding the old one then re-forwarding it but it didn't work. D: Heres what it says when I run it:

run:
Shoddy Battle (June 2007) - http://shoddybattle.com
By Colin James Fitzpatrick and Benjamin Gwin.
This program is free software.
Licensed under the GNU General Public Licence. No warranty.
Loading properties file...
Loading metagame definition file...
Loading pokemon database...
Unimplemented intrinsic ability: Stall
Loading move types for the Jewel generation...
Initialising hold items...
Loading masses...
Connecting to database...
Initialising random number generator...
Loading battle mechanics...
Creating server...
Adding shut down hook...
Applying patch file to database...
java.lang.NumberFormatException: For input string: "Headbutt"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.valueOf(Integer.java:553)
at shoddybattle.ModData.modifyStat(ModData.java:348)
at shoddybattle.ModData.parsePatchLine(ModData.java:532)
at shoddybattle.ModData.applyPatch(ModData.java:584)
at shoddybattle.ModData.applyPatch(ModData.java:562)
at shoddybattle.Main.main(Main.java:361)
Saving mod data for download by client...
Caching move sets...
Unimplemented move: Natural Gift
Unimplemented move: Recycle
There are 2 unimplemented moves.
The move library is 100% implemented.
Running server...
Loading ladder definitions...
Opening a TCP/IP socket on port 21197...
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at netbattle.BattleServer.run(BattleServer.java:489)
at shoddybattle.Main.main(Main.java:388)
Shutting down...
BUILD SUCCESSFUL (total time: 5 seconds)
 
First, you have 2 errors.

The first one:
Code:
java.lang.NumberFormatException: For input string: "Headbutt"
at java.lang.NumberFormatException.forInputString(Num berFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.valueOf(Integer.java:553)
at shoddybattle.ModData.modifyStat(ModData.java:348)
at shoddybattle.ModData.parsePatchLine(ModData.java:5 32)
at shoddybattle.ModData.applyPatch(ModData.java:584)
at shoddybattle.ModData.applyPatch(ModData.java:562)
at shoddybattle.Main.main(Main.java:361)
I see you've applied the HG/SS Patch. This is normal, its saying that some pokemon that have previously had HeadButt are getting it again. This is harmless, and just ignore it.

The second one:
Code:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java :359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185 )
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at netbattle.BattleServer.run(BattleServer.java:489)
at shoddybattle.Main.main(Main.java:388)
It's saying you're already using the port 21197. Do you have anything else using that port. Torrent Client/Other server/anitivirus, are some. You could change the port, then you'll have to re(open/forward) it again. Try stopping anything that would be using that port.

After that, try rebooting your server and see if you can connect with
Code:
Host: localhost
Port: 21197
 
I restarted the computer and when I run it I only get the headbutt error. It says server is running next rating update in 7 hours but other people can't connect. It says Error connection time out or something. Also I'm using port 41197 now and I still get the same error. Sometimes I get it, sometimes I don't. It won't let anyone connect either way. When I build I get this, I don't know it it's normal or not:

Copy libraries to C:\Users\Test\Documents/ShoddyBattle\dist\lib.
To run this application from the command line without Ant, try:
java -jar "C:\Users\Test\Documents\ShoddyBattle\dist\ShoddyBattle.jar"
jar:
BUILD SUCCESSFUL (total time: 1 second)
 
No, that build is normal. Whatever it is, a firewall might be blocking the ports. Try unblocking it, and rebooting your SERVER(not your computer) and it should work.

You didn't have to restart you computer, I ment the server in NetBeans.
 
I turned off Windows Firewall all together and it still doesn't work. My laptop connects for some reason.... it's just other can't connect. I can connect on my laptop through 21197 and 41197 if that helps.... That error means it's in use by another program, right? What can use port 41197, I thought other programs only used up to like 3000.
 
I am not a program port expert, but something is using 41197, and I don't know what. You'll just have to experiment.
 
I turned off Windows Firewall all together and it still doesn't work. My laptop connects for some reason.... it's just other can't connect. I can connect on my laptop through 21197 and 41197 if that helps.... That error means it's in use by another program, right? What can use port 41197, I thought other programs only used up to like 3000.
It's pretty obvious that your router is blocking external access to your server, but you can access it internally. Unblock the port on your router.
 
It's not blocking external access. If it is I can't find how to enable it in the router settings. Theres no option in port forwarding.
 
When you get it running, try connecting with...
Code:
Host: Localhost
Port: 41197
Let me know the outcome.
 

chaos

is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Smogon Discord Contributoris a Contributor to Smogonis an Administratoris a Tournament Director Alumnusis a Researcher Alumnus
Owner
Some ISPs don't allow you to receive connections. They are sneaky. If this is the case, you can't really do anything about it.

Alternatively, try specifying your host to be your actual IP address (go to http://whatismyip.com/ to find out). I know of several libraries that allocate a UNIX socket (i.e., only your computer will be able to connect to your server) if you put in localhost as the host.
 
It's not my ISP, the server worked before. If I try to put in my IP as the host I get:

Code:
SQLException: null,  message from server: "Host 'Test-PC' is not allowed to connect to this MySQL server"
SQLState: HY000
VendorError: 1130
I can connect using Local host and 4999 (changed it again, still won't work...).
 
First of all, try to stick with one port, it's confusing me.

If you can connect, try from a different computer, ok?

You'll need the computer IP (Run -> Cmd -> Ipconfig. Get the 'IP' should be like 192.168.x.x) Once you have the IP, go to another computer, and test it with the host being the IP that your computer has(The one like 192.168.x.x) and the port in the server.properties file.

Let me know the outcome.
 
I can connect from my laptop using the IP, but no one else can. When I log in it says accepted new client Test-pc on Netbeans.
 
Then, once you can connect through the network, you know its outside the network. Search around your router, make sure the ports are forwarded, and allow connections to there.
 
How do I allow connections to there? I know the ports forwarded. I've looked through everything on my router settings and theres no option to allow external access to the ports, do I do this somewhere else? My router model is Netgear WNR2000 if that helps.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top