MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers

Home Page:https://minecraftservercontrol.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sudo: msctl: command not found

ph-ghub opened this issue · comments

Server info in case this is helpful in troubleshooting:

[XXX@SERVER mscs]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)

I followed the install process using github clone and make install. All seemed to go well.

This server already has a world setup and I was about to import it but decided to try a list first just to see if the install worked.

[XXX@SERVER mscs]$ mscs ls
sudo: msctl: command not found

The msctl script in the mscs directory was mode 664, so I tried a chmod +x, but still no joy.

Running it directly gives an error that should be easy to overcome, but I wanted to open this issue first in case there is an underlying issue:

[[XXX@SERVER mscs]$ ./msctl
which: no rdiff-backup in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/opc/.local/bin:/home/opc/bin)
ERROR: rdiff-backup not found!
Try installing this with:
sudo apt-get install rdiff-backup

Hi @ph-ghub. I looks like the install failed for some reason. The msctl script should be copied to /usr/local/bin and accessible via your path. Verify this by running:

ls -la /usr/local/bin/msctl

Make sure /usr/local/bin is in your path:

echo $PATH

For the second error, you will need to install rdiff-backup.

Oddly enough, everything seems to be in order:

[XXX@SERVER ~]$ ls -la /usr/local/bin/msctl
-rwxr-xr-x. 1 root root 125324 Jun 21 21:04 /usr/local/bin/msctl
[XXX@SERVER ~]$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/opc/.local/bin:/home/opc/bin

And it seems to get even more interesting as the rdiff-backup should have been part of my pre-req install but trying it by itself gives this error. (Appreciate the help...these have me a little puzzled).

[XXX@SERVER ~]$ sudo yum install rdiff-backup
Loaded plugins: langpacks, ulninfo
No package rdiff-backup available.
Error: Nothing to do

Try:

sudo echo $PATH

perhaps sudo isn't passing the PATH variable..

According to this website, the following should work to install rdiff-backup:

sudo yum install yum-plugin-copr epel-release
sudo yum copr enable frankcrawford/rdiff-backup
sudo yum install rdiff-backup

Sudo seems to find it, too. Thanks for the rdiff item I will try it now.

[XXX@SERVER ~]$ sudo echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/opc/.local/bin:/home/opc/bin

rdiff is also not playing nice. Googling that one now.

Error: Package: rdiff-backup-2.0.5-1.el7.aarch64 (copr:copr.fedorainfracloud.org:frankcrawford:rdiff-backup)
           Requires: librsync.so.2()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

In case it is helpful, here is how I got past the rdiff issue:

wget https://download-ib01.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm

sudo rpm -Uvh epel-release-7-12.noarch.rpm

sudo yum install librsync

And now this will work:

sudo yum install rdiff-backup

But still no joy on the msctl command not found issue.

Any luck figuring out the command not found issue? Seems very odd..

No, it just doesn't seem to be happy with pathing is my best guess, even though it looks like the paths are set correctly.

commented

Hmm, I was experiencing the same issue on CentOS 8. I simply changed L34 of mscs to sudo "PATH=$PATH" -u $USER_NAME -H /usr/local/bin/msctl $MSCS_ARGS and it seems to be working fine for now.

When you are doing this what use are you using? are you doing as sudo command or logged in as mscs and running the commands? Also can you please do the following
whereis mscs and then do a ls -l on the output and do the same for msctl

The "msctl:command not found"error doesn't appear to be resolved.
I am getting this error when trying to import a world.

$ mscs import directory/worldname 25565
returns, sudo: msctl: command not found

I followed the thread above but none of the feedback or suggestions have changed anything.

I have an Oracle linux instance.
I'm a rookie with this, so if someone could tell me how to remove this entire script or how to fix the msctl command issue I'd be grateful. The server can no longer run.

Hi @wildpalms. Please provide more information. To help debug, we need to know how you installed MSCS (manual or automatic using the Makefile), and the output of the following commands:

which mscs
which msctl
ls -la /usr/local/bin/mscs
ls -la /usr/local/bin/msctl
echo $PATH
sudo echo $PATH

That will get us started.

Hi @Sundain thanks for the quick response. After going back to the beginning, adding the dependencies for Redhat rather than ubuntu, then working through the feedback in the discussions above again I found that the missing dependency for rdiff-backup worked. This solved the issue, so long as I use msctl as the command, rather than mscs.

So I could import the world and start the server with msctl successfully.
Next step, explore the settings for backups and scheduling.

That is odd that you can't use the mscs wrapper script. But if things are working for you with the msctl script, great!

I'm having the same issue with mscs:

$ mscs create testworld 25565
sudo: msctl: command not found

I tried the automatic installation first, and then re-tried with the manual installation, no luck.

$PATH seems fine as well:

$ echo $PATH
/home/opc/.local/bin:/home/opc/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
$ sudo echo $PATH
/home/opc/.local/bin:/home/opc/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

When I try to run msctl directly I get this

[opc@minecraft-server-main mscs]$ msctl create testworld 25565
/usr/bin/which: no overviewer.py in (/home/opc/.local/bin:/home/opc/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
Creating Minecraft world: testworld.

I'm running the OCI with oracle linux.