LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2012, 08:30 PM   #1
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Rep: Reputation: Disabled
How do I port forward correctly?


Hey guys I bought a VPS running CentOs 6.2 and I'm trying to set up a minecraft server which uses port 25565 How do I do that?




Also I get this when I start up my sever
http://pastebin.com/g05K13NF

Thanks all! I hope to see you all soon and hopefully I'll be able to help people

BMX
 
Old 09-03-2012, 02:56 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

it looks like it may be problem with your java installation. Are you using a "recommended" java version.

I've had success with openjdk 6. See:

http://www.linuxquestions.org/questi...ml#post4737294

I also notice that the jar file you are using does not appear to be the standard minecraft_server.jar

Finally, one other thing is that you shouldn't really be doing this as root.

Evo2.
 
1 members found this post helpful.
Old 09-03-2012, 03:09 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I just realised that the output you posted suggests that there may already be something attached to that port.
Can you confirm that no other mincraft instance (or anything else) is running on port 25565? Ie is there any output from the following command?
Code:
lsof -i :25565
Evo2.
 
1 members found this post helpful.
Old 09-03-2012, 10:23 AM   #4
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

it looks like it may be problem with your java installation. Are you using a "recommended" java version.

I've had success with openjdk 6. See:

http://www.linuxquestions.org/questi...ml#post4737294

I also notice that the jar file you are using does not appear to be the standard minecraft_server.jar

Finally, one other thing is that you shouldn't really be doing this as root.

Evo2.
I'm not to sure what version I watched a tutorial and I downloaded java through the command line

I'll check that out

It's a craftbukkit jar (Server mod)

I couldn't figure out how to give my "minecraft" user the correct permissions

Thanks for the reply!
BMX
 
Old 09-03-2012, 10:30 AM   #5
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

I just realised that the output you posted suggests that there may already be something attached to that port.
Can you confirm that no other mincraft instance (or anything else) is running on port 25565? Ie is there any output from the following command?
Code:
lsof -i :25565
Evo2.
No output
 
Old 09-03-2012, 04:27 PM   #6
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Bump, I need help badly Sorry if bumping is against the rules I haven't taken a look at those yet

~BMX
 
Old 09-03-2012, 08:58 PM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

to help you we need information.

For example, what java version are you using? Eg output of
Code:
readlink -f $(which java)
How did you install and how?

Does a standard minecraft sever work?

Regarding running as root: what permissions problems did you have running as a non-root user? Ie what did you actually do, and what errors were reported.

Evo2.
 
Old 09-03-2012, 09:47 PM   #8
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

to help you we need information.

For example, what java version are you using? Eg output of
Code:
readlink -f $(which java)
How did you install and how?

Does a standard minecraft sever work?

Regarding running as root: what permissions problems did you have running as a non-root user? Ie what did you actually do, and what errors were reported.

Evo2.
http://www.youtube.com/watch?v=JYodi9Qzf0U
I used that video, it installed java with it,
the readlink didn't work
I installed it through the commandline

Haven't tried, I purchased the VPS 2 days ago :/

It didn't have permissions to execute an install.sh file

Thanks!
BMX
 
Old 09-03-2012, 11:38 PM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

Quote:
Originally Posted by BMX_ATVMAN14 View Post
http://www.youtube.com/watch?v=JYodi9Qzf0U
I used that video, it installed java with it,
Sorry, I don't do youtube.
Quote:
the readlink didn't work
It is of almost not use to say "didn't work" or similar. Please report the error messages. Ie cut and paste what is in the terminal so that we have a chance of working out what is going on.
Quote:
I installed it through the commandline
Again, that doesn't tell me much.

Quote:
Haven't tried, I purchased the VPS 2 days ago :/
?

Quote:
It didn't have permissions to execute an install.sh file
Then change the permissions on the file.

To try to isolate the problem I think you should start by trying to run the standard minecraft server.
Eg. run the following commands to download, and then run it.
Code:
wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
java -Xms1G -Xmx1G -jar minecraft_server.jar nogui
Regards,

Evo2.

PS. I can't stress enough how important it is to post the exact commands you run and the error messages reported, preferably cut and pasted from the terminal.
 
Old 09-04-2012, 03:32 PM   #10
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,


Sorry, I don't do youtube.

It is of almost not use to say "didn't work" or similar. Please report the error messages. Ie cut and paste what is in the terminal so that we have a chance of working out what is going on.

Again, that doesn't tell me much.
Yum install java

Quote:
Originally Posted by evo2 View Post

Then change the permissions on the file.

To try to isolate the problem I think you should start by trying to run the standard minecraft server.
Eg. run the following commands to download, and then run it.
Code:
wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
java -Xms1G -Xmx1G -jar minecraft_server.jar nogui
Regards,

Evo2.


PS. I can't stress enough how important it is to post the exact commands you run and the error messages reported, preferably cut and pasted from the terminal.
Ok thanks! I'll give it a try and post in a little bit

Thanks,
BMX
 
Old 09-04-2012, 10:10 PM   #11
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Results

Code:
2012-09-04 22:09:26 [INFO] Starting Minecraft server on *:25565
java.lang.NoSuchMethodError: method java.net.ServerSocket.setPerformancePreferences with signature (III)V was not found.
   at fy.<init>(SourceFile:31)
   at fx.<init>(SourceFile:16)
   at ft.b(SourceFile:109)
   at net.minecraft.server.MinecraftServer.run(SourceFile:291)
   at ep.run(SourceFile:539)
2012-09-04 22:09:26 [SEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: method java.net.ServerSocket.setPerformancePreferences with signature (III)V was not found.
   at fy.<init>(SourceFile:31)
   at fx.<init>(SourceFile:16)
   at ft.b(SourceFile:109)
   at net.minecraft.server.MinecraftServer.run(SourceFile:291)
   at ep.run(SourceFile:539)
2012-09-04 22:09:26 [SEVERE] This crash report has been saved to: /root/./crash-reports/crash-2012-09-04_22.09.26-server.txt
 
Old 09-04-2012, 10:57 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I'm assuming the output you posted is from the standard minecraft_sever.jar. If so, this really does look like a java problem, not a problem with the server app itself.

I note that you are running this on CentOS 6.2, so I just tried it on an SL 6.2 machine and had no problems. Here is the output for my session:
Code:
% readlink -f $(which java)
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
% lsb_release --all
LSB Version:	:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:	Scientific
Description:	Scientific Linux release 6.2 (Carbon)
Release:	6.2
Codename:	Carbon
% wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
Resolving s3.amazonaws.com (s3.amazonaws.com)... 207.171.185.200
Connecting to s3.amazonaws.com (s3.amazonaws.com)|207.171.185.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1801710 (1.7M) [application/octet-stream]
Saving to: ‘minecraft_server.jar’

100%[=========================================>] 1,801,710    630KB/s   in 2.8s   

2012-09-05 11:44:08 (630 KB/s) - ‘minecraft_server.jar’ saved [1801710/1801710]
% java -Xms1G -Xmx1G -jar minecraft_server.jar nogui
195 recipes
27 achievements
2012-09-05 11:47:46 [INFO] Starting minecraft server version 1.3.2
2012-09-05 11:47:46 [INFO] Loading properties
2012-09-05 11:47:46 [WARNING] server.properties does not exist
2012-09-05 11:47:46 [INFO] Generating new properties file
2012-09-05 11:47:46 [INFO] Default game type: SURVIVAL
2012-09-05 11:47:46 [INFO] Generating keypair
2012-09-05 11:47:47 [INFO] Starting Minecraft server on *:25565
2012-09-05 11:47:47 [WARNING] Failed to load operators list: java.io.FileNotFoundException: ./ops.txt (No such file or directory)
2012-09-05 11:47:47 [WARNING] Failed to load white-list: java.io.FileNotFoundException: ./white-list.txt (No such file or directory)
2012-09-05 11:47:47 [INFO] Preparing level "world"
2012-09-05 11:47:48 [INFO] Preparing start region for level 0
2012-09-05 11:47:49 [INFO] Preparing spawn area: 0%
2012-09-05 11:47:50 [INFO] Preparing spawn area: 4%
2012-09-05 11:47:51 [INFO] Preparing spawn area: 4%
2012-09-05 11:47:52 [INFO] Preparing spawn area: 8%
2012-09-05 11:47:53 [INFO] Preparing spawn area: 16%
2012-09-05 11:47:54 [INFO] Preparing spawn area: 24%
2012-09-05 11:47:55 [INFO] Preparing spawn area: 28%
2012-09-05 11:47:56 [INFO] Preparing spawn area: 40%
2012-09-05 11:47:57 [INFO] Preparing spawn area: 52%
2012-09-05 11:47:58 [INFO] Preparing spawn area: 65%
2012-09-05 11:47:59 [INFO] Preparing spawn area: 73%
2012-09-05 11:48:00 [INFO] Preparing spawn area: 81%
2012-09-05 11:48:01 [INFO] Preparing spawn area: 89%
2012-09-05 11:48:02 [INFO] Preparing spawn area: 97%
2012-09-05 11:48:02 [INFO] Done (15.080s)! For help, type "help" or "?"
So, I need to know what version of java you are using. So please try to run the "readlink" command exactly as I did above and post the output (even if it "doesn't work"). The other useful thing to do would be to post the log file that is referenced in the last line of your post.

Evo2.
 
Old 09-05-2012, 03:16 PM   #13
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

I'm assuming the output you posted is from the standard minecraft_sever.jar. If so, this really does look like a java problem, not a problem with the server app itself.

I note that you are running this on CentOS 6.2, so I just tried it on an SL 6.2 machine and had no problems. Here is the output for my session:
Code:
% readlink -f $(which java)
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
% lsb_release --all
LSB Version:	:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:	Scientific
Description:	Scientific Linux release 6.2 (Carbon)
Release:	6.2
Codename:	Carbon
% wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
Resolving s3.amazonaws.com (s3.amazonaws.com)... 207.171.185.200
Connecting to s3.amazonaws.com (s3.amazonaws.com)|207.171.185.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1801710 (1.7M) [application/octet-stream]
Saving to: ‘minecraft_server.jar’

100%[=========================================>] 1,801,710    630KB/s   in 2.8s   

2012-09-05 11:44:08 (630 KB/s) - ‘minecraft_server.jar’ saved [1801710/1801710]
% java -Xms1G -Xmx1G -jar minecraft_server.jar nogui
195 recipes
27 achievements
2012-09-05 11:47:46 [INFO] Starting minecraft server version 1.3.2
2012-09-05 11:47:46 [INFO] Loading properties
2012-09-05 11:47:46 [WARNING] server.properties does not exist
2012-09-05 11:47:46 [INFO] Generating new properties file
2012-09-05 11:47:46 [INFO] Default game type: SURVIVAL
2012-09-05 11:47:46 [INFO] Generating keypair
2012-09-05 11:47:47 [INFO] Starting Minecraft server on *:25565
2012-09-05 11:47:47 [WARNING] Failed to load operators list: java.io.FileNotFoundException: ./ops.txt (No such file or directory)
2012-09-05 11:47:47 [WARNING] Failed to load white-list: java.io.FileNotFoundException: ./white-list.txt (No such file or directory)
2012-09-05 11:47:47 [INFO] Preparing level "world"
2012-09-05 11:47:48 [INFO] Preparing start region for level 0
2012-09-05 11:47:49 [INFO] Preparing spawn area: 0%
2012-09-05 11:47:50 [INFO] Preparing spawn area: 4%
2012-09-05 11:47:51 [INFO] Preparing spawn area: 4%
2012-09-05 11:47:52 [INFO] Preparing spawn area: 8%
2012-09-05 11:47:53 [INFO] Preparing spawn area: 16%
2012-09-05 11:47:54 [INFO] Preparing spawn area: 24%
2012-09-05 11:47:55 [INFO] Preparing spawn area: 28%
2012-09-05 11:47:56 [INFO] Preparing spawn area: 40%
2012-09-05 11:47:57 [INFO] Preparing spawn area: 52%
2012-09-05 11:47:58 [INFO] Preparing spawn area: 65%
2012-09-05 11:47:59 [INFO] Preparing spawn area: 73%
2012-09-05 11:48:00 [INFO] Preparing spawn area: 81%
2012-09-05 11:48:01 [INFO] Preparing spawn area: 89%
2012-09-05 11:48:02 [INFO] Preparing spawn area: 97%
2012-09-05 11:48:02 [INFO] Done (15.080s)! For help, type "help" or "?"
So, I need to know what version of java you are using. So please try to run the "readlink" command exactly as I did above and post the output (even if it "doesn't work"). The other useful thing to do would be to post the log file that is referenced in the last line of your post.

Evo2.
Thanks! And yes, it was a normal jar.

I tried the readlink command and got no feedback

Thanks!

BMX
 
Old 09-05-2012, 08:02 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
HI,
Quote:
Originally Posted by BMX_ATVMAN14 View Post
And yes, it was a normal jar.
Ok, good.

Quote:
I tried the readlink command and got no feedback
That's curious. Ok, please run the following commands and cut and paste from your terminal (both the output and the actual commands that you are running).
Code:
which java
ls -l $(which java)
rpm -qa |grep java
Evo2.
 
Old 09-05-2012, 08:26 PM   #15
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
HI,

Ok, good.


That's curious. Ok, please run the following commands and cut and paste from your terminal (both the output and the actual commands that you are running).
Code:
which java
ls -l $(which java)
rpm -qa |grep java
Evo2.
Will do!

Thanks!

Code:
login as: root
root@209.236.121.16's password:
Last login: Wed Sep  5 15:14:41 2012 from ------------
[root@metroville ~]# ping
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
            [-M mtu discovery hint] [-S sndbuf]
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
[root@metroville ~]# which java
/usr/bin/java
[root@metroville ~]# ls -l $(which java)
lrwxrwxrwx 1 root root 22 Sep  2 00:53 /usr/bin/java -> /etc/alternatives/java
[root@metroville ~]# rpm -qa |grep java
java_cup-0.10k-5.el6.x86_64
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
[root@metroville ~]#
Edit

don't worry about the ping I was just playing :P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables can't port forward (PAT Port address translation) sfrederiksen Linux - Networking 7 12-20-2011 11:47 AM
If I forward a port in iptables, does the port have to be open on the firewall? qwertyjjj Linux - Server 4 08-06-2009 10:22 AM
A way to forward an IP/Port to another system's IP/Port astroboy5714 Linux - Networking 6 01-26-2004 06:45 PM
how to port forward - correctly 68javelin Linux - Software 0 11-16-2002 07:47 PM
Forward port port 80 to lan web server dulaus Linux - Networking 9 10-04-2002 04:45 AM


All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration