Closed BigDuke6nc closed 3 years ago
The permission of the executable should be 755
and the filesystem must allow execution. I.e. make sure it isn't mounted with the noexec
flag. I do not know anything about open media vault or its quirks when it comes to running Docker containers so maybe someone with relevant experience can chime in here.
When you change the permissions, can you manually execute valheim_server.x86_64
? Like just try to run it without any flags even if it throws an error. Just to see if the Kernel can execute the binary.
Thanks for the fast response. Yeah I get permission denied when I try to run the executable.
root@openmediavault:/srv/dev-disk-by-label-Storage/software/valheim/data/server# ./valheim_server.x86_64 -bash: ./valheim_server.x86_64: Permission denied
@BigDuke6nc ok then the task at hand would be to figure out why. Can you paste the output of mount
here?
Alternatively you could just not mount /opt/valheim
. The downside is that it'll then have to download the 1 GB Valheim dedicated server from Steam on each container update. The upside is that it is no longer affected by any external filesystem mount quirks.
Sorry, not sure where or what you want me to run the mount command on. Outside of my comfort area in docker. Can you explain a little further on what you are looking for?
On the same shell where you ran ./valheim_server.x86_64
run mount
and paste the output here.
The output of cat /etc/mtab
might also help in figuring out what's going wrong.
It's been a long time, but once upon a time I used OMV and had to remove noexec from an environmental variable to get Plex to run, docker/valheim may be similar.
https://openmediavault.readthedocs.io/en/5.x/various/fs_env_vars.html
@Outshynd that looks exactly like what is going on here. Thank you! @BigDuke6nc can you see if this works on your system? If so would you mind taking screenshots and write up what you had to do to resolve the issue, so we can extend the README with Open Media Vault information for other users?
Thanks folks! That was it. Here are the steps to fix for Portainer:
1.) SSH your server and become root. 2.) nano /etc/openmediavault/config.xml 3.) F6 to search. Search for "noexec". It will be in the mntent section.
Should look something like this:
4.) Replace noexec with exec. 5.) Cntrl X, Y, then Enter to save. 6.) Back at the prompt. For OMV 5: omv-salt-deploy run fstab For OMV 4: omv-mkconf fstab
Thank you for the screenshot. I've extended the README with the information.
Btw. exec
is the default so just removing noexec
will do the trick.
Hi, I am getting this error too. I also am using OMV. I think I changed the SGID correctly but I am still having the issue. Any help would be appreciated.
2021-04-09 15:14:36,946 INFO spawned: 'valheim-server' with pid 242
Apr 9 15:14:36 /supervisord: valheim-server INFO - Running Valheim Server
Apr 9 15:14:36 /supervisord: valheim-server DEBUG - [242] - Server config is name: ** , port: 2356/udp, world: test1, public: 0, mod: none
Apr 9 15:14:36 /supervisord: valheim-server DEBUG - [242] - Valheim server with PID 245 stopped
Apr 9 15:14:36 /supervisord: valheim-server INFO - Releasing PID file /var/run/valheim-server.pid
2021-04-09 15:14:36,968 INFO exited: valheim-server (exit status 0; not expected)
Apr 9 15:14:36 /supervisord: valheim-server INFO - Shutdown complete
Apr 9 15:14:36 /supervisord: valheim-server /usr/local/bin/valheim-server: line 110: /opt/valheim/server/valheim_server.x86_64: Permission denied
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968069 250 main.go:76] Configuring Valheim server log filter
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968226 250 main.go:96] Removing log lines starting with '(Filename:'
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968256 250 main.go:89] Removing log lines matching ' '
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968276 250 main.go:125] Removing invalid UTF-8 chars: true
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968302 250 main.go:122] Removing empty log lines: true
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968327 250 main.go:96] Removing log lines starting with 'src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp'
2021-04-09 15:14:37,970 INFO reaped unknown pid 247 (exit status 0)
2021-04-09 15:14:40,972 INFO reaped unknown pid 249 (exit status 0)
services: valheim: image: lloesche/valheim-server cap_add:
After running and redeploying: root@openmediavault:/srv/dev-disk-by-label-Storage/software# chmod 2777 valheim
This is the permissions I get: root@openmediavault:/srv/dev-disk-by-label-Storage/software/valheim/data/server# ls -lsa total 65616 4 drwxrwsrwx+ 4 root root 4096 Apr 9 11:38 . 4 drwxr-sr-x+ 6 root root 4096 Apr 9 11:02 .. 8 -rwxrwxrwx 1 root root 4728 Apr 9 11:01 LinuxPlayer_s.debug 28796 -rwxrwxrwx 1 root root 29484584 Apr 9 11:01 UnityPlayer.so 6876 -rwxrwxrwx 1 root root 7041000 Apr 9 11:01 UnityPlayer_s.debug 132 -rwxrwxrwx 1 root root 133822 Apr 9 11:01 'Valheim Dedicated Server Manual.pdf' 4 drwxrwsrwx+ 2 root root 4096 Apr 9 11:01 linux64 4 -rwxrwxrwx 1 root root 575 Apr 9 11:01 start_server.sh 4 -rwxrwxrwx 1 root root 34 Apr 9 11:01 start_server_xterm.sh 4 -rwxrwxrwx 1 root root 7 Apr 9 11:01 steam_appid.txt 29768 -rwxrwxrwx 1 root root 30480914 Apr 9 11:01 steamclient.so 8 -rwxrwxrwx 1 root root 6344 Apr 9 11:01 valheim_server.x86_64 4 drwxrwsrwx+ 6 root root 4096 Apr 9 11:01 valheim_server_Data
Originally posted by @BigDuke6nc in https://github.com/lloesche/valheim-server-docker/issues/119#issuecomment-816771811