mojira.dev
MC-40824

nogui option ignored (osx)

On Mac OS X, the server appears to ignore the `nogui` option and fails to start due to inability to connect to the window server. (In this configuration, it would not be possible to access the window server since the machine is headless and being accessed over ssh.)

What I expected to happen was...:
As per documentation here and here, I would have expected this to lead to a successful server start, as it has in past versions.

What actually happened was...:
Uncaught java exception. Log is attached.

Steps to reproduce...:
1. ssh into Mac OS box with java installed.
2. Attempt to launch headless server (a minimal invocation seems to be java -jar minecraft_server.1.7.2.jar nogui).
3. Observe the resulting traceback with the error that there are insufficient permissions to connect to a window server.

Linked issues

Attachments

Comments 27

This isn't an issue for me, using the following code works fine

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
java -Xmx1024M -Xms1024M -jar minecraft_server.*.jar nogui

If you can't reproduce, I guess there's not a lot that can be done here. For what it's worth, the code that you posted still triggers the problem for me. Guess I'll have to wait until the next bukkit release, since that works.

FYI for future reference, Bukkit is NOT supported on this bug tracker. Bukkit is not made by Mojang, please use their forums for Bukkit issues.

This is a minecraft bug, not a bukkit bug. When the minecraft server refuses to start, I'm pretty sure the bug lies with minecraft, not bukkit.

If you can reproduce this in vanilla Minecraft, (aka more than 'pretty sure') then we will investigate.

17 more comments

If it is indeed a java issue, it would not be something we can fix. You can, however, install multiple versions of java for your separate programs (are there programs that require java 6 and not 7? Java is fully forwards-compatible)

But we'll need to figure out if it is a java problem first or if we can somehow work around it 🙂

So as a brief update, I finally managed to move all of the mission-critical Java 6 dependent software into isolated virtual machines, so I was able to install Java 7 on the host machine. It does in fact work. I honestly have no idea if it's going to ever work on Java 6, but I hope you're able to get it working somehow.

I'm afraid that I will have to close this ticket as I can't find any workaround that we can perform, and that it also appears to be entirely out of our control. From research, and feedback here, it appears to be an issue specific to OSX and Java 6 which may be triggered by Log4j2 (possibly through no fault of its own).

You can perhaps try to reproduce the issue with the latest version of log4j2, confirm it exists and report it to them - but as it is ultimately caused by a bug in java 6 for OSX it is possible they would not be able to do anything about it neither.

Though it is true that the launcher requires Java 6 on OSX, as @unknown points out, the launcher is graphical by nature and it is not logical that you would run that (and thus impose the requirement) on a headless system. We recommend the use of java 7+ for server usage.

Well, I guess that's that then. It's really unfortunate that support for 10.6 was removed in this manner from 1.7.2.

It's unfortunate, and it's also why in my own software I avoid Java like the plague. I refuse to put my users through the crap it causes...

Robbie Harwood

(Unassigned)

Unconfirmed

OSX, server

Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 14w03b, Minecraft 14w04a, Minecraft 14w04b, ..., Minecraft 14w18a, Minecraft 14w18b, Minecraft 14w19a, Minecraft 14w20a, Minecraft 14w20b

Retrieved