hexparrot / mineos-node

node.js implementation of mineos minecraft management
GNU General Public License v3.0
333 stars 169 forks source link

Web UI not showing running servers, unable to start new server when running from unassigned device #369

Open f16v1per opened 4 years ago

f16v1per commented 4 years ago

I am running MineOS on an UnRaid machine, the container maintained by hexparrot and not the one by binhex. The container has privileged enabled and the defined directories are in RW/Slave access mode for the directories pointing to the unnassigned device. MineOS runs perfectly normal when using the default directories on the array such as /users/appdata/minecraft for the minecraft files. I want to run the server on an SSD outside the array in an attempt to increase server performance. Changing the directories to a unassigned device is when issues start to occur. No servers show up in the server list of the web ui however my previously running minecraft server appears to be functioning normally. When adding a new server I am unable to select a jar file in the "change runnable jar" drop down selection. Refreshing the page will cause that half-created server to disappear from the UI. The new server folder does get created under minecraft/server/SERVERNAME and contains cron.config, server.config and server.properties. Pasting in a jar file into one of these server folders does nothing. It seems I am having a similar issue to issue #169. The git commit listed in the top right of the web ui is 5670b46

flareofghast commented 4 years ago

I don’t know unraid but on a usual Linux machine you could create a symbolic link to your new device/location for the entire servers directory, as the easiest path.

Sent from my iPhone

On 13 Sep 2020, at 5:51 am, f16v1per notifications@github.com wrote:

 I am running MineOS on an UnRaid machine, the container maintained by hexparrot and not the one by binhex. The container has privileged enabled and the defined directories are in RW/Slave access mode for the directories pointing to the unnassigned device. MineOS runs perfectly normal when using the default directories on the array such as /users/appdata/minecraft for the minecraft files. I want to run the server on an SSD outside the array in an attempt to increase server performance. Changing the directories to a unassigned device is when issues start to occur. No servers show up in the server list of the web ui however my previously running minecraft server appears to be functioning normally. When adding a new server I am unable to select a jar file in the "change runnable jar" drop down selection. Refreshing the page will cause that half-created server to disappear from the UI. The new server folder does get created under minecraft/server/SERVERNAME and contains cron.config, server.config and server.properties. Pasting in a jar file into one of these server folders does nothing. It seems I am having a similar issue to issue #169. The git commit listed in the top right of the web ui is 5670b46

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

f16v1per commented 4 years ago

I'll do some research and see if I can get something similar working.

f16v1per commented 4 years ago

Unfortunately it doesn't look like symbolic links work either. I have verified that the symlink I created does work using Krusader and SMB. The server on the unassigned device still turns on, and new server folders get generated just fine. But like before, I cannot select a runnable jar and no servers appear in the web ui.

flareofghast commented 4 years ago

Check the folder permissions are permitting the user MineOS uses.

Sent from my iPhone

On 14 Sep 2020, at 11:17 am, f16v1per notifications@github.com wrote:

 Unfortunately it doesn't look like symbolic links work either. I have verified that the symlink I created does work using Krusader and SMB. The server on the unassigned device still turns on, and new server folders get generated just fine. But like before, I cannot select a runnable jar and no servers appear in the web ui.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

f16v1per commented 3 years ago

I'm not sure which user the container its running under but I only have two users on my UnRaid machine. One is root and the other has full read/write to everything as far as I know. The container itself has privileged enabled and the access mode is set to RW/Slave which is whats recommend when a container has trouble accessing an unassigned device. I also tried the UnRaid new permissions tools that reset all the files and directories to nobody in case of permission issues which does not seem to have worked.

f16v1per commented 3 years ago

I recently added a cache drive to my unraid machine (was waiting to make sure my VMs were running fine before wiping old the old windows install). I migrated my appdata and other system files over to the cache drive along with MineOS and server files, putting them back to their default directories. Everything seems to be running fine now off of the cahce ssd. If anyone else is looking to keep their server files off the array I would recommend creating a new share and either marking it as cahce only or cache preferred and avoid using an unassigned device all together.

f16v1per commented 3 years ago

I began having similar issues on the cache drive as I did with running the files off of an unassigned device. After digging through more forum posts and a bit of experimentation I now believe the issue was file ownership. This all started recently when I was trying to restore a world save, by copying the files from a windows machine I inadvertently changed the file ownership.

Before I knew this I was resetting the ownership of files using UnRaid's built in utility so I could move files around using windows file explorer, otherwise I would get "you require permission.." message . This utility would set all of the files in mnt/cache/appdata/minecraft/ to nobody:users.

For example:

root@Tower:/mnt/cache/appdata# ls -la /mnt/cache/appdata/minecraft/
total 0
drwxrwxrwx 1 nobody users  68 Nov 12 23:12 ./
drwxrwxrwx 1 nobody users 408 Nov 14 10:47 ../
drwxrwxrwx 1 nobody users   70 Nov 14 10:52 archive/
drwxrwxrwx 1 nobody users   70 Nov 14 10:52 backup/
drwxrwxrwx 1 nobody users  42 Nov 12 19:13 import/
drwxrwxrwx 1 nobody users  62 Nov 12 23:14 profiles/
drwxrwxrwx 1 nobody users  134 Nov 14 10:52 servers/

Setting the game files back to user:1000 by using: chown -R user:1000 /mnt/cache/appdata/minecraft/servers/ Where user is my UnRaid user that runs the docker image.

Now looks like:

root@Tower:/mnt/cache/appdata# ls -la /mnt/cache/appdata/minecraft/
total 0
drwxrwxrwx 1 user     1000  68 Nov 12 23:12 ./
drwxrwxrwx 1 nobody users 408 Nov 14 10:47 ../
drwxrwxrwx 1 user     1000  70 Nov 14 10:52 archive/
drwxrwxrwx 1 user     1000  70 Nov 14 10:52 backup/
drwxrwxrwx 1 user     1000  42 Nov 12 19:13 import/
drwxrwxrwx 1 user     1000  62 Nov 12 23:14 profiles/
drwxrwxrwx 1 user     1000 134 Nov 14 10:52 servers/

This fixed the issue. I can now see all the test server I created while trying to track down this issue. I am fairly certain this is also what was causing the problems when I was attempting to run from an unassigned device.