LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I port forward correctly? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-port-forward-correctly-4175425327/)

BMX_ATVMAN14 09-02-2012 07:30 PM

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

evo2 09-03-2012 01:56 AM

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.

evo2 09-03-2012 02:09 AM

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.

BMX_ATVMAN14 09-03-2012 09:23 AM

Quote:

Originally Posted by evo2 (Post 4771160)
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

BMX_ATVMAN14 09-03-2012 09:30 AM

Quote:

Originally Posted by evo2 (Post 4771168)
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 :)

BMX_ATVMAN14 09-03-2012 03:27 PM

Bump, I need help badly :( Sorry if bumping is against the rules I haven't taken a look at those yet

~BMX

evo2 09-03-2012 07:58 PM

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.

BMX_ATVMAN14 09-03-2012 08:47 PM

Quote:

Originally Posted by evo2 (Post 4771868)
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

evo2 09-03-2012 10:38 PM

Hi,

Quote:

Originally Posted by BMX_ATVMAN14 (Post 4771897)
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.

BMX_ATVMAN14 09-04-2012 02:32 PM

Quote:

Originally Posted by evo2 (Post 4771990)
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 (Post 4771990)

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

BMX_ATVMAN14 09-04-2012 09:10 PM

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


evo2 09-04-2012 09:57 PM

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.

BMX_ATVMAN14 09-05-2012 02:16 PM

Quote:

Originally Posted by evo2 (Post 4772849)
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

evo2 09-05-2012 07:02 PM

HI,
Quote:

Originally Posted by BMX_ATVMAN14 (Post 4773493)
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.

BMX_ATVMAN14 09-05-2012 07:26 PM

Quote:

Originally Posted by evo2 (Post 4773647)
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


All times are GMT -5. The time now is 01:09 AM.