Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone Build 260 Requires X11 #938

Closed
dropsignal opened this issue Jul 11, 2020 · 5 comments · Fixed by #945
Closed

Standalone Build 260 Requires X11 #938

dropsignal opened this issue Jul 11, 2020 · 5 comments · Fixed by #945
Labels
Confirmed Bug The bug reported is confirmed and able to be replicated. Priority: Low

Comments

@dropsignal
Copy link

Describe the bug
After upgrading to standalone build 260, Geyser no longer starts correctly because of an X11 operation performed by Geyser, however, X11 is not installed on my Linux server.

To Reproduce
I run Geyser on a headless, minimal install of CentOS 7. I created a systemd service to handle the startup and shutdown of Geyser. The steps to reproduce the issue will not be exactly the same. However, the command used by systemd to run Geyser would be the same as a user manually running Geyser from the command line, which is:
/usr/bin/java -Xmx1024M -Xms1024M -jar /usr/libexec/geyser/geyser.jar

Expected behavior
The last standalone build that worked was 249. The following is the output of my systemd journal:

Jul 11 15:53:21 daddario.intranet.dropsignal.com java[17560]: 2020-07-11 15:53:21,106 main WARN Disabling terminal, you're running in an unsupported environment.
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 INFO] ******************************************
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 INFO]
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 INFO] Loading Geyser version 1.0-SNAPSHOT (git-master-4c74f82)
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 INFO]
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 INFO] ******************************************
Jul 11 15:53:22 daddario.intranet.dropsignal.com java[17560]: [15:53:22 WARN] This build is for connecting to Java 1.15.2 servers and from Bedrock 1.14.60 clients. Please join our Discord (https://discor
Jul 11 15:53:27 daddario.intranet.dropsignal.com java[17560]: [15:53:27 INFO] Started Geyser on 0.0.0.0:19132
Jul 11 15:53:27 daddario.intranet.dropsignal.com java[17560]: [15:53:27 INFO] Done (5.38s)! Run /geyser help for help!

Screenshots / Videos
Not applicable since all my logs are from the command line which I am pasting into the bug report.

Server Version
[09:33:46] [Server thread/INFO]: Starting minecraft server version 1.16.1

Geyser Version
I am using the standalone version. The last confirmed working build is 249. The current build I am trying to run, which has issues, is build 260.

Minecraft: Bedrock Edition Version
I am using Minecraft for Windows 10 verison 1.16.1. This is moot since my Geyser server is not starting.

Additional Context
Here is the output of my systemd journal after attempting to start Geyser using systemd with standalone build 260:

Jul 11 15:40:02 daddario.intranet.dropsignal.com java[17245]: 2020-07-11 15:40:02,864 main WARN Advanced terminal features are not available in this environment
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: Exception in thread "main" java.awt.HeadlessException:
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at java.desktop/java.awt.Window.<init>(Window.java:548)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at java.desktop/java.awt.Frame.<init>(Frame.java:423)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at org.geysermc.platform.standalone.gui.GeyserStandaloneGUI.<init>(GeyserStandaloneGUI.java:71)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at org.geysermc.platform.standalone.GeyserStandaloneBootstrap.onEnable(GeyserStandaloneBootstrap.java:98)
Jul 11 15:40:04 daddario.intranet.dropsignal.com java[17245]: at org.geysermc.platform.standalone.GeyserStandaloneBootstrap.main(GeyserStandaloneBootstrap.java:79)
Jul 11 15:40:04 daddario.intranet.dropsignal.com systemd[1]: geyser.service: main process exited, code=exited, status=1/FAILURE
Jul 11 15:40:04 daddario.intranet.dropsignal.com systemd[1]: Unit geyser.service entered failed state.
Jul 11 15:40:04 daddario.intranet.dropsignal.com systemd[1]: geyser.service failed.
@rtm516
Copy link
Member

rtm516 commented Jul 11, 2020

Add nogui to the end of the startup command so it will be /usr/bin/java -Xmx1024M -Xms1024M -jar /usr/libexec/geyser/geyser.jar nogui
I will look into making the check more robust to prevent this from happening.

@rtm516 rtm516 added Confirmed Bug The bug reported is confirmed and able to be replicated. Priority: Low labels Jul 11, 2020
@dropsignal
Copy link
Author

Confirmed that adding nogui to the command line works. Thank you!

@Heath123
Copy link
Contributor

Catching the HeadlessException and not starting the GUI should work

@rtm516
Copy link
Member

rtm516 commented Jul 13, 2020

Can you test this PR for me it should fix the issue #945

Guide to download the PR:

  1. Make sure you are signed in with a GitHub account
  2. Follow the pull request link that was sent to you (for example Fix inconsistencies with movement and position #699)
  3. Follow the guide on this picture
    guide

@dropsignal
Copy link
Author

dropsignal commented Jul 13, 2020

I can confirm this fix solves the X11 issue without the need to specify the nogui option. Here is the output from my systemd status geyser command:

[root@daddario geyser]# systemctl status geyser
● geyser.service - Geyser for Minecraft
   Loaded: loaded (/etc/systemd/system/geyser.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-07-13 08:18:29 CDT; 12s ago
 Main PID: 6334 (java)
   CGroup: /system.slice/geyser.service
           └─6334 /usr/bin/java -Xmx1024M -Xms1024M -jar /usr/libexec/geyser/geyser.jar

Jul 13 08:18:29 daddario.intranet.dropsignal.com systemd[1]: Started Geyser for Minecraft.
Jul 13 08:18:30 daddario.intranet.dropsignal.com java[6334]: 2020-07-13 08:18:30,775 main WARN Advanced terminal features are not available in this environment
Jul 13 08:18:31 daddario.intranet.dropsignal.com java[6334]: [08:18:31 INFO] ******************************************
Jul 13 08:18:31 daddario.intranet.dropsignal.com java[6334]: [08:18:31 INFO]
Jul 13 08:18:31 daddario.intranet.dropsignal.com java[6334]: [08:18:31 INFO] Loading Geyser version 1.0.0 (git-0e4b755cffaa7a9bcd14fb0673044ee2a537bf90-0e4b755)
Jul 13 08:18:31 daddario.intranet.dropsignal.com java[6334]: [08:18:31 INFO]
Jul 13 08:18:31 daddario.intranet.dropsignal.com java[6334]: [08:18:31 INFO] ******************************************
Jul 13 08:18:38 daddario.intranet.dropsignal.com java[6334]: [08:18:38 INFO] Started Geyser on 0.0.0.0:19132
Jul 13 08:18:38 daddario.intranet.dropsignal.com java[6334]: [08:18:38 INFO] Done (6.705s)! Run /geyser help for help!

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed Bug The bug reported is confirmed and able to be replicated. Priority: Low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants