Unable to add NZBs to NZBGet by running them

Get help, report and discuss bugs.
Post Reply
qwerty12
Posts: 5
Joined: 24 Nov 2018, 19:06

Unable to add NZBs to NZBGet by running them

Post by qwerty12 » 24 Nov 2018, 19:23

Hi,

I am on Windows 10 64-bit running NZBGet 21.0-testing-r2220 64-bit as a Windows service. When I double-click NZB files from an Explorer window or run them otherwise, they won't get added to NZBGet's download queue. The NZBGet instance/service is on the same computer that I am executing the NZB files on.

NZBGet's message window shows "WARNING: nzbget request received on port 6789 from 127.0.0.1, but username or password invalid".
This is where I get confused because while I have changed the default ControlPassword (but kept the same default ControlUsername of nzbget), AuthorizedIP is set to the default of 127.0.0.1 and when I access NZBGet from my browser running on the same PC, I am not asked for a password. RestrictedUsername, RestrictedPassword, AddUsername, AddPassword are all empty and FormAuth is off. SSL is not enabled, either.

In the mean time, I can manually add NZBs from the NZBGet web interface so it's not an urgent concern for me but the convenience of just double-clicking and forgetting was handy!

Is this a bug, or have I forgotten to switch on a setting somewhere? Thanks.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Unable to add NZBs to NZBGet by running them

Post by hugbug » 24 Nov 2018, 20:19

NZBGet's message window shows "WARNING: nzbget request received on port 6789 from 127.0.0.1, but username or password invalid".
Do you mean this message appears in webui on messages tab?

qwerty12
Posts: 5
Joined: 24 Nov 2018, 19:06

Re: Unable to add NZBs to NZBGet by running them

Post by qwerty12 » 24 Nov 2018, 20:21

Sorry, yes, that's where the message appears

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Unable to add NZBs to NZBGet by running them

Post by hugbug » 24 Nov 2018, 20:39

In nzbget program files directory there is file nzbget-command-shell.bat. Start it and a command prompt window should open. Then try different commands and in particular the command to add nzb-files - https://nzbget.net/command-line-referen ... and-append.

Does it work?

qwerty12
Posts: 5
Joined: 24 Nov 2018, 19:06

Re: Unable to add NZBs to NZBGet by running them

Post by qwerty12 » 24 Nov 2018, 20:49

Thanks for your reply.

No, I can't get it to work. Adding an NZB from a local file fails:

Code: Select all

C:\Users\me>nzbget -A "C:\Users\me\Downloads\nzbtestfile.nzb"
Request sent
No response or invalid response (timeout, not nzbget-server or wrong nzbget-server version)
At exactly the same the, the WebUI message screen says "WARNING: nzbget request received on port 6789 from 127.0.0.1, but username or password invalid" once again. Trying to add an NZB from a URL does the same thing.

--connect fails:

Code: Select all

C:\Users\me>nzbget -C

Unable to send request to nzbget-server at 127.0.0.1 (port 6789)

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Unable to add NZBs to NZBGet by running them

Post by hugbug » 25 Nov 2018, 21:54

I suspect there are more than one config file on the disk. Sometimes Windows creates copies in VirtualStore.

Please make a test: stop the service and start nzbget via double click in explorer. Then try the commands from command shell.

qwerty12
Posts: 5
Joined: 24 Nov 2018, 19:06

Re: Unable to add NZBs to NZBGet by running them

Post by qwerty12 » 26 Nov 2018, 19:15

Unfortunately, stopping the service and starting nzbget in the background with Explorer instead hasn't helped.

I still get

Code: Select all

C:\Users\me>nzbget -C

Unable to send request to nzbget-server at 127.0.0.1 (port 6789)


C:\Users\me>nzbget -A C:\Users\me\Desktop\A_Different_NZB_FIle.nzb
Request sent
No response or invalid response (timeout, not nzbget-server or wrong nzbget-server version)
and "nzbget request received on port 6789 from 127.0.0.1, but username or password invalid" in the WebUI.

Here's a screenshot showing that I did indeed start NZBGet from Explorer as they're both running in the same Windows session instead of NZBGet running in the services session: Image

According to VoidTools' everything, which scans the disk by reading the NTFS MFT directly AFAIK, there is only one copy of nzbget.conf on the drive, which is in C:\ProgramData\NZBGet.

For me, I don't know why NZBGet is saying the username or password is invalid when AuthorizedIP is set to 127.0.0.1 and, as per the WebUI message, NZBGet knows the incoming request is coming from 127.0.0.1. Thanks again for your time.

qwerty12
Posts: 5
Joined: 24 Nov 2018, 19:06

Re: Unable to add NZBs to NZBGet by running them

Post by qwerty12 » 04 Apr 2020, 22:49

Alright, I also ran into this when running NZBGet on my phone; however, I was in a position where I could at least actually build NZBGet myself and try and find out what was going on.

Answer: limit your ControlPassword to 31 characters.

For incoming RPC requests, NZBGet doesn't check AuthorizedIP. m_password in SNzbRequestBase has a size of 32 characters; NZBGet copies up to 31 characters and then, of course, null-terminates m_password in the request sent to the existing instance.

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests