1

Need help with Startup script for RAMdisk for modded server

InuYasha86000's Avatar InuYasha8600011/23/16 10:44 pm
1 emeralds 599 8
11/27/2016 6:49 pm
InuYasha86000's Avatar InuYasha86000
I recently went looking around the net checking out how to do a "safe" RAMdisk server using Ubuntu, I tried to create my own startup script (start.sh) and run it but it just errors out in general java, and I am unable to see the error as this server is all command line (no GUI) and I cannot go up the screen.
Here is a copy of the code in the script:
Start.sh
#!/bin/bash

java -Xms1024M -Xmx4096M
java -XX:SurvivorRatio=2
java -XX:+DisableExplicitGC -d64
java -XX:+UseConcMarkSweepGC
java -XX:+AggressiveOpts
java -jar Thermos-1.7.10-1614-server.jar

#Start Action
rsync -a --delete-after /minecraft/ /srv/minecraft/
start-minecraft

#Stop Action
stop-minecraft
rsync -a --delete-after /srv/minecraft/ /minecraft/

screen -p 0 -S minecraft -X eval 'stuff "save-all"\015'
rsync -a --delete-after /srv/minecraft/ /minecraft/

I have no idea what is wrong with the code as this is my first attempt at trying to start a RAMdisk server. This is for my own modpack and it's running Thermos server if that helps.
As I said before there are no logs that I can find, all I know is I type in console: Start/.sh (or some variant, I don't remember right now) and the screen just fills up with java error and the Thermos server never even tries to start up.
Does anyone have any idea what's going on or what I may have messed up?
Posted by InuYasha86000's Avatar
InuYasha86000
Level 13 : Journeyman Network
4

Create an account or sign in to comment.

8

1
11/27/2016 6:49 pm
Level 13 : Journeyman Network
InuYasha86000
InuYasha86000's Avatar
Does anyone have an idea how to fix those java instructions that appear after starting the RAMdisk start.sh?
And creating a shutdown script as well.
1
11/24/2016 11:28 pm
Level 13 : Journeyman Network
InuYasha86000
InuYasha86000's Avatar
ok, I FINALLY managed to get the errors from when I try ./start.sh:
Start.sh
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-zero to select the "zero" VM
-jamvm to select the "jamvm" VM
-dcevm to select the "dcevm" VM
The default VM is server,
because you are running on a server-class machine.


-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.




[EDIT]For the most part it seems to be working, RAMdisk seems to be running properly and it seems to do backups every 15 minutes (at least according to what filezilla shows, showing accessed times every 15 minutes on the world), the only thing now is to make sure I have a proper shutdown script, I can somewhat feel my way around a startup script but a shutdown script, especially with a RAMdisk is going to be tricky, if anyone could help with that, and why I get that error at the start of my script, that would be great.
1
11/24/2016 8:26 pm
Level 13 : Journeyman Network
InuYasha86000
InuYasha86000's Avatar
Java as far as I know is updated, the script works with just the Java -jar coding, it's when I tried to edit it to use RAMdisk that it screws up, and minecraft shows no error log with the startup script as it doesn't even get a chance to try start before java itself gives the console errors.
1
11/24/2016 3:24 am
Level 26 : Expert Princess
star_weaver
star_weaver's Avatar
there should be a log in the minecraft folder that should have all the errors and stuff in it, and just try using

java -jar -Xmx4096M Thermos-1.7.10-1614-server.jar

and is your java updated, java -version should say 1.8.something something
just trying to minimize everything possible
1
11/24/2016 2:40 am
Level 13 : Journeyman Network
InuYasha86000
InuYasha86000's Avatar
The original script I use for basic startup has that #bin in it:
Original Start.sh
#!/bin/bash

java -Xms1024M -Xmx4096M -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -jar Thermos-1.7.10-1614-server.jar

And I think I tried it like that once, I wish I could get a shot of all the errors when I try to start the script.
It's running on Ubuntu server 16 if that helps any as well.
1
11/24/2016 1:51 am
Level 26 : Expert Princess
star_weaver
star_weaver's Avatar
try it without
#!/bin/bash
that might be causing some issues, and have you tried putting all the java args on 1 line like you have got with the ram settings?
1
11/24/2016 12:47 am
Level 13 : Journeyman Network
InuYasha86000
InuYasha86000's Avatar
1, I don't think i've had it run in the RAMdisk as this script is supposed to copy the existing server files over into the RAMdisk.
2, no I have not as this is all command line and this command is supposed to backup the files every 15 minutes back to the hard drive as well.

Pretty much I haven't tried anything much other than trying the script, for the most part I tried to follow This Page:https://kromey.us/2011/08/running-a-minecraft-server-from-a-ram-disk-452.html explaining with some code how to make the start script that copies and backups the files to and from the RAMdisk.
1
11/24/2016 12:39 am
Level 26 : Expert Princess
star_weaver
star_weaver's Avatar
question 1. does it have the same error when not running on a ramdisk?
question 2. have u tryed using a more simple solution like moving the server to the ramdisk then starting it like you would normally?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome