Cannot build spigot server

Hello,

I am trying to make a minecraft server on a raspberry pi 3. I cannot build a spigot server so far and I have looked a lot around the web.

Here is what I did :

  • installed dietpi on the rpi then installed mineos
  • connected to the webui>profile>downloaded mojang 1.10.2 jar (I tried the whole process on 1.10 as well)
  • created a vanilla 1.10 server using a seed
  • then run the server with (Xmx=800 xms=400 and nogui) worked ok. ThenI stop the server to go spigot
  • on Spigot / Craftbukkit > download latest then build spigot 1.10.2. But I can not build :

BuildTools jar compilation failed
Error undefined (undefined): undefined

in the log I have :
Loading BuildTools version: git-BuildTools-afc7566-52 (#52)
fatal: $HOME not set
Git name not set, setting it to default value.
fatal: $HOME not set
Exception in thread “main”
java.lang.RuntimeException: Error running command, return status !=0: [git, config, --global, user.name, BuildTools] at org.spigotmc.builder.Builder.runProcess(Builder.java:547) at org.spigotmc.builder.Builder.main(Builder.java:161)

Can someone help ? Did I miss a tuto somewhere ?

Thx

Aspi

Which distro is dietpi based off…or more importantly, which method did you use to make the MineOS webui start up? systemd, supervisord, etc.?

Each method has a different way of specifying $HOME, which is appearing here to be a fatal error.

dietpi is a debian based distro (a very good stuff I think :slight_smile: ).

For your next question, I don’t know. I installed mineos using the dietpi-software command via SSH connected as root. Then It starts automaticaly and I can connect using my web browser.

I just find that post which is similar to my problem : [Solved] Issues building BuildTools

Dietpi seems to use supervisord.

Try the instructions here as root:

echo -e '\nenvironment=HOME="/root"' >> /etc/supervisor/conf.d/mineos.conf
supervisorctl reread
supervisorctl update
1 Like

Thank you very much for your help hexsparrot

But I had some more errors
supervisorctl reread
gave me
ERROR: CANT_REREAD: not a valid boolean value: ‘trueenvironment=HOME="/root"’

so I edited the file /etc/supervisor/conf.d/mineos.conf to add the missing “carriage return” (I mean enter) between true and environment in the last line.

Now it’s working and I am really impressed O_o

The raspberry pi 3 is a good and effective way to host a minecraft server regarding cost, power saving and even size.
I will post a tuto to help creating an optmizied minecraft spigot server on the raspberry using mineos. Hope it will help someone.

1 Like

@hexparrot:

It seems that mineos.conf is missing a carriage return after the final line, so when the command you linked to above is fired, the new text is added in directly after the value of the previous variable.

I think the echo-command probably should be:
echo -e '\nenvironment=HOME="/root"' >> /etc/supervisor/conf.d/mineos.conf

Problem with echo -e is that it has no consistent behaviour across systems (bash - How to insert a new line in Linux shell script? - Stack Overflow), so maybe we should use:

echo  >> /etc/supervisor/conf.d/mineos.conf
echo 'environment=HOME="/root"' >> /etc/supervisor/conf.d/mineos.conf

This should add both the missing lineshift, and the new variable needed…

1 Like

08/01/2016

Here is a guide to create an optmizied minecraft spigot server on the raspberry using mineos.

It worked great on a raspberry pi 3 using DietPi_v120_RPi-armv6-(Jessie)

Good luck.

1- load dietpi on the RPI

2- update (SSH)
login=root pass=dietpi
sudo apt-get update

3- instal mineos (SSH)
instal mineos using dietpi-software

4 - create server (webui)
profiles>Mojang>1.10.2 (or other version)

create new server

server status
change profile to 1.10.2
change runnable jar to minecraft_server.1.10.2.jar
_Xmx=800 _
xms=400
nogui
Start

5- try to play
:slight_smile:

6- optimize the server (webui)
stop server

server properties
change max-player
lower view-distance (5?)

7- go spigot :

(webui)
spigot/craftbukkit
select your server name
1.10.2 build spigot
***** WAIT A LONG TIME AROUND 30min on a RPI3 *****
wait until the log “Output From BuildTools.Jar” shows :

Success! Everything compiled successfully. Copying final .jar files now.
Copying craftbukkit-1.10.2-R0.1-SNAPSHOT.jar to /mnt/dietpi_userdata/mineos/serverdata/profiles/spigot_1.10.2/.

  • Saved as craftbukkit-1.10.2.jar
    Copying spigot-1.10.2-R0.1-SNAPSHOT.jar to /mnt/dietpi_userdata/mineos/serverdata/profiles/spigot_1.10.2/.
  • Saved as spigot-1.10.2.jar

copy to server

8- launch the server (webui)
server status
change profile to BuildTools-latest
change runnable jar to spigot-1.10.2jar
Start

7- Play Minecraft
O_o That much power in such a little device ?!
You may consider changing view-distance back to 10
:smiley:

some last advices :

  • do not use wifi but RJ45
  • a class 10 sdcard might speed up the server a bit more (not sure).
  • (SSH) dietpi-config>resolution>headless disable the HDMI output (lowering power consumption and improving RAM perf)

Many thanks to the guys who created mineos, spigot and mineos ;).
Have fun.

(edit by Hexparrot: removed the environment=HOME=/root line, since I have added this to the official git repo and it will be pulled in automatically)

1 Like

I’ll have to do some testing to make sure that this line is OK for all systems, and in the case it is (or at least the ones I test), it can go into the official mineos.conf to start with.

1 Like

If you are making changes to how the .conf is set up, then maybe the “\n” should be at the end of each line, in stead of in the start like in my example.

My example was made to handle mineos.conf as it is now, when we use echo to add a line. Since the last line before addition is missing a carriage return, we need to add it, therefore I added the \n at the start of the line. This is really more of a workaround.

I meant more that environment=HOME=/root should be in the file for all setups. I tried it on my MineOS Turnkey, my Ubuntu and my Arch and it causes no (apparent) unfavorable effects, so I added the line in a commit just now.

Also, I added the trailing newline to the file (because it should be there, no matter what).

1 Like