Radarr v3.2 dotnet5 binary / Radarr v4 dotnet6 binary

FrankNAS

Contributor
Joined
Dec 3, 2017
Messages
111
please use `sysrc` to change variables setup in the rc file instead of editing it :(

as for why it fails to start try running it outside of the service `/usr/local/share/radarrv3/Radarr` (and preferably as the user you currently run radarr as)
the typical failure start is caused by incorrect permissions on the pid files as mentioned above so definitely check that too.
I have the daemon rip out both stdout and stderr so anything that is failing before the logging inside radarr occurs will not be seen.
 
Joined
Jan 27, 2020
Messages
577
please use `sysrc` to change variables setup in the rc file instead of editing it :(
Yes, of course. I did that.

Everything seems to have the right permissions.
1624620652609.png


1624620853724.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Everything seems to have the right permissions.
Except for the file that isn't there... radarr_daemon.pid

You might want to create it with touch /config/radarr_daemon.pid and make sure it's owned as expected.
 
Joined
Jan 27, 2020
Messages
577
Except for the file that isn't there... radarr_daemon.pid

You might want to create it with touch /config/radarr_daemon.pid and make sure it's owned as expected.
Nope.

1624622162491.png
 

FrankNAS

Contributor
Joined
Dec 3, 2017
Messages
111
the service and daemon both step on `stdout` and `stderr`

what does `/usr/local/share/radarrv3/Radarr` output?

are you 100% sure you have both `VNET=on` and `allow_mlock=1`?
from outside the jail the results should look like, where `radarr` is the name of the jail where radarr is installed to:
Code:
root@freenas:~ # iocage get vnet radarr
1
root@freenas:~ # iocage get allow_mlock radarr
1


inside the jail
Code:
root@radarr:~ # sysctl security.jail.vnet
security.jail.vnet: 1
root@radarr:~ # sysctl security.bsd.unprivileged_mlock
security.bsd.unprivileged_mlock: 1



A few final things, the dotnet variant does not work on anything outside of `AMD64` (aka x86_64 on Linuxes). If you are on ARM or PPC it will not work. The pkg SHOULD check for this but I am not completely sure. Finally try and force reinstall the txz that you downloaded.
 
Joined
Jan 27, 2020
Messages
577
what does `/usr/local/share/radarrv3/Radarr` output?
What do you want to know exactly? I can't just dump ls -l here, because it's exeeding the character limit here. owner of everything in there is radarr:radarr

are you 100% sure you have both `VNET=on` and `allow_mlock=1`?
Yes.

Code:
root@freenas[~]# iocage get vnet radarr
1


I want to point out that radarr work perfectly fine. It's just that the restart command triggers the error message related to the service.
But the service restarts itself after jail restart flawlessly, so I really don't know whats wrong - if anything. I can live with that warning.
service radarr restart does work perfectly.
 

FrankNAS

Contributor
Joined
Dec 3, 2017
Messages
111
I want to point out that radarr work perfectly fine. It's just that the restart command triggers the error message related to the service.
I missed that somewhere earlier on =>.<=
radarr itself will attempt to restart on updates and um...thats it(?)
The daemon will usually detect that the process has exited and restart it before radarr's updater can handle the restart. There is still a VERY small window on extremely slow or cpu cycle starved systems for a race condition.
The daemon will also handle radarr crashing but I have yet to see reports of failure triggering this.

What is your case for needing to manually issue `restart` via the service?


edit: I will say that `service` is run under root. daemon launches the process as whatever user/group you fed to it. This usually resolves itself but sometimes...not so much
 
Joined
Jan 27, 2020
Messages
577
What is your case for needing to manually issue `restart` via the service?
I don't need to, it just popped up when installing your txz and hasn't vanished since.

edit: I will say that `service` is run under root. daemon launches the process as whatever user/group you fed to it. This usually resolves itself but sometimes...not so much
Sounds like a reasonable explanation, but I expect that to be the same for the pkg installation and I wouldn't get this message there.
In the end it would be advised to start over in a new jail but I'm really to lazy to do that right now. :)
 

FrankNAS

Contributor
Joined
Dec 3, 2017
Messages
111
if you didn't use the txz to install radarr there might be something that needs updating in the service file
that being said, as long as radarr reports (System -> Status) that it is running under .NET (5.0.5+) then its close enough :)
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Thank you for this. I just used the instruction from the OP and on the Github to upgrade my Jail with Radarr v3.2 and it seems to be working well.
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
Uh oh Spaghetti-O!

Radarr seems to be running perfectly fine, but the Web Server is toast and I can't access it.

@FrankNAS Any idea what's going wrong? I followed the instructions to the letter.

Code:
root@radarr-dotNET:~ # /usr/local/share/radarrv3/Radarr
[Info] Bootstrap: Starting Radarr - /usr/local/share/radarrv3/Radarr - Version 3.2.2.5080
[Debug] freebsd-version: Starting freebsd-version
[Debug] freebsd-version: 12.2-RELEASE-p9

..... (Lots of non-relevant stuff here)

[Info] WebHostController: Listening on the following URLs:
[Info] WebHostController:   http://*:7878
[Info] RadarrBootstrapper: Starting Web Server
[Info] BrowserService: Starting default browser. http://localhost:7878
[Info] ProcessProvider: Opening URL [http://localhost:7878]
[Error] BrowserService: Couldn't open default browser to http://localhost:7878

[v3.2.2.5080] System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at NzbDrone.Common.Processes.ProcessProvider.OpenDefaultBrowser(String url) in D:\a\1\s\src\NzbDrone.Common\Processes\ProcessProvider.cs:line 109
   at Radarr.Host.BrowserService.LaunchWebUI() in D:\a\1\s\src\NzbDrone.Host\BrowserService.cs:line 37


[Info] ProfileService: Setting up default quality profiles
[Info] CommandExecutor: Starting 2 threads for tasks.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
[Error] BrowserService: Couldn't open default browser to http://localhost:7878
It seems you may need to look at your config.xml, which appears to have the option to <LaunchBrowser>True</LaunchBrowser> (absolutely not useful in a jail). Change it to False.

That may not be the entire problem, but it isn't helping.
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
It seems you may need to look at your config.xml, which appears to have the option to <LaunchBrowser>True</LaunchBrowser> (absolutely not useful in a jail). Change it to False.

Well that stopped it from throwing that error, but when I navigate to http://truenas:7878 I'm met with the standard browser "Unable to connect" message - as if the server isn't running at all.


Now I get:

Code:
root@radarr-dotNET:/ # /usr/local/share/radarrv3/Radarr
[Info] Bootstrap: Starting Radarr - /usr/local/share/radarrv3/Radarr - Version 3.2.2.5080
[Debug] freebsd-version: Starting freebsd-version
[Debug] freebsd-version: 12.2-RELEASE-p9
[Info] Router: Application mode: Interactive
[Info] MigrationController: *** Migrating data source=/root/.config/Radarr/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3***
[Info] MigrationController: *** Migrating data source=/root/.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://*:7878
[Info] RadarrBootstrapper: Starting Web Server
[Info] CommandExecutor: Starting 2 threads for tasks.
   (Cursor Blinking Here)
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
Why would you think you could connect to the jail using the TrueNAS IP address?


Because I can do that for the current "Plug-In" version of Radarr that I have running in another jail.
My network settings for the Jail are set to use NAT and VNET, so I just navigate to the TrueNAS IP with the correct port as a suffix and I hit the appropriate server.

It works for NZBget (http://truenas:6789), Sonarr (http://truenas:8989) and Radarr (http://truenas:7878).

Is that not correct for the dotNET version?
 

FrankNAS

Contributor
Joined
Dec 3, 2017
Messages
111
In my guide I did say:
If everything went according to plan then radarr should be up and running on the IP of the jail!
It is not a plugin jail but this is the best way I found to get dotNET products work on FreeBSD
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
In my guide I did say:
If everything went according to plan then radarr should be up and running on the IP of the jail!
It is not a plugin jail but this is the best way I found to get dotNET products work on FreeBSD


You also said:
9. Configure Basic Properties to your liking

So I did... haha

Right, so the Jail needs to be assigned an external IP.

I did do that initially, when I was encountering the Web Browser error, and still got nothing, presumable because of that error, but then switched it back to using NAT.

-----

Lo and behold, I now just gave the Jail it's own IP (told it to use DCHP Autoconfigure, instead of NAT) and it's working...

Thanks for the help everyone!

-----

Is using NAT to access the Jail on the server IP something to do with the way that the plugins are configured?
As in, it's not possible to set the radarr-dotNET jail to use NAT (with a static internal IP) then set the Web Server to appear on that internal static IP, which would then (in theory) be translated by the NAT to the external server IP?
 
Last edited:

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
@FrankNAS because the latest issues with specific indexers, I installed your latest package radarrv3-3.2.2.5080.txz. The service started and everything is okay including the previous broken indexer. However, the download clients are now broken, yet they work without issues in Sonarr. For simplicity, I have Sonarr, Radarr (your .txz file), Sanbzbd and Transmission installed into same jail, all running under same user:group. With Mono 6.8 I had no download client issues, only indexer issues.

Code:
iocage create -n media -r 12.2-RELEASE allow_mlock=on boot=on dhcp=on vnet=on bpf=yes


Inside jail, SABnzbd is functional, otherwise it would not work on Sonarr:
Code:
root@media:~ # curl -I http://localhost:8080/
HTTP/1.1 200 OK
Content-Type: text/html;charset=utf-8
Server: CherryPy/17.4.2
Date: Thu, 07 Oct 2021 20:48:57 GMT
X-Frame-Options: SameOrigin
Vary: Accept-Encoding
Content-Length: 564426


Error log, I get the same error with Transmission also. Any idea what would be the fix?
Code:
2021-10-07 16:30:06.6|Info|Bootstrap|Starting Radarr - /usr/local/share/radarrv3/Radarr - Version 3.2.2.5080
2021-10-07 16:30:07.4|Info|AppFolderInfo|Data directory is being overridden to [/usr/local/radarr]
2021-10-07 16:30:07.6|Info|Router|Application mode: Interactive
2021-10-07 16:30:07.7|Info|MigrationController|*** Migrating data source=/usr/local/radarr/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2021-10-07 16:30:08.3|Info|MigrationController|*** Migrating data source=/usr/local/radarr/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
2021-10-07 16:30:08.7|Info|WebHostController|Listening on the following URLs:
2021-10-07 16:30:08.7|Info|WebHostController|  http://*:7878
2021-10-07 16:30:09.2|Info|RadarrBootstrapper|Starting Web Server
2021-10-07 16:30:10.8|Info|CommandExecutor|Starting 2 threads for tasks.
2021-10-07 16:34:41.0|Warn|DownloadMonitoringService|Unable to retrieve queue and history items from SABnzbd

[v3.2.2.5080] NzbDrone.Core.Download.Clients.DownloadClientUnavailableException: Unable to connect to SABnzbd, Connection reset by peer (localhost:8080): 'http://localhost:8080/api?mode=queue&start=0&limit=0&apikey=(removed)&output=json'
---> System.Net.WebException: Connection reset by peer (localhost:8080): 'http://localhost:8080/api?mode=queue&start=0&limit=0&apikey=(removed)&output=json'
---> System.Net.WebException: Connection reset by peer (localhost:8080)
---> System.Net.Http.HttpRequestException: Connection reset by peer (localhost:8080)
---> System.Net.Sockets.SocketException (54): Connection reset by peer
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.GetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName)
   at System.Net.Sockets.Socket.get_NoDelay()
   at System.Net.Sockets.Socket.ReplaceHandle()
   at System.Net.Sockets.Socket.ReplaceHandleIfNecessaryAfterFailedConnect()
   at System.Net.Sockets.Socket.ValidateForMultiConnect(Boolean isMultiEndpoint)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
--- End of stack trace from previous location ---
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
   at System.Net.Sockets.Socket.Connect(String host, Int32 port)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Http.ConnectHelper.Connect(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.Connect(String host, Int32 port, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClientHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<>n__1(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.HttpWebRequest.SendRequest(Boolean async)
   at System.Net.HttpWebRequest.GetResponse()
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 81
   --- End of inner exception stack trace ---
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 107
   at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 124
   at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 57
   at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.ProcessRequest(HttpRequestBuilder requestBuilder, SabnzbdSettings settings) in D:\a\1\s\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:line 185
   --- End of inner exception stack trace ---
   at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.ProcessRequest(HttpRequestBuilder requestBuilder, SabnzbdSettings settings) in D:\a\1\s\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:line 198
   at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.GetQueue(Int32 start, Int32 limit, SabnzbdSettings settings) in D:\a\1\s\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:line 113
   at NzbDrone.Core.Download.Clients.Sabnzbd.Sabnzbd.GetQueue() in D:\a\1\s\src\NzbDrone.Core\Download\Clients\Sabnzbd\Sabnzbd.cs:line 57
   at NzbDrone.Core.Download.Clients.Sabnzbd.Sabnzbd.GetItems()+MoveNext() in D:\a\1\s\src\NzbDrone.Core\Download\Clients\Sabnzbd\Sabnzbd.cs:line 188
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at NzbDrone.Core.Download.TrackedDownloads.DownloadMonitoringService.ProcessClientDownloads(IDownloadClient downloadClient) in D:\a\1\s\src\NzbDrone.Core\Download\TrackedDownloads\DownloadMonitoringService.cs:line 89
 
Last edited:

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
After one hour of troubleshooting with @FrankNAS, we found the issue. For some reason .NET cannot resolve inside jail localhost to 127.0.0.1. Using the IP instead of hostname makes everything work. Thank you again for taking the time to with with me on this!

I would still want to have this fixed and work with default localhost value. See https://github.com/Thefrank/freebsd-port-sooners/issues/6
 
Last edited:
Top