l3uddz / plex_autoscan

Script to assist sonarr/radarr with plex imports. Will only scan the folder that has been imported, instead of the whole library section.
GNU General Public License v3.0
395 stars 70 forks source link

Cant run script "Unit entered failed state" #93

Closed trolhamonas closed 5 years ago

trolhamonas commented 5 years ago

Can someone help? new to this "Unit entered failed state" appears when I try to run the plex auto scan service I use a combination of rclone(upload) and plexdrive(stream) which are 2 separate mounts

{
    "DOCKER_NAME": "plex",
    "GOOGLE": {
        "ALLOWED": {
            "FILE_EXTENSIONS": true,
            "FILE_EXTENSIONS_LIST": [
                "webm",
                "mkv",
                "flv",
                "vob",
                "ogv",
                "ogg",
                "drc",
                "gif",
                "gifv",
                "mng",
                "avi",
                "mov",
                "qt",
                "wmv",
                "yuv",
                "rm",
                "rmvb",
                "asf",
                "amv",
                "mp4",
                "m4p",
                "m4v",
                "mpg",
                "mp2",
                "mpeg",
                "mpe",
                "mpv",
                "m2v",
                "m4v",
                "svi",
                "3gp",
                "3g2",
                "mxf",
                "roq",
                "nsv",
                "f4v",
                "f4p",
                "f4a",
                "f4b",
                "mp3",
                "flac",
                "ts"
            ],
            "FILE_PATHS": [
                "My Drive/Plex/Films/",
                "My Drive/Plex/Serie/",
                "My Drive/Plex/Anime/"
            ],
            "MIME_TYPES": true,
            "MIME_TYPES_LIST": [
                "video"
            ]
        },
        "CLIENT_ID": "*",
        "CLIENT_SECRET": "*",
        "ENABLED": true,
        "POLL_INTERVAL": 120,
        "SHOW_CACHE_LOGS": true,
        "TEAMDRIVE": false,
        "TEAMDRIVES": []
    },
    "PLEX_ANALYZE_DIRECTORY": true,
    "PLEX_ANALYZE_TYPE": "basic",
    "PLEX_CHECK_BEFORE_SCAN": false,
    "PLEX_DATABASE_PATH": "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db",
    "PLEX_EMPTY_TRASH": true,
    "PLEX_EMPTY_TRASH_CONTROL_FILES": [
        "/data/mnt/gdrive/mounted.bin"
    ],
    "PLEX_EMPTY_TRASH_MAX_FILES": 100,
    "PLEX_EMPTY_TRASH_ZERO_DELETED": false,
    "PLEX_LD_LIBRARY_PATH": "/usr/lib/plexmediaserver/lib",
    "PLEX_LOCAL_URL": "http://localhost:32400",
    "PLEX_SCANNER": "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner",
    "PLEX_SECTION_PATH_MAPPINGS": {
        "1": [
            "/data/mnt/plexdrive/Plex/Films/"
        ],
        "2": [
            "/data/mnt/plexdrive/Plex/Serie/"
        ],
        "3": [
            "/data/mnt/plexdrive/Plex/Anime/"
        ]
    },
    "PLEX_SUPPORT_DIR": "/var/lib/plexmediaserver/Library/Application\\ Support",
    "PLEX_TOKEN": "*",
    "PLEX_USER": "plex",
    "PLEX_WAIT_FOR_EXTERNAL_SCANNERS": true,
    "RCLONE_RC_CACHE_EXPIRE": {
        "ENABLED": false,
        "FILE_EXISTS_TO_REMOTE_MAPPINGS": {
            "/data/mnt/gdrive/": [
                "/data/mnt/gdrive/"
            ]
        },
        "RC_URL": "http://localhost:5572"
    },
    "RUN_COMMAND_AFTER_SCAN": "",
    "RUN_COMMAND_BEFORE_SCAN": "",
    "SERVER_ALLOW_MANUAL_SCAN": false,
    "SERVER_FILE_CHECK_DELAY": 60,
    "SERVER_FILE_EXIST_PATH_MAPPINGS": {
        "/data/mnt/gdrive": [
            "/data/mnt/gdrive"
        ]
    },
    "SERVER_IGNORE_LIST": [
        "/.grab/",
        ".DS_Store",
        "Thumbs.db"
    ],
    "SERVER_IP": "0.0.0.0",
    "SERVER_MAX_FILE_CHECKS": 10,
    "SERVER_PASS": "*",
    "SERVER_PATH_MAPPINGS": {
        "/data/mnt/plexdrive/Plex/": [
            "/data/mnt/gdrive/Plex/",
            "My Drive/Plex/"
        ]
    },
    "SERVER_PORT": 3467,
    "SERVER_SCAN_DELAY": 180,
    "SERVER_SCAN_FOLDER_ON_FILE_EXISTS_EXHAUSTION": false,
    "SERVER_SCAN_PRIORITIES": {
        "0": [
            "/Movies/"
        ],
        "1": [
            "/TV/"
        ],
        "2": [
            "/Music/"
        ]
    },
    "SERVER_USE_SQLITE": false,
    "USE_DOCKER": false,
    "USE_SUDO": true
}
desimaniac commented 5 years ago

Run the execstart= command (without the execstart= part) from the service file and see what the error says.

trolhamonas commented 5 years ago

Ok, it's running now for some reason but when a new show is added to my remote folder it's processed as an unwanted what does that mean? And the web server at 0.0.0.0:3467/(token) is given an unauthorized page I did check the token multiple times on the config file EDIT: I also just copied the link that it gives you when you start the script same thing EDIT2: I managed to get the URL working with sonarr and radarr but the show isn't trigging the scan

desimaniac commented 5 years ago

The url doesn’t load up a webpage unless you enable manual scan option in config.

Hit test in Sonarr/Radarr to see if request is going through.