./start.sh problem

Discussion in 'Systems Administration' started by Deerman19, May 10, 2017.

  1. I started a server and before it starts fully running it says './start.sh' does not exist. Stopping server. I tried many things i still couldn't fix it. Any ideas?

  2. What does your start script look like?
  3. Please make sure your start script is called "start.sh"
    Also, try:
    sh start.sh
  4. why "sh start.sh"? Doesn't that force the sh shell, which could limit what they wanted to do if they wanted to use bash?
  5. Fix this problem by simpily deleting the spigot.jar file, and the spigot.yml, and add the spigot.jar back. Why does /start.sh work incorrectly? Well, to me it seems that it corrupts the spigot file, and messes with the code a little bit. If this does not work, PM me, and I'll come up with another solution.
    • Optimistic Optimistic x 1
  6. If you are using the build development option change your startup script to ./start.sh
  7. Oh actually, this means your server didn't start correctly possibly, and was trying to restart, or your server start button is trying to start something else.

    Open spigot.yml, and rename the "Restart" command where it says "./start.sh" to Just "start.sh"
  8. IndieGuts is right, I just launched a test instance on my windows computer.
  9. If the script is called start.sh, then the config should have just start.sh, not ./start.sh or sh start.sh.

    This start shell script only gets invoked when the threads are lost or whatever, while the server is running. Basically: when it crashes or stopped responding. And it (instead of just dying and returning to command line) can run start.sh to try and restart it.

    On my setup (linux and mac servers) I have 2 scripts, 1 to check all the servers we run, checks for dead forked daemons, and a few other things. And that's how we start and keep the stuff going. And the start.sh per server, because every server is different. The latter is simply just a clean up script, confirms there's a working backup, and then attempts to fork the server back into the background and informs an admin that there was a problem with this server and tags the log file for easy finding.

    If the server crashes, which should happen super rarely ... the start.sh gets provoked.
    If all failed, the main network.sh (so to speak) will at least at some point attempt to run it (which happens multiple times per day).

    The handy things about shell scripts is not only that you can use it to quickly start a server that has a long cli string like java -jar nogui do this and that spigot.jar But you can check for quota, /tmp stuff, free space, if there are already screen sessions running, if there were previous problems, etc. The two scripts together also help each other, the main shell script handles the backups, the smaller start.sh can do a per server onsite backup prior to starting, so we can also roll back on a per x hour basis. The main shell can check the backups and decides which work, failover, should be archived, should be pruned, should be moved offsite. etc.

    If you just run one server, this can be a lot smaller and simpler - but even if you run 2 servers, say a faction server with loads of traffic and a small creative build server.. they could be on multiple accounts, multiple disks on the system, etc.

    Learning a bit of bash can not only help with automation, but it helps you better manage, organize, maintain a system. Being on the road and coming home to find your 12 hour day away from home resulted in an 11 hour downtime because you weren't there.. is resolved if a you have a per server start.sh configured, and b if you have maybe a network.sh script that can detect it keeps failing and sends you a fb msg. Instead of 11 hours downtime you can on the road review it and restart it manually.

    I know almost nothing about bungee, and can't wait to get started on that this summer. But that's because the network we have is a bit more spread and doesn't really fit bungee just yet. Having a few scripts to help out with multiple servers on this server, that web server and the 'renting mc server' on the dedicated box over there.. really helped us answer human-questions with bash shell if conditionals and an api to better communicate.

    I am rambling, sorry.. But i hope i at least motivate you to look into the start.sh and get it working properly. The easiest way to test is to just dump a broken old plugin in there that you know doesn't cause data damage but still crashes the server. And you can actually visually see in the console that it's 'server stopped responding' and that it tries to restart. Oh, you could try to use worldedit, set your memory to low, and make a test world where you dump in a massive massive world edit. Guarantee to crash the server :p Also, .. just clone your real server, customize the shell scripts to have the right paths of course.. and run it on a different port. having a -live- and a -test- server means less downtime, and matching circumstances.

    I wish i knew more bash shell scripts the run minecraft servers, so we could start sharing resources and make some awesome scripts for the community :)
    #9 mrfloris, May 11, 2017
    Last edited: May 11, 2017
  10. What? The OP most probably doesn't have an existing start.sh file, I doubt it's as complex as you say it is...
  11. java -Xms4G -Xmx4G -jar cauldron-1.6.4-1.965.21.204-server.jar -o true

    This is my "Run.bat" command to start the server. My server has cauldron and spigot. I don't know if that is doing anything to the server.