nzblnk/nzb-monkey

NZB-Monkey failing to push to latest SABnzbd

shaddowlink opened this issue · 7 comments

The update of SABnzbd to v3+ (from v2.x.x) included a change to the API that is not yet adressed by NZB-Monkey.

Trying to push a NZB file only results in "Failed" message. Not even listing the categories anymore.

it's still working for me, running 3.0.2
Do you have any more information on the changes made to the api and on which system you're running it?

Sabnzdb is running on a Ubuntu 18.04 Sever. My SABnzbd is version 3.0.2 and its using python 3.8.5.
Nzb Monkey I use with a windows machine. A roll back to a previous version of sab (2.x.x) fixes my problem. No settings were changed and everything was checked twice after the upgrade (my auth aswell as the connection and the api key are correct).

here is what I get with "debug = true" in the settings

 - Pushing to SABNZBD ...FAILED
   Response-Text: "<html lang="de">
<head>
    <title>SABnzbd - Anmelden</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1" />
    <meta name="apple-mobile-web-app-title" content="SABnzbd" />

    <link rel="apple-touch-icon" sizes="76x76" href="../staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
    <link rel="apple-touch-icon" sizes="120x120" href="../staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
    <link rel="apple-touch-icon" sizes="152x152" href="../staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
    <link rel="apple-touch-icon" sizes="180x180" href="../staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
    <link rel="apple-touch-icon" sizes="192x192" href="../staticcfg/ico/android-192x192.png" />
    <link rel="shortcut icon" href="../staticcfg/ico/favicon.ico?v=3.0.2" />

    <link rel="stylesheet" type="text/css" href="../staticcfg/bootstrap/css/bootstrap.min.css?v=3.0.2" />
    <link rel="stylesheet" type="text/css" href="../staticcfg/css/login.css?v=3.0.2" />

    <script type="text/javascript" src="../staticcfg/js/jquery-3.5.1.min.js?v=3.0.2"></script>
    <script type="text/javascript" src="../staticcfg/bootstrap/js/bootstrap.min.js?v=3.0.2"></script>
</head>
<html>
    <body>
        <div class="account-wall">
            <div class="text-center logo-header">
                <svg viewBox="0 0 2175 606" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M630.988 320.63V188.324h99.863v-35.62l110.2 101.773-110.2 101.773v-35.62h-99.86z" fill="none" stroke-width="16.62" stroke="#000" transform="matrix(0 2.665 -2.7482 0 1002.24 -1658.936)"/><path d="M121.09 22.648h363.603v266.145h97.89L302.893 582.47 23.2 288.794h97.89V22.648z" fill="#FFB300"/><path d="M302.893 582.47L121.503 22.647h362.78l-181.39 559.82z" fill="#FFCA28"/><path d="M223.63 123.757h1862.4v287.2H223.63z"/><path d="M165.902 268.765h202.5v99.277H165.9z"/><path d="M430.133 388.4H188.357v-50.88h143.46v-45.142h-143.46V146.24h241.776v50.5h-143.46v45.14h143.46V388.4zm143.46-50.88h45.14v-45.142h-45.14v45.142zm143.46 50.88h-241.78V241.88h143.46v-45.14h-143.46v-50.5H717.05V388.4zm143.457-50.88h45.14V196.74h-45.14v140.78zm-98.318 50.88V50.602h98.318v95.64h143.458V388.4H762.192zm385.235 0h-98.317V146.24h241.776V388.4h-98.317V196.74h-45.148V388.4zm430.377 0h-241.776v-50.88h47.82V289.7h47.82v-47.82h47.82v-45.14h-143.46v-50.5h241.776v98.318h-47.82v47.82h-47.82v45.142h95.64v50.88zm143.46-50.88h45.14V196.74h-45.14v140.78zm-98.318 50.88V50.602h98.317v95.64h143.46V388.4h-241.777zm385.234-50.88h45.142V196.74h-45.14v140.78zm-98.317 50.88V146.24h143.46V50.603h98.316V388.4h-241.78z" fill="none" stroke-width="45.001" stroke-linecap="round" stroke="#000"/><path d="M430.133 388.4H188.357v-50.88h143.46v-45.142h-143.46V146.24h241.776v50.5h-143.46v45.14h143.46V388.4zm143.46-50.88h45.14v-45.142h-45.14v45.142zm143.46 50.88h-241.78V241.88h143.46v-45.14h-143.46v-50.5H717.05V388.4zm143.457-50.88h45.14V196.74h-45.14v140.78zm-98.318 50.88V50.602h98.318v95.64h143.458V388.4H762.192zm385.235 0h-98.317V146.24h241.776V388.4h-98.317V196.74h-45.148V388.4zm430.377 0h-241.776v-50.88h47.82V289.7h47.82v-47.82h47.82v-45.14h-143.46v-50.5h241.776v98.318h-47.82v47.82h-47.82v45.142h95.64v50.88zm143.46-50.88h45.14V196.74h-45.14v140.78zm-98.318 50.88V50.602h98.317v95.64h143.46V388.4h-241.777zm385.234-50.88h45.142V196.74h-45.14v140.78zm-98.317 50.88V146.24h143.46V50.603h98.316V388.4h-241.78z" fill="#fff" fill-rule="nonzero"/></svg>
                <a href="https://sabnzbd.org/wiki/faq#why-login" target="_blank">
                    <span class="glyphicon glyphicon-question-sign"></span>
                </a>
            </div>
            <form class="form-signin" action="./" method="post">
                

                <input type="text" class="form-control" name="username" placeholder="Benutzername" required autofocus>
                <input type="password" class="form-control" name="password" placeholder="Passwort" required>

                <button class="btn btn-default"><span class="glyphicon glyphicon-circle-arrow-right"></span> Anmelden </button>

                <div class="checkbox text-center" data-toggle="tooltip" data-placement="bottom" title="Falls sich deine IP Adresse ändert oder SABnzbd neu startet, wird deine Session ungültig">
                    <label>
                        <input type="checkbox" name="remember_me" value="1"> Automatische Anmeldung
                    </label>
                  </div>
            </form>
        </div>
        <script type="text/javascript">
            // Tooltip
            $('[data-toggle="tooltip"]').tooltip()
            // Try-catch in case somebody disabled localstorage
            try {
                // Set what was done previously
                $('input[type="checkbox"]').prop('checked', localStorage.getItem("remember_me") === 'true')
                // Store if we change something
                $('input[type="checkbox"]').on('change', function() {
                    localStorage.setItem("remember_me", $(this).is(':checked'));
                })
            } catch(err) { }
        </script>
    </body>
 </html>"
 - Saving NZB-file ... OK
 - Done
Close window in 5 second(s)

btw. NZBdonkey works for me with the exact same config ( both worked before with SAB 2.x.x) and the developer of NZBDonkey mentions a change in SAB 3.0 API in his latest changelog (0.7.4)

I tried a few things but can't reproduce your error.
I tried running NZBMonkey on Windows and Linux Machines and added nzb files to a local sabnzbd instance as well as a instance running on another machine in my lan.

I always just added the nzbkey to my config and set the target to sabnzbd.

Could you post your config (without the key of course) and environment (which php version is running on your windows machine, are you using the prebuilt binary?)

Does NZBMonkey work when you run it on your Ubuntu machine? And is this machine inside your LAN or is it a remote machine?

The only mention of a change in NZBDonkey i could find is: https://forums.sabnzbd.org/viewtopic.php?f=2&t=24887
And there the change was only necessary for the connection check, not the nzb push itself.

I do have the same error as @shaddowlink

It is a remote machine in my case.

So, i debugged it and in my case, the problem is with an empty basepath. My SABnzbd has its own subdomain and an empty basepath. In the nzbmonkey script, right here:

req_url = '{0}://{1}:{2}/{3}/api'.format(scheme, host, port, basepath)

There will be an extraneous slash in the domain, e.g. https://sabnzbd.example.com:443//api which does not work correctly when the file should be uploaded. Possibly, older SABnzbd versions handled this wrong path more carefully and that's why it does not work anymore but it worked in older versions.

So, i debugged it and in my case, the problem is with an empty basepath. My SABnzbd has its own subdomain and an empty basepath. In the nzbmonkey script, right here:

req_url = '{0}://{1}:{2}/{3}/api'.format(scheme, host, port, basepath)

There will be an extraneous slash in the domain, e.g. https://sabnzbd.example.com:443//api which does not work correctly when the file should be uploaded. Possibly, older SABnzbd versions handled this wrong path more carefully and that's why it does not work anymore but it worked in older versions.

Is this implemented? I also can't push anything to my sabnzbd instance with it's own basepath

Please have a look at this alternative: NZB Monkey Go