![]() |
|
Shuts down on startup - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: Shuts down on startup (/showthread.php?tid=6604) |
RE: Shuts down on startup - simoncn - 27-05-2022 22:17 To clarify, my suggestion was to manually install MinimServer 2.1.2-2102 without first uninstalling MinimServer and also without restarting the NAS. Please try this when you get an opportunity and let me know what happened. If this doesn't work, please post the exact version of DSM you are using. RE: Shuts down on startup - SpruceFan - 27-05-2022 23:36 ...back from delivering the dog to the kennel..... I manually reinstalled without doing anything, i.e. did as you asked. The same thing happened. The DSM version is DSM 7.1-42661 Update 1 When I check for a DSM update, Synology informs me that this is the most recent. I'm very grateful for whatever help you can give me. Incidentally, I've been ruling Mo0deAudio on a Raspberry pi as renderer, it works much, much better than VolumIO although it is a nuisance to set up. Linn on an iPhone is my usual control point. RE: Shuts down on startup - simoncn - 28-05-2022 17:33 I have updated DSM to the same version as you and I can't reproduce what you are seeing. The error you are seeing is caused by incompatible file permission settings for some MinimServer files carried over from DSM 6. The DSM 7 rules for file permissions are different from the rules for DSM 6. The DSM 7 version of MinimServer 2.1.2 cointains code to automatically fix these incompatible permissions when either of the following happens: 1) The NAS is restarted with MinimServer enabled 2) MinimServer is installed I have tested both of these on my system and they are fixing the permissions as expected. It seems that for some reason this is not happening on your system. To help me identify what might be causing this, please run all the following commands from an ssh command line and post the output. Code: ls -ld /tmp/MinimServerMany thanks! RE: Shuts down on startup - SpruceFan - 01-06-2022 21:30 Simon, Back from prepping the boat. I copied those commands and pasted them into an ssh command line. I got: mikemcone@Salle_Favart:~$ ls -ld /tmp/MinimServer drwxr-xr-x 2 MinimServer MinimServer 60 Jun 1 09:35 /tmp/MinimServer mikemcone@Salle_Favart:~$ ls -l /tmp/MinimServer total 4 -rw-r--r-- 1 MinimServer MinimServer 158 Jun 1 09:35 minimserver-log mikemcone@Salle_Favart:~$ ls -l /usr/local/lib/systemd/system/*MinimServer* -rw-r--r-- 1 root root 147 May 27 17:28 /usr/local/lib/systemd/system/MinimServer.slice -rw-r--r-- 1 root root 666 May 27 17:28 /usr/local/lib/systemd/system/pkgctl-MinimServer.service -rw-r--r-- 1 root root 325 May 27 17:28 /usr/local/lib/systemd/system/pkg-MinimServer-init.service mikemcone@Salle_Favart:~$ cat /usr/local/lib/systemd/system/pkg-MinimServer-init.service [Unit] Description=MinimServer Initial Setup Before=pkgctl-MinimServer.service IgnoreOnIsolate=no DefaultDependencies=yes StopWhenUnneeded=true [Service] Type=oneshot ExecStart=/var/packages/MinimServer/conf/systemd/init.sh [Install] WantedBy=pkgctl-MinimServer.service [X-Synology] Name=MinimServerInit DefaultEnable=yes mikemcone@Salle_Favart:~$ ls -l /var/packages/MinimServer/conf/systemd/init.sh -rwxr-xr-x 1 root root 1609 Jan 12 07:56 /var/packages/MinimServer/conf/systemd/init.sh mikemcone@Salle_Favart:~$ cat /var/packages/MinimServer/conf/systemd/init.sh #!/bin/sh change_dir_access() { [ ! -e "$1" ] && return access=$(/bin/stat -c '%a' "$1") [ "$access" = 755 ] && return /bin/chmod -R u+w "$1" } change_dir_owner() { [ ! -e "$1" ] && return owner=$(/bin/stat -c '%U' "$1") [ "$owner" = MinimServer ] && return /bin/chown -R MinimServer:MinimServer "$1" } change_owner() { [ ! -e "$1" ] && return owner=$(/bin/stat -c '%U' "$1") [ "$owner" = MinimServer ] && return /bin/chown MinimServer:MinimServer "$1" } # fix incorrect permissions after migration from DSM 6.2 package_location="/var/packages/MinimServer/target" appstore_target=$(/bin/readlink "${package_location}") appstore_dir=$(/bin/dirname "${appstore_target}") volume=$(/bin/dirname "${appstore_dir}") change_dir_owner $volume/MinimServer/appData change_dir_owner $volume/MinimServer/etc change_dir_owner $volume/MinimServer/opt change_dir_owner /tmp/MinimServer change_dir_access $volume/MinimServer/appData change_dir_access $volume/MinimServer/etc change_dir_access $volume/MinimServer/opt change_dir_access /tmp/MinimServer # this directory might not have been deleted by installer.sh rm -rf $volume/MinimServer/backup change_owner /var/packages/MinimServer/etc/minimserver-starter.license change_owner /var/packages/MinimServer/etc/minimserver.license usernames=\'$(grep administrators:x:101: /etc/group | cut -f4- -d':' | sed "s/,$//" | sed "s/,/' '/g")\' echo "$usernames" | grep "'MinimServer'" || sh -c "/usr/syno/sbin/synogroup --member administrators $usernames MinimServer" rm -rf /etc/systemd/system/pkgctl-MinimServer.service.wants RE: Shuts down on startup - simoncn - 03-06-2022 08:46 Thanks for this. This shows that the file permissions are correct and the problem has some other cause. After attempting to start MinimServer from Package Center and getting the Manually Stopped message, please run the following commands and post the output from each command. Each command must be entered as a single very long line. Code: sudo -u MinimServer sh -c "export SYNOPKG_PKGNAME=MinimServer && export SYNOPKG_PKGDEST=/var/packages/MinimServer/target && export SYNOPKG_TEMP_LOGFILE=/tmp/minimlog && sh -x /var/packages/MinimServer/scripts/start-stop-status status"RE: Shuts down on startup - SpruceFan - 03-06-2022 14:28 Simon, Thank you! I ran MinimServer from the Package Center and as usual it shut down and gave the Manually Stoped message. I logged into the NAS with ssh and copied in the first command string. I received a rather strange reply: mikemcone@Salle_Favart:~$ sudo -u MinimServer sh -c "export SYNOPKG_PKGNAME=MinimServer && export SYNOPKG_PKGDEST=/var/packages/MinimServer/target && export SYNOPKG_TEMP_LOGFILE=/tmp/minimlog && sh -x /var/packages/MinimServer/scripts/start-stop-status status" We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. Password: + APP_DATA=appData + TMP_DIR=/tmp/MinimServer + PID_FILE=/tmp/MinimServer/minimserver.pid + LOG_FILE=/tmp/MinimServer/minimserver-log + package_location=/var/packages/MinimServer/target ++ cat /etc/samba/smb.share.conf ++ sed -r '/\/MinimServer$/!d;s/^.*path=(\/volume[0-9]{1,4}\/MinimServer).*$/\1/' + minim_share=/volume1/MinimServer + '[' -n /volume1/MinimServer ']' ++ dirname /volume1/MinimServer + VOLUME=/volume1 + MINIM_HOME=/volume1/MinimServer + '[' '!' -x /bin/busybox ']' + PSOPTS=-ef + '[' '!' -e /tmp/MinimServer ']' + case $1 in + minim_java_status + '[' '!' -e /tmp/MinimServer/minimserver.pid ']' + return 3 + debug 'status returned 3' ++ date '+%a %d %b %T' + DATE='Fri 03 Jun 08:19:47' + echo 'Fri 03 Jun 08:19:47 status returned 3' + clean_up + '[' -e /tmp/MinimServer/minimserver.pid ']' + exit 3 I entered the password again and copied in the command string. The reply is mostly the same: mikemcone@Salle_Favart:~$ sudo -u MinimServer sh -c "export SYNOPKG_PKGNAME=MinimServer && export SYNOPKG_PKGDEST=/var/packages/MinimServer/target && export SYNOPKG_TEMP_LOGFILE=/tmp/minimlog && sh -x /var/packages/MinimServer/scripts/start-stop-status status" + APP_DATA=appData + TMP_DIR=/tmp/MinimServer + PID_FILE=/tmp/MinimServer/minimserver.pid + LOG_FILE=/tmp/MinimServer/minimserver-log + package_location=/var/packages/MinimServer/target ++ cat /etc/samba/smb.share.conf ++ sed -r '/\/MinimServer$/!d;s/^.*path=(\/volume[0-9]{1,4}\/MinimServer).*$/\1/' + minim_share=/volume1/MinimServer + '[' -n /volume1/MinimServer ']' ++ dirname /volume1/MinimServer + VOLUME=/volume1 + MINIM_HOME=/volume1/MinimServer + '[' '!' -x /bin/busybox ']' + PSOPTS=-ef + '[' '!' -e /tmp/MinimServer ']' + case $1 in + minim_java_status + '[' '!' -e /tmp/MinimServer/minimserver.pid ']' + return 3 + debug 'status returned 3' ++ date '+%a %d %b %T' + DATE='Fri 03 Jun 08:20:00' + echo 'Fri 03 Jun 08:20:00 status returned 3' + clean_up + '[' -e /tmp/MinimServer/minimserver.pid ']' + exit 3 Then the second command string: mikemcone@Salle_Favart:~$ sudo -u MinimServer sh -c "export SYNOPKG_PKGNAME=MinimServer && export SYNOPKG_PKGDEST=/var/packages/MinimServer/target && export SYNOPKG_TEMP_LOGFILE=/tmp/minimlog && sh -x /var/packages/MinimServer/scripts/start-stop-status stop" + APP_DATA=appData + TMP_DIR=/tmp/MinimServer + PID_FILE=/tmp/MinimServer/minimserver.pid + LOG_FILE=/tmp/MinimServer/minimserver-log + package_location=/var/packages/MinimServer/target ++ cat /etc/samba/smb.share.conf ++ sed -r '/\/MinimServer$/!d;s/^.*path=(\/volume[0-9]{1,4}\/MinimServer).*$/\1/' + minim_share=/volume1/MinimServer + '[' -n /volume1/MinimServer ']' ++ dirname /volume1/MinimServer + VOLUME=/volume1 + MINIM_HOME=/volume1/MinimServer + '[' '!' -x /bin/busybox ']' + PSOPTS=-ef + '[' '!' -e /tmp/MinimServer ']' + case $1 in + debug 'called stop: sps= mps=' ++ date '+%a %d %b %T' + DATE='Fri 03 Jun 08:24:35' + echo 'Fri 03 Jun 08:24:35 called stop: sps= mps=' + '[' '' == RESTART ']' + '[' '' == UNINSTALL ']' + minim_java_status + '[' '!' -e /tmp/MinimServer/minimserver.pid ']' + return 3 + clean_up + '[' -e /tmp/MinimServer/minimserver.pid ']' + exit 0 And finally the third: mikemcone@Salle_Favart:~$ sudo -u MinimServer sh -c "export SYNOPKG_PKGNAME=MinimServer && export SYNOPKG_PKGDEST=/var/packages/MinimServer/target && export SYNOPKG_TEMP_LOGFILE=/tmp/minimlog && sh -x /var/packages/MinimServer/scripts/start-stop-status start" + APP_DATA=appData + TMP_DIR=/tmp/MinimServer + PID_FILE=/tmp/MinimServer/minimserver.pid + LOG_FILE=/tmp/MinimServer/minimserver-log + package_location=/var/packages/MinimServer/target ++ cat /etc/samba/smb.share.conf ++ sed -r '/\/MinimServer$/!d;s/^.*path=(\/volume[0-9]{1,4}\/MinimServer).*$/\1/' + minim_share=/volume1/MinimServer + '[' -n /volume1/MinimServer ']' ++ dirname /volume1/MinimServer + VOLUME=/volume1 + MINIM_HOME=/volume1/MinimServer + '[' '!' -x /bin/busybox ']' + PSOPTS=-ef + '[' '!' -e /tmp/MinimServer ']' + case $1 in + debug 'called start: sps= mps=' ++ date '+%a %d %b %T' + DATE='Fri 03 Jun 08:26:21' + echo 'Fri 03 Jun 08:26:21 called start: sps= mps=' + minim_java_status + '[' '!' -e /tmp/MinimServer/minimserver.pid ']' + return 3 + '[' '' == RESTART ']' + '[' -f /volume1/MinimServer/etc/minimstart.conf ']' + for f in "$SYNOPKG_PKGDEST"/lib/minimjre*.dir "$SYNOPKG_PKGDEST"/libext/minimjre*.dir + '[' '!' -e '/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir.jmdel' ']' + '[' -x '/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' ']' + JAVA_CMD='/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' + for f in "$SYNOPKG_PKGDEST"/lib/minimjre*.dir "$SYNOPKG_PKGDEST"/libext/minimjre*.dir + '[' '!' -e '/var/packages/MinimServer/target/libext/minimjre*.dir.jmdel' ']' + '[' -x '/var/packages/MinimServer/target/libext/minimjre*.dir/jre/bin/java' ']' + source /etc/profile ++ umask 077 ++ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin ++ export PATH ++ PGDATA=/var/services/pgsql ++ export PGDATA ++ TERMINFO=/usr/share/terminfo ++ export TERMINFO ++ TERM=xterm-256color ++ export TERM ++ PAGER=more ++ export PAGER ++ export LC_ALL=en_US.utf8 ++ LC_ALL=en_US.utf8 ++ export LANG=en_US.utf8 ++ LANG=en_US.utf8 +++ hostname ++ PS1='Salle_Favart> ' ++ alias 'dir=ls -al' ++ alias 'll=ls -la' ++ ulimit -c unlimited ++ '[' -f /etc.defaults/.bashrc_profile ']' ++ source /etc.defaults/.bashrc_profile +++ PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +++ alias 'ls=ls --color=auto' +++ alias 'grep=grep --color=auto' +++ HISTFILE=/var/tmp/.bash_history +++ HISTFILESIZE=100 +++ HISTSIZE=100 +++ bind '"\e[1~": beginning-of-line' +++ bind '"\e[4~": end-of-line' +++ '[' -f /var/packages/MinimServer/home/.bashrc ']' + '[' -z '/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' ']' + JAVAX= + '[' -z '' ']' + JAVAX='/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' + '[' '!' -x '/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' ']' ++ cat /etc/synoinfo.conf ++ grep --color=auto timezone ++ cut -f2 '-d"' + syno_timezone=Bogota + '[' -f /usr/share/zoneinfo/Timezone/synotztable.json -a -x /bin/jq ']' ++ jq '.Bogota | .nameInTZDB' /usr/share/zoneinfo/Timezone/synotztable.json ++ cut -f2 '-d"' + syno_tz=America/Bogota + '[' -n America/Bogota ']' + export TZ=America/Bogota + TZ=America/Bogota + minim_java_status + '[' '!' -e /tmp/MinimServer/minimserver.pid ']' + return 3 + sh /var/packages/MinimServer/target/minim.sh '/var/packages/MinimServer/target/lib/minimjre(linux-x64)-14.0.1.dir/jre/bin/java' '' /tmp/MinimServer/minimserver.pid appData /var/packages/MinimServer/target /volume1/MinimServer '' '' /var/packages/MinimServer/target/minim.sh: line 26: cd: /volume1/MinimServer/appData: Permission denied rm: cannot remove '/volume1/MinimServer/appData/minimserver-out.log': Permission denied /var/packages/MinimServer/target/minim.sh: line 46: /volume1/MinimServer/appData/minimserver-out.log: Permission denied + RETVAL=0 + '[' 0 -ne 0 ']' + exit 0 I'm afraid that you may not have wanted me to enter it four times. If I've messed up, let me know; I'll try to get it straight. RE: Shuts down on startup - simoncn - 03-06-2022 17:12 Thanks very much for this. Everything is fine with the commands you used. I think we are getting close now. Which volume did you use to install MinimServer? Also, please post the results of the following commands: Code: ls -l /var/packages/MinimServer/targetMany thanks. RE: Shuts down on startup - SpruceFan - 04-06-2022 00:39 Simon, Thanks! I was out all day and just got back. I'm running RAID Level 1. I installed MinimServer on Storage Pool1, Volume 1. There is no other storage pool or volume. At least I don't think so...I'm more than a little bit of a neophyte, as you certainly realize. The commands and their output: mikemcone@Salle_Favart:~$ ls -l /var/packages/MinimServer/target lrwxrwxrwx 1 root root 30 May 27 17:28 /var/packages/MinimServer/target -> /volume1/@appstore/MinimServer mikemcone@Salle_Favart:~$ ls -lL /var/packages/MinimServer/target total 12 drwxr-xr-x 1 MinimServer MinimServer 14 Mar 8 2016 bin drwxr-xr-x 1 MinimServer MinimServer 28 Nov 3 2013 etc drwxr-xr-x 1 MinimServer MinimServer 536 Feb 7 10:16 lib drwxr-xr-x 1 MinimServer MinimServer 0 Mar 29 2013 libext drwxr-xr-x 1 MinimServer MinimServer 0 Mar 29 2013 libsys -rw-r--r-- 1 MinimServer MinimServer 6582 Sep 13 2021 LICENSE.txt -rwxr-xr-x 1 MinimServer MinimServer 2188 Jan 4 2021 minim.sh drwxr-xr-x 1 MinimServer MinimServer 24 Nov 2 2013 ui mikemcone@Salle_Favart:~$ ls -l /volume1/MinimServer total 0 d-w------- 1 MinimServer MinimServer 640 May 19 14:24 appData drwxrwxrwx+ 1 root root 52 Dec 31 1999 @eaDir d-w------- 1 MinimServer MinimServer 372 Aug 13 2021 etc d-w------- 1 MinimServer MinimServer 6 Aug 13 2021 opt mikemcone@Salle_Favart:~$ ls -l /volume1/MinimServer/appData ls: cannot open directory '/volume1/MinimServer/appData': Permission denied mikemcone@Salle_Favart:~$ I appreciate your patience. I was briefly a kind of IT person: I did a postdoc in computer chemistry. That was over 45 years ago and all the programming was in assembler. I had a great time, but I've really done none since. RE: Shuts down on startup - simoncn - 04-06-2022 09:00 Thanks for this. The file permissions for /volume1/MinimServer are incorrect. I am not sure how this could happen. Thre might be some other setting in DSM that is causing this. To confirm whether this is just affecting the /volume1/MinimServer folder or perhaps other folders as well, please post the output from this command: Code: ls -l /volume1I will have some time later today to investigate further and post a solution. I was also programming in assembler 45 years ago. Those were good times.
RE: Shuts down on startup - simoncn - 04-06-2022 21:49 This problem is more serious than I was expecting. I am seeing a number of file permission problems (not exactly the same as yours) on both my NASs running DSM 7. It will take a few days for me to identify what is causing these permission problems and produce a solution. |