Webserver issues... Cannot connect
19 replies [Last post]
Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9

Hi guys, 

 

I have a slight issue I am running a webserver with Linux CentOS I have downloaded the minecraft_server.jar file to a root folder as the root user as you do. I have run it using this command....

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

 

Sure enough the server boots up and starts running....

 

 

Last night my friend could connect to it ( I couldn't test as I set it up from my phone on SSH). He managed to join the world and mess about. Great I thought so I stopped the server and closed off the SSH. Now today I ran that very same command as above and it started up but when I try and connect it won't let me? Just says's Cannot reach server. 

 

 

Any clue as to why it would work last night but not today?

 

Like I say I'm running it off a webserver not a local host. 

 

Nick

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

open cmd on your windows run bar and do ping 184.72.166.136 and see if you can have a active connection to your VPS server but if you dont, then talk to the VPS hosting support team as they can help fix the problem

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
Cheers for the reply. The

Cheers for the reply. The server can ping just find it sends and receives packets no problems. I've restarted the server, closed the running process on the server, deleted and re installed the jar file to run the server software including all its dependant files.

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

centOS 5 or 6?

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
CENTOS 5.9 x86_64 virtuozzo –

CENTOS 5.9 x86_64 virtuozzo – web

That's what it's running mate.

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

openJDK 6 or openJDK 7

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
 java version

 

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.9) (rhel-1.36.1.11.9.el5_9-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
 
Seems 6?
ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

use this as your java launch command

java -Xmx768M -Xms256M -jar minecraft_server.jar nogui

then tell me if it launches

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
Sorry for the late reply,  I

Sorry for the late reply,  I just tried the above

 

java -Xmx768M -Xms256M -jar minecraft_server.jar nogui

 

Still no luck :(

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

do you get any errors?

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
No errors server side it

No errors server side it fired up just fine.

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
 Here's a full start to stop

 

Here's a full start to stop sequence with no errors I can see and a directory listing.
 
root@web [~/Minecraft]# java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
229 recipes
27 achievements
2013-04-27 10:18:37 [INFO] Starting minecraft server version 1.5.1
2013-04-27 10:18:37 [INFO] Loading properties
2013-04-27 10:18:37 [INFO] Default game type: SURVIVAL
2013-04-27 10:18:37 [INFO] Generating keypair
2013-04-27 10:18:38 [INFO] Starting Minecraft server on *:25565
2013-04-27 10:18:38 [INFO] Preparing level "world"
2013-04-27 10:18:38 [INFO] Preparing start region for level 0
2013-04-27 10:18:39 [INFO] Preparing spawn area: 49%
2013-04-27 10:18:40 [INFO] Done (2.167s)! For help, type "help" or "?"
stop
2013-04-27 10:19:17 [INFO] Stopping the server
2013-04-27 10:19:17 [INFO] Stopping server
2013-04-27 10:19:17 [INFO] Saving players
2013-04-27 10:19:17 [INFO] Saving worlds
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/Overworld
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:375)
at java.net.ServerSocket.implAccept(ServerSocket.java:470)
at java.net.ServerSocket.accept(ServerSocket.java:438)
at if.run(SourceFile:61)
2013-04-27 10:19:17 [INFO] Closing listening thread
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/Nether
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/The End
2013-04-27 10:19:17 [INFO] Stopping server
2013-04-27 10:19:17 [INFO] Saving players
2013-04-27 10:19:17 [INFO] Saving worlds
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/Overworld
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/Nether
2013-04-27 10:19:17 [INFO] Saving chunks for level 'world'/The End
root@web [~/Minecraft]# ls
./   banned-ips.txt      csminecraft/          ops.txt     server.properties  world/
../  banned-players.txt  minecraft_server.jar  server.log  white-list.txt
root@web [~/Minecraft]# 

 

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

how much ram do you have for your VPS

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
It's a shared vps maximum

It's a shared vps maximum 12GB RAM but other VPN accounts run on the same server and we all share the 12GB.

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

it can be that others are taking the RAM needed so talk to who ever is the owner about getting a gig of ram for you

Chapster5
WoM Member
Members
WoM Member: 627255
WoM Coins: 9
Cheers mate, trouble is

Cheers mate, trouble is without a dedicated server it's not possible to reserve ram. It's not important anyway just a bit of fun to see if it would work lol just thought it weird that my mate could connect one night then not at all.

 

nick

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

well it can also sound like that they blocked that port as well via the firewall to not be allowed to go though so that can also be the reason

uplusion23
Forum Moderator
Forum Moderators
WoM Member: 171471
WoM Coins: 898
 Use the following to see if

 

Use the following to see if your Firewall is blocking it. This method is a test method and you should only disable specific areas, not the whole thing. But for time purposes, just try this. Task: Disable / Turn off Linux Firewall (Red hat/CentOS/Fedora Core)

Type the following two commands (you must login as the root user):
# /etc/init.d/iptables save
# /etc/init.d/iptables stop


Turn off firewall on boot:
# chkconfig iptables off

Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core)

Type the following command to turn on iptables firewall:
# /etc/init.d/iptables start
Turn on firewall on boot:
# chkconfig iptables on

 

 

If that does not work, try running Craftbukkit servers.

 

mgslymen99
Epic Contributor
Contributor
WoM Member: 606084
WoM Coins: 1124
I didnt really bother to read all this...

I use MineOS on linux and it works fine. Especially for vanilla. It has easy server run options and shows you different things to enable. It does not take up much space on the hardrive either. It also has a runtekkit option if your into that  well as bukkit and vanilla. 

I hope this helped.

I strongly recommend it.

ssfdre38
Epic Contributor
Contributor +
WoM Member: 369733
WoM Coins: 1405

mineOS is just Ubuntu with minecraft depencies added ontop of it so really any Linux os will just do just as long as you have OpenJDK 6 or OpenJDK7 installed and you have ROOT access to open port 25565 with iptables