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/)

evo2 09-10-2012 09:00 PM

Hi,

it's strange that it seems to exit immediately without any output. Are there any log files created? Also what is the exit code? Ie the output from
Code:

% java -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui
% echo $?

I think you should try java with the -verbose option on. Eg
Code:

% java -verbose -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui
If this spits out too much text you can pipe it into a file. Eg
Code:

% java -verbose -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui >& verbose.log

The other thing that seems odd is the fact that you tried to run it in two different locations.
Do you have two different versions of minecraft_server.jar? Also, when you are in ~ you run it
with the option "nogui.", but in ~/Metroville with "nogui". Can you explain what you are doing?

Evo2.

BMX_ATVMAN14 09-10-2012 09:05 PM

Quote:

Originally Posted by evo2 (Post 4777316)
Hi,

it's strange that it seems to exit immediately without any output. Are there any log files created? Also what is the exit code? Ie the output from
Code:

% java -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui
% echo $?

I think you should try java with the -verbose option on. Eg
Code:

% java -verbose -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui
If this spits out too much text you can pipe it into a file. Eg
Code:

% java -verbose -Xms384M -Xmx384M -jar ~/minecraft_server.jar nogui >& verbose.log

The other thing that seems odd is the fact that you tried to run it in two different locations.
Do you have two different versions of minecraft_server.jar? Also, when you are in ~ you run it
with the option "nogui.", but in ~/Metroville with "nogui". Can you explain what you are doing?

Evo2.

No feedback.

By locations do you mean the metroville folder? the minecraft_server is in there.

evo2 09-10-2012 09:07 PM

Sorry, by locations I meant what I said in the next sentence, ie ~ vs ~/Metroville.

No feedback? Even "echo $?"? Even when run with -verbose?

Evo2.

BMX_ATVMAN14 09-11-2012 02:32 PM

Quote:

Originally Posted by evo2 (Post 4777323)
Sorry, by locations I meant what I said in the next sentence, ie ~ vs ~/Metroville.

No feedback? Even "echo $?"? Even when run with -verbose?

Evo2.

echo $ replied with 0, other than that no.

The nogui. and nogui was just the I copied any pasted it

evo2 09-11-2012 06:18 PM

Hi,

ok what about just running java in verbose mode without the jar file. Ie
Code:

java -verbose
Again, redirect the output to a file if there is too much.

Evo2.

BMX_ATVMAN14 09-11-2012 06:22 PM

Quote:

Originally Posted by evo2 (Post 4778010)
Hi,

ok what about just running java in verbose mode without the jar file. Ie
Code:

java -verbose
Again, redirect the output to a file if there is too much.

Evo2.

Code:

[minecraft@metroville ~]$ java -verbose
[minecraft@metroville ~]$  java -Xmx384M -Xms384M -jar minecraft_server.jar nogui
[minecraft@metroville ~]$


evo2 09-11-2012 06:27 PM

Hi,

alright we need to go back to confirming what is really being run when you run "java".
Please try the following and post the output.
Code:

which java
which readlink
readlink -f $(which java)
file $(readlink -f $(which java))
ls -l $(readlink -f $(which java))

Evo2

BMX_ATVMAN14 09-11-2012 06:38 PM

Quote:

Originally Posted by evo2 (Post 4778016)
Hi,

alright we need to go back to confirming what is really being run when you run "java".
Please try the following and post the output.
Code:

which java
which readlink
readlink -f $(which java)
file $(readlink -f $(which java))
ls -l $(readlink -f $(which java))

Evo2

Thanks for all the help :)

Code:

login as: minecraft
minecraft@209.236.121.16's password:
Last login: ---
[minecraft@metroville ~]$ which java
/usr/bin/java
[minecraft@metroville ~]$ which readlink
/bin/readlink
[minecraft@metroville ~]$ readlink -f $(which java)
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
[minecraft@metroville ~]$ file $(readlink -f $(which java))
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java: empty
[minecraft@metroville ~]$
[minecraft@metroville ~]$ ls -l $(readlink -f $(which java))
-rwxr-xr-x 1 root root 0 Sep  5 21:24 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
[minecraft@metroville ~]$


evo2 09-11-2012 06:48 PM

Hi,

well, do you see the problem? Your "java" is a completely empty file. I don't know how that happened, but it looks like you need to reinstall java. AFAIK, yum does not have a reinstall option, so I think you should use "yum remove" and then "yum install" for java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64 (as discussed in post #16). After that rerun the commands from post #37 so we can see what the status is.

Evo2.

BMX_ATVMAN14 09-11-2012 06:53 PM

Code:

[root@metroville ~]# which java
/usr/bin/java
[root@metroville ~]# which readlink
/bin/readlink
[root@metroville ~]#
[root@metroville ~]# readlink -f $(which java)
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
[root@metroville ~]# file $(readlink -f $(which java))
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
[root@metroville ~]# ls -l $(readlink -f $(which java))
-rwxr-xr-x 1 root root 36072 Sep  3 09:55 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java

Thanks!

evo2 09-11-2012 06:56 PM

Hi,

ok, things are looking sane now. Time to try running the standard minecraft server again.

Evo2.

BMX_ATVMAN14 09-11-2012 06:59 PM

Quote:

Originally Posted by evo2 (Post 4778034)
Hi,

ok, things are looking sane now. Time to try running the standard minecraft server again.

Evo2.

Thanks sooo much man!

BMX_ATVMAN14 09-11-2012 07:02 PM

Another question, how do I keep the server up when I close my SSH program?

evo2 09-11-2012 07:06 PM

Hi,

you could use "screen" or "tmux" for this. I just did a quick web search and it seems these are a pretty standard approach for people running minecraft servers. See for example:

http://duckduckgo.com/?q=minecraft+screen+tmux

Evo2.

BMX_ATVMAN14 09-11-2012 07:12 PM

Quote:

Originally Posted by evo2 (Post 4778042)
Hi,

you could use "screen" or "tmux" for this. I just did a quick web search and it seems these are a pretty standard approach for people running minecraft servers. See for example:

http://duckduckgo.com/?q=minecraft+screen+tmux

Evo2.

Got it, thanks!


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