bainzy@bainzy-ESPRIMO-E3510:~$ java -Xms1024M -Xmx1024M -jar /home/bainzy/minecraft/craftbukkit-0.0.1-SNAPSHOT.jar
151 recipes
16 achievements
22:23:27 [INFO] Starting minecraft server version Beta 1.7.2
22:23:27 [INFO] Loading properties
22:23:27 [INFO] Starting Minecraft server on *:25565
22:23:27 [WARNING] **** FAILED TO BIND TO PORT!
22:23:27 [WARNING] The exception was: java.net.BindException: Address already in use
22:23:27 [WARNING] Perhaps a server is already running on that port?
>
But, it just stops at that, I've checked all my PC's rebooted my hub still apparently there's a connection, I've forwarded all my ports correctly too and they are reachable, everything seems fine - but it still wont start!
It looks like you may have an extra server process using that port.. Try killing any Java processes and starting the server again:
bainzy@bainzy-ESPRIMO-E3510:~$ java -Xms1024M -Xmx1024M -jar /home/bainzy/minecraft/craftbukkit-0.0.1-SNAPSHOT.jar
151 recipes
16 achievements
22:23:27 [INFO] Starting minecraft server version Beta 1.7.2
22:23:27 [INFO] Loading properties
22:23:27 [INFO] Starting Minecraft server on *:25565
22:23:27 [WARNING] **** FAILED TO BIND TO PORT!
22:23:27 [WARNING] The exception was: java.net.BindException: Address already in use
22:23:27 [WARNING] Perhaps a server is already running on that port?
>
But, it just stops at that, I've checked all my PC's rebooted my hub still apparently there's a connection, I've forwarded all my ports correctly too and they are reachable, everything seems fine - but it still wont start!
If you are running it from the command line, you should really be adding 'nogui' to the end of the command you are attempting.
Just a quick script I wrote up to remote control our instances via usermin with several admins around. It creates a .pid file in your server directory containing the process ID of an instance and uses it to determine whether the process is alive on the system. The script accepts a single argument - start, stop or save.
#!/bin/bash
# Minecraft Server Control Script
# 6/10/11 MIKUiqnw0
#==========================================
# Configuration
#==========================================
SERVERNAME="IC2/BC"
SCREENNAME="ibcraft"
SERVERJAR="simpleserver.jar"
PIDFILE="ib.pid"
SERVERDIR="ibserv"
#==========================================
runserver() {
screen -dmS $SCREENNAME java -Xincgc -Xmx512m -jar $SERVERJAR
echo "Starting..."
sleep 5;
PID=`ps x | grep "$SERVERJAR" | grep -v "SCREEN" | grep -v "grep" | awk '{print $1}'`
echo $PID > $PIDFILE;
echo "Started."
}
cd ~/$SERVERDIR/
if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
fi
case "$1" in
start)
if [ "$PID" ]; then
echo "$SERVERNAME PID file is present, checking for process..."
if [ -f "/proc/$PID/exe" ]; then
echo "$SERVERNAME is already running."
else
echo "Process not found, deleting PID file and restarting..."
rm -f $PIDFILE
runserver
fi
else
runserver
fi
;;
save)
if [ "$PID" ]; then
screen -S $SCREENNAME -p 0 -X stuff 'save-all
'
else
echo "$SERVERNAME is not running"
fi
;;
stop)
if [ "$PID" ]; then
screen -S $SCREENNAME -p 0 -X stuff 'stop
'
c=0
while [ -f "/proc/$PID/exe" ] && (( $c < 6 )); do
c=$(( $c + 1 ))
echo "Stopping..."
sleep 5
done
rm -f $PIDFILE
echo "Stopped."
else
echo "$SERVERNAME is not running"
fi
;;
*)
echo "$0 start | stop | save"
;;
esac
Suffice, I was lazy with giving memory assignment its own variable. Feel free though.
Wonderful. so I called my ISP to see if they would do it for me and after a little over thirty minutes of explaining they said they had no clue what to do and transferred me to someone who did, then when they picked up they just hung up on me...
Wonderful. so I called my ISP to see if they would do it for me and after a little over thirty minutes of explaining they said they had no clue what to do and transferred me to someone who did, then when they picked up they just hung up on me...
Assuming you are dealing with a normal ISP, they probably hung up on you because port forwarding is not an issue on their end, and since you are posting in this thread I assume you think it is a problem with your Linux box (its likely not).
You see, port forwarding has everything to do with your router, and since every router is different there is not going to be a simple "here is what you need to do" from anybody. What you should do is figure out the make and model of your router, then use google to see if anyone has written up a how-to port forward for your make/model.
Assuming you are dealing with a normal ISP, they probably hung up on you because port forwarding is not an issue on their end, and since you are posting in this thread I assume you think it is a problem with your Linux box (its likely not).
You see, port forwarding has everything to do with your router, and since every router is different there is not going to be a simple "here is what you need to do" from anybody. What you should do is figure out the make and model of your router, then use google to see if anyone has written up a how-to port forward for your make/model.
After days of talking with various different message boards on this matter I have found that my problem was that I was set to TCP and needed UDP instead.
As for me posting here, there are tons of Windows only programs that do the port forward thing for you, I was kinda hoping there was maybe a Linux version or something...
how do i make it so when i close putty the server will continue to run i dont want to leave my computer on the whole time and im renting a server.
I assume you figured out that you can use screen or tmux on linux to accomplish your goal?
felinoel:
After days of talking with various different message boards on this matter I have found that my problem was that I was set to TCP and needed UDP instead.
I can assure you with all confidence that Minecraft uses TCP and not UDP for its communication requirements. Opening up UDP instead of TCP will not work. It must be TCP. (Opening both works fine, but only because TCP is permitted, not UDP).
how do you get in to edit the server settings? I want to get it set up so I can just leave my old computer running this so me and a friend or to can join, i've tied it on windows but it hasn't worked. Do you have it set up so the computer running the server is also playing it, because I can't do that.
Trying to set up a server on my VPS I have through JaguarPC and am getting the following issues.
Platform: Linux
Operating System: centos-5-x86
1. PuTTy'd as root and ran: which java
2. Didn't have Java installed so I ran: yum install java-1.6.0-openjdk
3. Logged out of root now that Java was installed, logged in to my user account and ran: /usr/bin/java -version
4. After trying to run the version command I get this:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Everything I have read has different opinions on what the issue is but one thing people sometimes agree on is memory. With the VPS package I have I get 1gb of RAM. The only other thing on my account is the following websites which don't seem to eat to much.
eojmarket.com
myu2sig.com
gamestatsnow.com (Basically a work in progress / re-build of myu2sig.com, no current traffic)
There's a few others but they don't really get traffic right now like the two named ones do.
It turns out my issue was memory, since I don't have enough available memory I have to specify my values.
Like if I do /usr/bin/java -version I get the before memntioned error but if I do this (/usr/bin/java -Xms250m -Xmx250m -version), then everything works fine. I havent tried to bump the limits ast 250 because quite frankly I don't know what I have available since I host a lot of sites, the worst offender being myu2sig.com given it's nature but I did notice the Warming mesage that suggested I go back and try it using 1024m.
Looks like I need to add another gig of RAM if not more to my VPS if I want to be able to run a small server. That said, I know it can vary depending on what your doing with mods etc but what would you say the memory req's qould be for lets say a 50 man server with minimal mods ?
Would a gig do it or would something like a gig n a half be more appropriate ?
Edit: I used the mentioned install line in the tut to install Java but I'm curious about something. What's the best way to find out when a new version is available and how would one go about getting it installed to replace the currently named 1.6.0_20 version.
I tried running the install line but got the following.
[root@vps ~]# yum install java-1.7.0-openjdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* rpmforge: ftp-stud.fht-esslingen.de
addons | 951 B 00:00
base | 1.1 kB 00:00
centosplus | 1.9 kB 00:00
contrib | 951 B 00:00
extras | 2.1 kB 00:00
rpmforge | 1.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package java-1.7.0-openjdk available.
Nothing to do
Notice the no package available line... I'm a little confused as how to get the 1.7 package on my VPS server and then installed. Also, FWIW, this is soemthing I should have considered before but can you install 1.7 over 1.6 and have it act like an upgrade or does 1.6 need to be removed first ?
Guys, I'm having a hell of a time getting this thing working... This is what happens:
[root@server minecraft]# java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
16-Aug-10 11:55:32 PM net.minecraft.server.MinecraftServer f
INFO: Stopping server
[root@server minecraft]#
No error or anything... What is going on here?
Also using "yum install java-gcj-compat" installs java version is 1.4, and says it is the latest version.
You need Sun Java brah. I suggest 1.7. But, you have to download that one straight off the Oracle website. This is because Oracle prematurely decided that Open JDK was the way to go, and cancelled the licence that Linux OS distributors were using to distribute the Sun version of Java. Unfortunately Open JDK isn't really ready and breaks a large number of apps and applets like a lot of Internet banking sites, and unfortunately Minecraft server and client. This creates the unfortunate situation of making it illegal to distribute a version of Linux that works with Minecraft or a host of other things. So make sure you send Oracle a nice email saying how you don't approve of this situation.
I'm going to go into some depth here, so sorry if you already know it but maybe it might help someone else reading it hopefully
Go to http://www.oracle.co...ad-1501626.html and pick the one for your operating system, (i586 for 32 bit, x64 for 64 bit Linux), and pick the .tar.gz not the .rpm. This is because even though many different distributors have based their version of Linux around the RPM format, they don't use the same name for packages that provide the same functionality. So even if your system uses RPMs for package management, there is no guarantee that when you try to install an RPM that it will find its depenancies, unless the RPM you are installing was specifically prepared for your version of Linux. Tar balls (.tar.gz, etc.) don't do any dependancy checking, but that's ok because any sort of sensible install should have all the dependancies anyway.
So accept the licence agreement and download the .tar.gz into a convenient directory. Then, unzip (untar w/e ) the file like this:
tar zxvf jdk-7u3-linux-x64.tar.gz
(assuming you are using the 64 bit version and you have a 64 bit Linux). If you don't get any errors you can delete the .tar.gz file if you want to free up space if you feel the need.
There should now be a directory "jdk1.7.0_3" and inside it there will be "jdk1.7.0_3/bin" with all the nice java tools inside that will actually work with Minecraft. You need to add directory this to your PATH (this is where Linux searches for programs), and it needs to be at the start of the PATH so it overides any nasty-assed dainbramaged javas that your Linux installer thought would be better than nothing.
So lets say you put the download into your Downloads directory, and unziped/untared it there. This is the directory "Downloads" in your "$HOME" directory (~ for short), so the java binary ("bin") directory that you need to add to your path will be "~/Downloads/jdk1.7.0_03/bin" for short.
So you would need to do this:
export PATH="~/Downloads/jdk1.7.0_03/bin":$PATH
This puts the java bin directory you made at the start of the list of programs that Linux searches (for this session), retaining the old PATH at the end. NOTE the separator for path (and many other things) in Linux is : the colon NOT ; the semi-colon. I.e. one dot ontop of a dot, NOT one dot ontop of a coma like Windows.
Now where do you need to put this? You could just do it in the terminal you were about to launch the Minecraft server from. This works, but you have to do it every time you make a new terminal to restart Minecraft. If you are going to always launch the Minecraft server from a terminal, and/or you need the Sun Java for other stuff, put the line into the file "~/.profile". This file is launched whenever an interactive shell (terminal) is made, or something Also any file with a dot in front of it defaults as hidden, so if you can't see it and are in a file manager thingy, press <Ctrl>-h to unhide it. Then after you have edited and saved .profile do a
. ~/.profile
to bring the changes you made into your current session.
If you have some automatic script to launch the Minecraft server, then put it there. But be aware that if it is launched at boot time, it will probably not be launched using your user profile, but usually as root. Yes as several people have pointed out launching anything that doesn't REALLY need it as root is a bad idea. But that's another story.
If your original user name was say Goatflakes, then if you are running as another user, like root, to get at Goatflakes' stuff you would replace the "~" with "~Goatflakes" so put this instead:
It turns out my issue was memory, since I don't have enough available memory I have to specify my values.
Like if I do /usr/bin/java -version I get the before memntioned error but if I do this (/usr/bin/java -Xms250m -Xmx250m -version), then everything works fine. I havent tried to bump the limits ast 250 because quite frankly I don't know what I have available since I host a lot of sites, the worst offender being myu2sig.com given it's nature but I did notice the Warming mesage that suggested I go back and try it using 1024m.
Looks like I need to add another gig of RAM if not more to my VPS if I want to be able to run a small server. That said, I know it can vary depending on what your doing with mods etc but what would you say the memory req's qould be for lets say a 50 man server with minimal mods ?
Would a gig do it or would something like a gig n a half be more appropriate ?
Edit: I used the mentioned install line in the tut to install Java but I'm curious about something. What's the best way to find out when a new version is available and how would one go about getting it installed to replace the currently named 1.6.0_20 version.
I tried running the install line but got the following.
[root@vps ~]# yum install java-1.7.0-openjdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* rpmforge: ftp-stud.fht-esslingen.de
addons | 951 B 00:00
base | 1.1 kB 00:00
centosplus | 1.9 kB 00:00
contrib | 951 B 00:00
extras | 2.1 kB 00:00
rpmforge | 1.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package java-1.7.0-openjdk available.
Nothing to do
Notice the no package available line... I'm a little confused as how to get the 1.7 package on my VPS server and then installed. Also, FWIW, this is soemthing I should have considered before but can you install 1.7 over 1.6 and have it act like an upgrade or does 1.6 need to be removed first ?
As I mentioned in my previous post you need to download Sun Java manually from the Oracle website. Open JDK fails mysteriously with Minecraft server, and frankly, isn't ready for the prime time. Check my last for detailed instructions and the reason why your Linux distributor can't provide you with Sun Java 1.7.
EDIT: You probably have to download the Sun Java .tar.gz to your home computer and then upload it to your VPS using PuTTY or scp or something. I doubt using wget or something like that on your VPS would work because of the way Oracle checks that you have accepted the licence agreement. Also don't forget to do a
This will NOT work on directories... FFS...
In order to remove an entire directory in linux/unix you would need to add the right flags.
Lulz
It looks like you may have an extra server process using that port.. Try killing any Java processes and starting the server again:
If you are running it from the command line, you should really be adding 'nogui' to the end of the command you are attempting.
Lulz
This tutorial is great, thanks
I get an error when making the command to run the server.
"Could not reserve enough space for object heap"
After doing some research i found it has to do with the Hadoop but i have no idea how to configure.
Any help would be greatly appreciated.
Thanks
in a linux box use "ifconfig" in a terminal.
player.me/felinoel
Suffice, I was lazy with giving memory assignment its own variable. Feel free though.
Wonderful. so I called my ISP to see if they would do it for me and after a little over thirty minutes of explaining they said they had no clue what to do and transferred me to someone who did, then when they picked up they just hung up on me...
player.me/felinoel
Assuming you are dealing with a normal ISP, they probably hung up on you because port forwarding is not an issue on their end, and since you are posting in this thread I assume you think it is a problem with your Linux box (its likely not).
You see, port forwarding has everything to do with your router, and since every router is different there is not going to be a simple "here is what you need to do" from anybody. What you should do is figure out the make and model of your router, then use google to see if anyone has written up a how-to port forward for your make/model.
After days of talking with various different message boards on this matter I have found that my problem was that I was set to TCP and needed UDP instead.
As for me posting here, there are tons of Windows only programs that do the port forward thing for you, I was kinda hoping there was maybe a Linux version or something...
player.me/felinoel
player.me/felinoel
I assume you figured out that you can use screen or tmux on linux to accomplish your goal?
felinoel:
I can assure you with all confidence that Minecraft uses TCP and not UDP for its communication requirements. Opening up UDP instead of TCP will not work. It must be TCP. (Opening both works fine, but only because TCP is permitted, not UDP).
Platform: Linux
Operating System: centos-5-x86
1. PuTTy'd as root and ran: which java
2. Didn't have Java installed so I ran: yum install java-1.6.0-openjdk
3. Logged out of root now that Java was installed, logged in to my user account and ran: /usr/bin/java -version
4. After trying to run the version command I get this:
Everything I have read has different opinions on what the issue is but one thing people sometimes agree on is memory. With the VPS package I have I get 1gb of RAM. The only other thing on my account is the following websites which don't seem to eat to much.
eojmarket.com
myu2sig.com
gamestatsnow.com (Basically a work in progress / re-build of myu2sig.com, no current traffic)
There's a few others but they don't really get traffic right now like the two named ones do.
Like if I do /usr/bin/java -version I get the before memntioned error but if I do this (/usr/bin/java -Xms250m -Xmx250m -version), then everything works fine. I havent tried to bump the limits ast 250 because quite frankly I don't know what I have available since I host a lot of sites, the worst offender being myu2sig.com given it's nature but I did notice the Warming mesage that suggested I go back and try it using 1024m.
Looks like I need to add another gig of RAM if not more to my VPS if I want to be able to run a small server. That said, I know it can vary depending on what your doing with mods etc but what would you say the memory req's qould be for lets say a 50 man server with minimal mods ?
Would a gig do it or would something like a gig n a half be more appropriate ?
Edit: I used the mentioned install line in the tut to install Java but I'm curious about something. What's the best way to find out when a new version is available and how would one go about getting it installed to replace the currently named 1.6.0_20 version.
Edit 2: Actually just found this: http://openjdk.java.net/install/
It shows 1.7 as the newest build.
I tried running the install line but got the following.
Notice the no package available line... I'm a little confused as how to get the 1.7 package on my VPS server and then installed. Also, FWIW, this is soemthing I should have considered before but can you install 1.7 over 1.6 and have it act like an upgrade or does 1.6 need to be removed first ?
You need Sun Java brah. I suggest 1.7. But, you have to download that one straight off the Oracle website. This is because Oracle prematurely decided that Open JDK was the way to go, and cancelled the licence that Linux OS distributors were using to distribute the Sun version of Java. Unfortunately Open JDK isn't really ready and breaks a large number of apps and applets like a lot of Internet banking sites, and unfortunately Minecraft server and client. This creates the unfortunate situation of making it illegal to distribute a version of Linux that works with Minecraft or a host of other things. So make sure you send Oracle a nice email saying how you don't approve of this situation.
I'm going to go into some depth here, so sorry if you already know it but maybe it might help someone else reading it hopefully
Go to http://www.oracle.co...ad-1501626.html and pick the one for your operating system, (i586 for 32 bit, x64 for 64 bit Linux), and pick the .tar.gz not the .rpm. This is because even though many different distributors have based their version of Linux around the RPM format, they don't use the same name for packages that provide the same functionality. So even if your system uses RPMs for package management, there is no guarantee that when you try to install an RPM that it will find its depenancies, unless the RPM you are installing was specifically prepared for your version of Linux. Tar balls (.tar.gz, etc.) don't do any dependancy checking, but that's ok because any sort of sensible install should have all the dependancies anyway.
So accept the licence agreement and download the .tar.gz into a convenient directory. Then, unzip (untar w/e ) the file like this:
(assuming you are using the 64 bit version and you have a 64 bit Linux). If you don't get any errors you can delete the .tar.gz file if you want to free up space if you feel the need.
There should now be a directory "jdk1.7.0_3" and inside it there will be "jdk1.7.0_3/bin" with all the nice java tools inside that will actually work with Minecraft. You need to add directory this to your PATH (this is where Linux searches for programs), and it needs to be at the start of the PATH so it overides any nasty-assed dainbramaged javas that your Linux installer thought would be better than nothing.
So lets say you put the download into your Downloads directory, and unziped/untared it there. This is the directory "Downloads" in your "$HOME" directory (~ for short), so the java binary ("bin") directory that you need to add to your path will be "~/Downloads/jdk1.7.0_03/bin" for short.
So you would need to do this:
This puts the java bin directory you made at the start of the list of programs that Linux searches (for this session), retaining the old PATH at the end. NOTE the separator for path (and many other things) in Linux is : the colon NOT ; the semi-colon. I.e. one dot ontop of a dot, NOT one dot ontop of a coma like Windows.
Now where do you need to put this? You could just do it in the terminal you were about to launch the Minecraft server from. This works, but you have to do it every time you make a new terminal to restart Minecraft. If you are going to always launch the Minecraft server from a terminal, and/or you need the Sun Java for other stuff, put the line into the file "~/.profile". This file is launched whenever an interactive shell (terminal) is made, or something Also any file with a dot in front of it defaults as hidden, so if you can't see it and are in a file manager thingy, press <Ctrl>-h to unhide it. Then after you have edited and saved .profile do a
to bring the changes you made into your current session.
If you have some automatic script to launch the Minecraft server, then put it there. But be aware that if it is launched at boot time, it will probably not be launched using your user profile, but usually as root. Yes as several people have pointed out launching anything that doesn't REALLY need it as root is a bad idea. But that's another story.
If your original user name was say Goatflakes, then if you are running as another user, like root, to get at Goatflakes' stuff you would replace the "~" with "~Goatflakes" so put this instead:
Or you could setup java in a place like /opt or some crap and just use the full directory name instead of squiggle shortcuts
Hope this helps someone
EDIT: You can most likely use an RPM if you are running Fedora, otherwise stick to the tarball.
As I mentioned in my previous post you need to download Sun Java manually from the Oracle website. Open JDK fails mysteriously with Minecraft server, and frankly, isn't ready for the prime time. Check my last for detailed instructions and the reason why your Linux distributor can't provide you with Sun Java 1.7.
EDIT: You probably have to download the Sun Java .tar.gz to your home computer and then upload it to your VPS using PuTTY or scp or something. I doubt using wget or something like that on your VPS would work because of the way Oracle checks that you have accepted the licence agreement. Also don't forget to do a
to check whether you need the i586 or x64 Java!