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

sudo: msctl: command not found #295

Open
ph-ghub opened this issue Jun 21, 2021 · 16 comments
Open

sudo: msctl: command not found #295

ph-ghub opened this issue Jun 21, 2021 · 16 comments
Labels

Comments

@ph-ghub
Copy link

ph-ghub commented Jun 21, 2021

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
@sandain
Copy link
Member

sandain commented Jun 21, 2021

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.

@ph-ghub
Copy link
Author

ph-ghub commented Jun 21, 2021

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

@ph-ghub
Copy link
Author

ph-ghub commented Jun 21, 2021

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

@sandain
Copy link
Member

sandain commented Jun 21, 2021

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

@ph-ghub
Copy link
Author

ph-ghub commented Jun 21, 2021

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

@ph-ghub
Copy link
Author

ph-ghub commented Jun 21, 2021

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

@ph-ghub
Copy link
Author

ph-ghub commented Jun 21, 2021

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.

@sandain
Copy link
Member

sandain commented Jun 24, 2021

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

@ph-ghub
Copy link
Author

ph-ghub commented Jul 5, 2021

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.

@ginsm
Copy link

ginsm commented Aug 22, 2021

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.

@partzs
Copy link

partzs commented Aug 28, 2021

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

@wildpalms
Copy link

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.

@sandain
Copy link
Member

sandain commented Jan 6, 2022

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.

@wildpalms
Copy link

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.

@sandain
Copy link
Member

sandain commented Jan 6, 2022

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

@zanix zanix added the question label Apr 16, 2022
@morgantic
Copy link

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.

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

No branches or pull requests

7 participants