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

Installation fails, server does not start. #38

Closed
407pilot opened this issue May 12, 2022 · 3 comments
Closed

Installation fails, server does not start. #38

407pilot opened this issue May 12, 2022 · 3 comments

Comments

@407pilot
Copy link

407pilot commented May 12, 2022

TLDR; skip to edit 2

Raspberry Pi 4, 2GB Ram, running Buster

Ran updates (apt-get update, upgrade) on the server earlier, after performing updates the minecraft server stopped working. Rebooted the Pi, server would not start. Saved my latest backup and re-flashed Buster to the SD card. After running the install script, the server still will not start.

Reviewing the output from the install, there was some kind of problem with OpenJDK installation. Then at the end there are some errors. I'm really not sure where to go from here.

edit: for the sake of thoroughness I installed a fresh copy of 32-bit bullseye. The installation went exactly the same with the same result.

edit2: I found the problem in the install script. Line 203 points to the x64 version of jdk 17. (Line 207 also points to the x64 version)

There also seems to be something else going wrong, because after running the script the jre folder does not exist after the script finishes, although it reports Java is installed successfully. Downloading and unpacking the correct version of jdk 17 into the correct directory got the start script working.

pi@rotormine:~ $ curl https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17089  100 17089    0     0  65726      0 --:--:-- --:--:-- --:--:-- 65726
Minecraft Server installation script by James A. Chambers - https://jamesachambers.com/
Version 1.18.2 will be installed.  To change this, open SetupMinecraft.sh and change the "Version" variable to the version you want to install.
Latest version is always available at https://github.com/TheRemote/RaspberryPiMinecraft
Don't forget to set up port forwarding on your router!  The default port is 25565
Installing screen, sudo, net-tools, curl...
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
net-tools is already the newest version (1.60+git20180626.aebd88e-1).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libutempter0
Suggested packages:
  byobu | screenie | iselect
The following NEW packages will be installed:
  libutempter0 screen
0 upgraded, 2 newly installed, 0 to remove and 7 not upgraded.
Need to get 555 kB of archives.
After this operation, 961 kB of additional disk space will be used.
Get:1 http://raspbian.mirrors.lucidnetworks.net/raspbian buster/main armhf libutempter0 armhf 1.1.6-3 [7,736 B]
Get:2 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf screen armhf 4.6.2-3+deb10u1 [547 kB]
Fetched 555 kB in 1s (449 kB/s) 
Selecting previously unselected package libutempter0:armhf.
(Reading database ... 49878 files and directories currently installed.)
Preparing to unpack .../libutempter0_1.1.6-3_armhf.deb ...
Unpacking libutempter0:armhf (1.1.6-3) ...
Selecting previously unselected package screen.
Preparing to unpack .../screen_4.6.2-3+deb10u1_armhf.deb ...
Unpacking screen (4.6.2-3+deb10u1) ...
Setting up libutempter0:armhf (1.1.6-3) ...
Setting up screen (4.6.2-3+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1) ...
Processing triggers for systemd (241-7~deb10u8+rpi1) ...
Enter root directory path to install Minecraft server.  Almost nobody should change this unless you're installing to a different disk altogether. (default ~): 
Directory Path: 
Directory Path : /home/pi -- accept (y/n)?y
Directory Path: /home/pi
Creating minecraft server directory...
Installing OpenJDK...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  182M  100  182M    0     0  5453k      0  0:00:34  0:00:34 --:--:-- 8703k
main: line 221: [[: main: line 220: /home/pi/minecraft/jre/bin/java: cannot execute binary file: Exec format error: syntax error in expression (error token is ": line 220: /home/pi/minecraft/jre/bin/java: cannot execute binary file: Exec format error")
main: line 221: [[: main: line 220: /home/pi/minecraft/jre/bin/java: cannot execute binary file: Exec format error: syntax error in expression (error token is ": line 220: /home/pi/minecraft/jre/bin/java: cannot execute binary file: Exec format error")
OpenJDK installation completed.
Getting total system memory...
Total memory: 1872 - Available Memory: 1732
Total memory: 1872 - Available Memory: 1732
Please enter the amount of memory you want to dedicate to the server.  A minimum of 700MB is recommended.
You must leave enough left over memory for the operating system to run background processes.
If all memory is exhausted the Minecraft server will either crash or force background processes into the paging file (very slow).
Enter amount of memory in megabytes to dedicate to the Minecraft server (recommended: 1432): 1200
Amount of memory for Minecraft server selected: 1200 MB
Getting latest Paper Minecraft server...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   543  100   543    0     0   3271      0 --:--:-- --:--:-- --:--:--  3290
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 33.1M  100 33.1M    0     0  7343k      0  0:00:04  0:00:04 --:--:-- 7345k
Building the Minecraft server...
bash: line 357: /home/pi/minecraft/jre/bin/java: cannot execute binary file: Exec format error
Accepting the EULA...
Grabbing start.sh from repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11987  100 11987    0     0  62432      0 --:--:-- --:--:-- --:--:-- 62108
Grabbing stop.sh from repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1631  100  1631    0     0   8816      0 --:--:-- --:--:-- --:--:--  8816
Grabbing restart.sh from repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2207  100  2207    0     0  10871      0 --:--:-- --:--:-- --:--:-- 10925
Grabbing fixpermissions.sh from repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1582  100  1582    0     0   7031      0 --:--:-- --:--:-- --:--:--  7031
Grabbing update.sh from repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   607  100   607    0     0   3178      0 --:--:-- --:--:-- --:--:--  3178
Enter a name for your server...
Server Name: rotormine
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   311  100   311    0     0   1611      0 --:--:-- --:--:-- --:--:--  1619
Minecraft can automatically start at boot if you wish.
Start Minecraft server at startup automatically (y/n)?y
Created symlink /etc/systemd/system/multi-user.target.wants/minecraft.service → /etc/systemd/system/minecraft.service.
Your time zone is currently set to America/Chicago.  Current system time: Wed 11 May 21:45:11 CDT 2022
You can adjust/remove the selected reboot time later by typing crontab -e
Automatically reboot Pi and update server at 4am daily (y/n)?y
no crontab for pi
Daily reboot scheduled.  To change time or remove automatic reboot type crontab -e
Setting server file permissions...
tail: cannot open '' for reading: No such file or directory
Setup is complete.  Starting Minecraft server...
Must be connected to a terminal.
Must be connected to a terminal.
pi@rotormine:~ $ screen -ls
No Sockets found in /run/screen/S-pi.
TheRemote added a commit that referenced this issue May 12, 2022
@TheRemote
Copy link
Owner

TheRemote commented May 12, 2022

Oops, yeah I just did that very recently updating the URLs. Apparently I failed quite hard here, sorry about that! I did release 2 containers so I've been a little scrambled / overloaded compared to normal. I made the commit that broke this about a day ago.

I've just fixed this in the code. Go ahead and remove the "jre" folder. Now run SetupMinecraft.sh and it should download and set up the correct one. Sorry about that and let me know if that fixed it for you! I did a fresh test on my Pi 400 to make sure I got it (running 64 bit or aarch64 but both links were fixed).

EDIT: I see you fixed it yourself as well here by extracting manually so you're probably good to go. Thanks for reporting this!

@407pilot
Copy link
Author

No problem, we're all human! I got my server back up and the backup restored last night. Looking through the code was intimidating until I realized I could just wipe the SD card and start over if I actually broke something. Once I got over that and started reading I realized I understood most of what was happening and bumbled my way through it.

@TheRemote
Copy link
Owner

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants