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

Radarr upgrade to V3 reports incorrect service startup on Synology #4285

Closed
mreid-tt opened this issue Dec 5, 2020 · 35 comments
Closed

Radarr upgrade to V3 reports incorrect service startup on Synology #4285

mreid-tt opened this issue Dec 5, 2020 · 35 comments

Comments

@mreid-tt
Copy link
Contributor

mreid-tt commented Dec 5, 2020

For new Package Requests, see the guidelines

Setup

Package Name: Radarr
Package Version: 20200921-11 (then with app update to v3.0.0.4204)

NAS Model: Synology
NAS Architecture: x64
DSM version: 6.2.3-25426 Update 2

Expected behavior

After running the built-in app update from version 0.2.0.1504 to version 3.0.0.4204 the app updates and the package in the Package Centre reports as 'Running'

Actual behavior

After running the built-in app update from version 0.2.0.1504 to version 3.0.0.4204 the app updates and the package in the Package Centre reports as 'Stopped' with an error 'Failed to run the package service' reported when the Run button is clicked

Steps to reproduce

1. Install clean Radarr 20200921-11 from SynoCommunity
2. In the Radarr interface under System > Updates, click Install Latest to update to V3
3. Refresh the Radarr interface to show the new V3 UI and then Shutdown the app
4. From the Package Center click on Run for the Radarr app

Package log

Check Package Center or /usr/local/{package}/var/

Sat Dec  5 07:09:18 AST 2020
Starting radarr command env PATH=/var/packages/mono/target/bin:/volume1/@appstore/radarr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin HOME=/volume1/@appstore/radarr/var LD_LIBRARY_PATH=/volume1/@appstore/radarr/lib /var/packages/mono/target/bin/mono /volume1/@appstore/radarr/share/Radarr/Radarr.exe 
[Info] Bootstrap: Starting Radarr - /volume1/@appstore/radarr/share/Radarr/Radarr.exe - Version 3.0.0.4204 
[Info] Router: Application mode: Interactive 
[Info] MigrationController: *** Migrating data source=/volume1/@appstore/radarr/var/.config/Radarr/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] MigrationController: *** Migrating data source=/volume1/@appstore/radarr/var/.config/Radarr/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] WebHostController: Listening on the following URLs: 
[Info] WebHostController:   http://*:8310 
[Info] RadarrBootstrapper: Starting Web Server 
[Info] CommandExecutor: Starting 2 threads for tasks. 
[Warn] MonoDebugCheck: Mono is not running with --debug switch 

Other logs

/var/log/messages

2020-12-05T07:09:39-04:00 Demo-NAS [ 4552.256121] init: pkgctl-radarr pre-start process (2985) terminated with status 1
2020-12-05T07:09:39-04:00 Demo-NAS synoscgi_SYNO.Core.Package.Control_1_start[2874]: servicecfg_internal_lib.c:22 Failed to start job [pkgctl-radarr][0xD900 manager.cpp:204]
2020-12-05T07:09:40-04:00 Demo-NAS synoscgi_SYNO.Core.Package.Control_1_start[2874]: service_initjob_action.c:27 InitJobStart failed, [0xD900 manager.cpp:204]
2020-12-05T07:09:40-04:00 Demo-NAS synoscgi_SYNO.Core.Package.Control_1_start[2874]: pkgstartstop.cpp:371 Failed to start pkgctl-radarr (err=-1) [0xD900 manager.cpp:204]

/var/log/synopkg.log

2020/12/05 07:09:14	start radarr: begin to stop version 20200921-11
2020/12/05 07:09:15	start radarr 20200921-11 Begin start-stop-status stop
2020/12/05 07:09:15	start radarr 20200921-11 End start-stop-status stop ret=[0]
2020/12/05 07:09:15	start radarr 20200921-11 Begin unload apparmor
2020/12/05 07:09:15	start radarr 20200921-11 End unload apparmor ret=[0]
2020/12/05 07:09:16	start radarr: stop version 20200921-11 successfully, result 0
2020/12/05 07:09:16	start radarr: begin to start version 20200921-11
2020/12/05 07:09:18	start radarr 20200921-11 Begin pre-load apparmor
2020/12/05 07:09:18	start radarr 20200921-11 End pre-load apparmor ret=[0]
2020/12/05 07:09:18	start radarr 20200921-11 Begin start-stop-status start
2020/12/05 07:09:39	start radarr 20200921-11 End start-stop-status start ret=[1]
2020/12/05 07:09:40	(system) trigger radarr 20200921-11 Begin start-stop-status stop
2020/12/05 07:09:40	(system) trigger radarr 20200921-11 End start-stop-status stop ret=[0]
2020/12/05 07:09:40	(system) trigger radarr 20200921-11 Begin unload apparmor
2020/12/05 07:09:40	(system) trigger radarr 20200921-11 End unload apparmor ret=[0]
2020/12/05 07:09:40	stop radarr: begin to stop version 20200921-11
2020/12/05 07:09:41	stop radarr: stop version 20200921-11 successfully, result 0
2020/12/05 07:09:42	start radarr: start version 20200921-11 failed, result 272
@mreid-tt mreid-tt mentioned this issue Dec 5, 2020
3 tasks
@BenjV
Copy link

BenjV commented Dec 5, 2020

Until the package is fixed you can use this workaround.

Find the file:
/var/packages/radarr/scripts/service-setup

Change this line( line number 37):
PID_FILE="${CONFIG_DIR}/Radarr/nzbdrone.pid"

into:
PID_FILE="${CONFIG_DIR}/Radarr/radarr.pid"

If radarr is still running, stop it from within radarr.
Start the package from the package center.

@Undead2211
Copy link

Hi there,
I've got a similar behavior. Radar start button in the DSM starts the Radarr service but says there were problems and it couldn't start. Although it's startet in the background and also reachable.

In addition there is following remark within the Radarr->System-> Status Page:
Please upgrade to the .NET Core version of Radarr
with a link to the following instructions:
https://wiki.servarr.com/Radarr_System#update-to-net-core-version

Everything else (expect the not correct status in DSM and the hint to upgrade to.NET Core) seems to work actually.

How should I proceed in order to have those things solved to?

Regards & Thx for your great work there

@BenjV
Copy link

BenjV commented Dec 5, 2020

Maybe you should read my post placed just before yours before asking a solution already given.

And upgrading to .NET core is no option for now and in the immediate future, because there is no .NET core for Synology available.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Dec 5, 2020

Hi @BenjV, thanks for your comment. I've actually already documented the workaround here: #3987 (comment).

What I really need help with is the pull request I made related to this issue: #4276

@BenjV
Copy link

BenjV commented Dec 5, 2020

I cannot help with that, please ask one of the SynoCommunity admins.

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

chmod: changing permissions of ‘service-setup’: Operation not permitted

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

I cannot change that file BenjV. Pls help.

@BenjV
Copy link

BenjV commented Dec 7, 2020

Stop Radarr
Log in with ssh into your Nas as user admin
Make yourself root with this command:

sudo -i

Change the file with this command:

sed -i 's/nzbdrone.pid.*/radarr.pid/' /var/packages/radarr/scripts/service-setup

Start Radarr from the package center.

@BenjV
Copy link

BenjV commented Dec 7, 2020

sudo -i first

You must make yourself root first

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

Yes, done. But it still shows not running however the icon is back on synology dsm desktop

@BenjV
Copy link

BenjV commented Dec 7, 2020

What do you mean with shows not running?

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

image

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

Even worse now, it aint working at all anymore. I use nightly builds.

@BenjV
Copy link

BenjV commented Dec 7, 2020

Use this command to show the file and look if the line is correct now.

cat /var/packages/radarr/scripts/service-setup

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

root@SynologyNAS:~# cat /var/packages/radarr/scripts/service-setup
### Package specific variables and functions
# Base service USER to run background process prefixed according to DSM
USER="radarr"
PRIV_PREFIX=sc-
SYNOUSER_PREFIX=svc-
if [ -n "${SYNOPKG_DSM_VERSION_MAJOR}" -a "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 6 ]                                                                                                                                     ; then EFF_USER="${SYNOUSER_PREFIX}${USER}"; else EFF_USER="${PRIV_PREFIX}${USER                                                                                                                                     }"; fi
# Service port
SERVICE_PORT="8310"
# start-stop-status script redirect stdout/stderr to LOG_FILE
LOG_FILE="${SYNOPKG_PKGDEST}/var/${SYNOPKG_PKGNAME}.log"
# Service command has to deliver its pid into PID_FILE
PID_FILE="${SYNOPKG_PKGDEST}/var/${SYNOPKG_PKGNAME}.pid"

# Invoke shell function if available
call_func ()
{
    FUNC=$1
    if type "$FUNC" 2>/dev/null | grep -q 'function' 2>/dev/null; then
        if [ -n "${INST_LOG}" ]; then
            echo "Invoke $FUNC" >> ${INST_LOG}
        fi
        eval ${FUNC}
    fi
}

PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
MONO_PATH="/var/packages/mono/target/bin"
MONO="${MONO_PATH}/mono"

# Check versions during upgrade
RADARR="${SYNOPKG_PKGDEST}/share/Radarr/Radarr.exe"
SPK_RADARR="${SYNOPKG_PKGINST_TEMP_DIR}/share/Radarr/Radarr.exe"

# Radarr uses custom Config and PID directories
HOME_DIR="${SYNOPKG_PKGDEST}/var"
CONFIG_DIR="${SYNOPKG_PKGDEST}/var/.config"
PID_FILE="${CONFIG_DIR}/Radarr/radarr.pid

# Some have it stored in the root of package
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; the                                                                                                                                     n
    MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

GROUP="sc-download"
LEGACY_GROUP="sc-media"

SERVICE_COMMAND="env PATH=${MONO_PATH}:${PATH} HOME=${HOME_DIR} LD_LIBRARY_PATH=                                                                                                                                     ${SYNOPKG_PKGDEST}/lib ${MONO} ${RADARR}"
SVC_BACKGROUND=y

service_postinst ()
{
    # Move config.xml to .config
    mkdir -p ${CONFIG_DIR}/Radarr
    mv ${SYNOPKG_PKGDEST}/app/config.xml ${CONFIG_DIR}/Radarr/config.xml
    set_unix_permissions "${CONFIG_DIR}"

    # If nessecary, add user also to the old group before removing it
    syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "${LEGACY_GROUP}"
    syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "users"

    # Discard legacy obsolete busybox user account
    BIN=${SYNOPKG_PKGDEST}/bin
    $BIN/busybox --install $BIN >> ${INST_LOG}
    $BIN/delgroup "${USER}" "users" >> ${INST_LOG}
    $BIN/deluser "${USER}" >> ${INST_LOG}
}

service_preupgrade ()
{
    # We have to account for legacy folder in the root
    # It should go, after the upgrade, into /var/.config/
    # The /var/ folder gets automatically copied by service-installer after this
    if [ -d "${LEGACY_CONFIG_DIR}" ]; then
        echo "Moving ${LEGACY_CONFIG_DIR} to ${INST_VAR}" >> ${INST_LOG}
        mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
    else
        # Create, in case it's missing for some reason
        mkdir ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
    fi

    # Is Installed Radarr Binary Ver. >= SPK Radarr Binary Ver.?
    CUR_VER=$(${MONO_PATH}/monodis --assembly ${RADARR} | grep "Version:" | awk                                                                                                                                      '{print $2}')
    echo "Installed Radarr Binary: ${CUR_VER}" >> ${INST_LOG}
    SPK_VER=$(${MONO_PATH}/monodis --assembly ${SPK_RADARR} | grep "Version:" |                                                                                                                                      awk '{print $2}')
    echo "Requested Radarr Binary: ${SPK_VER}" >> ${INST_LOG}
    if [ "${CUR_VER//.}" -ge "${SPK_VER//.}" ]; then
        echo 'KEEP_CUR="yes"' > ${CONFIG_DIR}/KEEP_VAR
        echo "[KEEPING] Installed Radarr Binary - Upgrading Package Only" >> ${I                                                                                                                                     NST_LOG}
        mv ${SYNOPKG_PKGDEST}/share ${INST_VAR}
    else
        echo 'KEEP_CUR="no"' > ${CONFIG_DIR}/KEEP_VAR
        echo "[REPLACING] Installed Radarr Binary" >> ${INST_LOG}
    fi
}

service_postupgrade ()
{
    # Restore Current Radarr Binary if Current Ver. >= SPK Ver.
    . ${CONFIG_DIR}/KEEP_VAR
    if [ "$KEEP_CUR" == "yes" ]; then
        echo "Restoring Radarr version from before upgrade" >> ${INST_LOG}
        rm -fr ${SYNOPKG_PKGDEST}/share >> $INST_LOG 2>&1
        mv ${INST_VAR}/share ${SYNOPKG_PKGDEST}/ >> $INST_LOG 2>&1
        set_unix_permissions "${SYNOPKG_PKGDEST}/share"
    fi
    set_unix_permissions "${CONFIG_DIR}"

    # If backup was created before new-style packages
    # new updates/backups will fail due to permissions (see #3185)
    set_unix_permissions "/tmp/radarr_backup"
    set_unix_permissions "/tmp/radarr_update"

    # Remove upgrade Flag
    rm ${CONFIG_DIR}/KEEP_VAR

It is.

@BenjV
Copy link

BenjV commented Dec 7, 2020

Most likely Radar is still running.
Try in your browser to open it with http://[NAS ipadres]:8310/ and stop it from within Radarr

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

It is not running, i checked. I do have the Docker version running at port 7878 though.

@BenjV
Copy link

BenjV commented Dec 7, 2020

do a:

dir /var/packages/radarr/target/var/.config/Radarr

See if there is a pidfile

Check if radarr still running with:

ps aux | grep Radarr

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

root@SynologyNAS:~# dir /var/packages/radarr/target/var/.config/Radarr

total 72212
drwxr-xr-x 1 sc-radarr radarr      134 Dec  7 11:25 .
drwxr-xr-x 1 sc-radarr radarr       22 Nov 29 12:48 ..
drwxr-xr-x 1 sc-radarr radarr       30 Dec  6 12:47 Backups
-rw-r--r-- 1 sc-radarr radarr      555 Dec  5 10:57 config.xml
drwxr-xr-x 1 sc-radarr radarr      364 Dec  6 17:51 logs
-rw-r--r-- 1 sc-radarr radarr 21303296 Dec  7 11:25 logs.db
drwxr-xr-x 1 sc-radarr radarr    12696 Dec  6 18:04 MediaCover
-rw-r--r-- 1 sc-radarr radarr 52633600 Dec  7 11:25 radarr.db
-rw-r--r-- 1 sc-radarr radarr        5 Dec  5 10:57 radarr.pid
drwxr-xr-x 1 sc-radarr radarr      280 Dec  5 10:56 UpdateLogs
root@SynologyNAS:~#
root@SynologyNAS:~#

root@SynologyNAS:~# ps aux | grep Radarr

root     23927  0.0  0.0  23128   964 pts/40   S+   12:37   0:00 grep --color=auto Radarr
root@SynologyNAS:~#

@BenjV
Copy link

BenjV commented Dec 7, 2020

He is making the correct pidfile so the fix is working.
And you are correct Radarr is not running.
Did you try to start it from the package center?

Maybe try to reboot your Nas.

Otherwise I am out of idea's, most likely a vague docker problem.
On my Nas it is working just fine.

@wvkreg
Copy link

wvkreg commented Dec 7, 2020

I will try a reboot. I run the non docker version as well as docker together. I will also stop the docker version to test.

@BenjV
Copy link

BenjV commented Dec 7, 2020

My fix is for the normal version only.
The docker version does not use a Synology package.

@publicarray
Copy link
Member

And upgrading to .NET core is no option for now and in the immediate future, because there is no .NET core for Synology available.

@BenjV Progress for building .NET apps is slow but progressing, see #4207 and #3932

@felho001
Copy link

felho001 commented Dec 9, 2020

Hi now rum radarr on package center "but radarr issue Please upgrade to the .NET Core version of Radarr" It is problem or not?
Képernyőfotó 2020-12-09 - 21 35 08

@wvkreg
Copy link

wvkreg commented Dec 9, 2020

Use Docker version 3

@felho001
Copy link

felho001 commented Dec 9, 2020

Use Docker version 3

How use same package center? how to install docker? and witch relase?

@felho001
Copy link

felho001 commented Dec 9, 2020

How can enable in docker? sc-downloads group user to patch Volume1/video and Downloads folder? Synocommunity install I was simple enable group read and write...
Képernyőfotó 2020-12-09 - 22 27 23

@felho001
Copy link

felho001 commented Dec 9, 2020

You are using docker; download client DS station places downloads in /volume1/Video/Downloads but this directory does not appear to exist inside the container. Review your remote path mappings and container volume settings.

@publicarray
Copy link
Member

Please upgrade to the .NET Core version of Radarr" It is problem or not?

https://github.com/Radarr/Radarr/wiki/Health-Checks#update-to-net-core-version

Newer versions of Radarr are targeted for .NET Core. We provide legacy mono builds for those platforms that cannot use .NET Core. You are running one of these legacy builds but your platform supports .NET Core.

@severdia
Copy link

@BenjV I have the same issue as @wvkreg but I'm running the Synology package, not Docker. I tried the same things mentioned above and Radarr doesn't work at all anymore. When I click Run, nothing happens (I got the error before). This is what my result is so far:

root@XXXXXX:/var/packages/radarr/scripts# cat /var/packages/radarr/scripts/service-setup
### Package specific variables and functions
# Base service USER to run background process prefixed according to DSM
USER="radarr"
PRIV_PREFIX=sc-
SYNOUSER_PREFIX=svc-
if [ -n "${SYNOPKG_DSM_VERSION_MAJOR}" -a "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 6 ]; then EFF_USER="${SYNOUSER_PREFIX}${USER}"; else EFF_USER="${PRIV_PREFIX}${USER}"; fi
# Service port
SERVICE_PORT="8310"
# start-stop-status script redirect stdout/stderr to LOG_FILE
LOG_FILE="${SYNOPKG_PKGDEST}/var/${SYNOPKG_PKGNAME}.log"
# Service command has to deliver its pid into PID_FILE
PID_FILE="${SYNOPKG_PKGDEST}/var/${SYNOPKG_PKGNAME}.pid"

# Invoke shell function if available
call_func ()
{
    FUNC=$1
    if type "$FUNC" 2>/dev/null | grep -q 'function' 2>/dev/null; then
        if [ -n "${INST_LOG}" ]; then
            echo "Invoke $FUNC" >> ${INST_LOG}
        fi
        eval ${FUNC}
    fi
}

PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
MONO_PATH="/var/packages/mono/target/bin"
MONO="${MONO_PATH}/mono"

# Check versions during upgrade
RADARR="${SYNOPKG_PKGDEST}/share/Radarr/Radarr.exe"
SPK_RADARR="${SYNOPKG_PKGINST_TEMP_DIR}/share/Radarr/Radarr.exe"

# Radarr uses custom Config and PID directories
HOME_DIR="${SYNOPKG_PKGDEST}/var"
CONFIG_DIR="${SYNOPKG_PKGDEST}/var/.config"
PID_FILE="${CONFIG_DIR}/Radarr/radarr.pid

# Some have it stored in the root of package
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; then
    MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

GROUP="sc-download"
LEGACY_GROUP="sc-media"

SERVICE_COMMAND="env PATH=${MONO_PATH}:${PATH} HOME=${HOME_DIR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} ${RADARR}"
SVC_BACKGROUND=y

service_postinst ()
{
    # Move config.xml to .config
    mkdir -p ${CONFIG_DIR}/Radarr
    mv ${SYNOPKG_PKGDEST}/app/config.xml ${CONFIG_DIR}/Radarr/config.xml
    set_unix_permissions "${CONFIG_DIR}"

    # If nessecary, add user also to the old group before removing it
    syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "${LEGACY_GROUP}"
    syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "users"

    # Discard legacy obsolete busybox user account
    BIN=${SYNOPKG_PKGDEST}/bin
    $BIN/busybox --install $BIN >> ${INST_LOG}
    $BIN/delgroup "${USER}" "users" >> ${INST_LOG}
    $BIN/deluser "${USER}" >> ${INST_LOG}
}

service_preupgrade ()
{
    # We have to account for legacy folder in the root
    # It should go, after the upgrade, into /var/.config/
    # The /var/ folder gets automatically copied by service-installer after this
    if [ -d "${LEGACY_CONFIG_DIR}" ]; then
        echo "Moving ${LEGACY_CONFIG_DIR} to ${INST_VAR}" >> ${INST_LOG}
        mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
    else
        # Create, in case it's missing for some reason
        mkdir ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
    fi

    # Is Installed Radarr Binary Ver. >= SPK Radarr Binary Ver.?
    CUR_VER=$(${MONO_PATH}/monodis --assembly ${RADARR} | grep "Version:" | awk '{print $2}')
    echo "Installed Radarr Binary: ${CUR_VER}" >> ${INST_LOG}
    SPK_VER=$(${MONO_PATH}/monodis --assembly ${SPK_RADARR} | grep "Version:" | awk '{print $2}')
    echo "Requested Radarr Binary: ${SPK_VER}" >> ${INST_LOG}
    if [ "${CUR_VER//.}" -ge "${SPK_VER//.}" ]; then
        echo 'KEEP_CUR="yes"' > ${CONFIG_DIR}/KEEP_VAR
        echo "[KEEPING] Installed Radarr Binary - Upgrading Package Only" >> ${INST_LOG}
        mv ${SYNOPKG_PKGDEST}/share ${INST_VAR}
    else
        echo 'KEEP_CUR="no"' > ${CONFIG_DIR}/KEEP_VAR
        echo "[REPLACING] Installed Radarr Binary" >> ${INST_LOG}
    fi
}

service_postupgrade ()
{
    # Restore Current Radarr Binary if Current Ver. >= SPK Ver.
    . ${CONFIG_DIR}/KEEP_VAR
    if [ "$KEEP_CUR" == "yes" ]; then
        echo "Restoring Radarr version from before upgrade" >> ${INST_LOG}
        rm -fr ${SYNOPKG_PKGDEST}/share >> $INST_LOG 2>&1
        mv ${INST_VAR}/share ${SYNOPKG_PKGDEST}/ >> $INST_LOG 2>&1
        set_unix_permissions "${SYNOPKG_PKGDEST}/share"
    fi
    set_unix_permissions "${CONFIG_DIR}"

    # If backup was created before new-style packages
    # new updates/backups will fail due to permissions (see #3185)
    set_unix_permissions "/tmp/radarr_backup"
    set_unix_permissions "/tmp/radarr_update"

    # Remove upgrade Flag
    rm ${CONFIG_DIR}/KEEP_VAR
}
root@XXXXXX:/var/packages/radarr/scripts# dir /var/packages/radarr/target/var/.config/Radarr
total 1500
drwxr-xr-x 1 sc-radarr radarr    186 Dec 13 16:15 .
drwxr-xr-x 1 sc-radarr radarr     22 Sep 26 07:42 ..
drwxr-xr-x 1 sc-radarr radarr     42 Jun 26 10:02 Backups
-rw-r--r-- 1 sc-radarr radarr    459 Dec 13 16:09 config.xml
drwxr-xr-x 1 sc-radarr radarr    164 Dec  2 17:05 logs
-rw-r--r-- 1 sc-radarr radarr 397312 Dec 13 16:15 logs.db
drwxr-xr-x 1 sc-radarr radarr     58 Dec  5 08:11 MediaCover
-rw-r--r-- 1 sc-radarr radarr 716800 Dec 13 16:15 radarr.db
-rw-r--r-- 1 sc-radarr radarr  32768 Dec 13 16:26 radarr.db-shm
-rw-r--r-- 1 sc-radarr radarr 379072 Dec 13 16:26 radarr.db-wal
-rw-r--r-- 1 sc-radarr radarr      5 Dec 13 16:10 radarr.pid
drwxr-xr-x 1 sc-radarr radarr    120 Dec  2 16:55 UpdateLogs
root@XXXXXX:/var/packages/radarr/scripts# ps aux | grep Radarr
root     24950  0.0  0.0  23144  2396 pts/13   S+   16:35   0:00 grep --color=auto Radarr
root@XXXXXX:/var/packages/radarr/scripts# 

I've also restarted a few times and still can't get Radarr to run. I could try uninstalling and reinstalling, but I'd lose all my info and don't want to do that.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Dec 14, 2020

Hi @severdia, looking at your Radarr config folder above it seems that Radarr does think it's running. We see the PID file the DB files seem open for writing as well. My suggestion would be to restart your NAS with the Radarr service not set to startup (Control Panel > Info Center > Service). Once this is done the databases should be in a clean state for you to perform a manual backup. Copy this entire folder out to another location. You can even make a manual backup archive yourself (for v3, it's usually a folder named 'radarr_backup_v3' with just two files 'config.xml' and 'radarr.db'). That way you have a starting point to restore your configuration in the event a reinstall is required.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Dec 14, 2020

Given that my pull request (#4276) which resolves the service startup issue was merged into the master codebase I will be closing this issue.

@severdia
Copy link

@houndtt Thank you, however it appears I won't be able to update if I can't get it running (no, it's not active in the startup and it's not running on the assigned port). Is there an article somewhere describing how to do the backup/restore you mentioned? Looking around the server, I don't see any Radarr files.

@publicarray
Copy link
Member

publicarray commented Dec 14, 2020

Thanks @houndtt for your contribution, The updated package is now live but may take up to 48 hours to show up in the package center due to caching.

@mreid-tt
Copy link
Contributor Author

@severdia, as this issue is now closed, please open a new issue and I can assist you further there

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

No branches or pull requests

7 participants