Jump to content

Error access emby server with HAProxy with new Installation (The hostname could not be parsed)


kegham

Recommended Posts

Hello!

So, I'm having trouble to access my emby server via HAProxy on a fresh new installation, using the ip:port  I can access normally.

Here are the error logs:

2020-09-26 17:42:40.390 Info HttpServer: HTTP Response 500 to 192.200.10.1. Time: 1ms. null. ConnectionId: 0HM32BIK90DKR
2020-09-26 17:42:41.442 Error HttpServer: Error processing request
        *** Error Report ***
        Version: 4.5.0.50
        Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
        Operating system: Linux version 4.18.0-193.19.1.el8_2.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Mon Sep 14
        Framework: .NET Core 3.1.7
        OS/Process: x64/x64
        Runtime: opt/emby-server/system/System.Private.CoreLib.dll
        Processor count: 3
        Data path: /var/lib/emby
        Application path: /opt/emby-server/system
        System.UriFormatException: System.UriFormatException: Invalid URI: The hostname could not be parsed.
           at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
           at System.Uri..ctor(String uriString)
           at MediaBrowser.Model.Services.MyHttpUtility.RemoveQueryParamsFromUrl(ReadOnlySpan`1 url, String[] keys)
           at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
        Source: System.Private.Uri
        TargetSite: Void CreateThis(System.String, Boolean, System.UriKind)

 

This installation is on a virtual machine. I have the previous installation with Centos 7 backed up and it works just fine. But since I needed to make some adjustments I'm reinstalling on Centos 8.

 

Any ideas?

Link to comment
Share on other sites

HI, is it possible that you've configured the proxy in such a way that some of the request is being lost before it gets to emby server?

Link to comment
Share on other sites

I don't think so, the backed up VM works normally and in haproxy I get "Layer 7 wrong status: Internal Server error"

One thing I notice is that when I installed the server the post script got didn't created the folder /var/lib/emby so I had to manually create, I executed as root. 

Link to comment
Share on other sites

The reason I'm asking is because it's saying the request url is empty. I can definitely fix the error in the log but that doesn't mean it will solve your problem. In fact I don't it will.

Link to comment
Share on other sites

Thanks for confirming. Do you know exactly what that does? Ideally I'd like to be able to workaround it so that you don't have to do that.

Link to comment
Share on other sites

4 hours ago, Luke said:

Thanks for confirming. Do you know exactly what that does? Ideally I'd like to be able to workaround it so that you don't have to do that.

Sorry, I don't exactly know the differences between them. I'll check it out.

55 minutes ago, Luke said:

What url did you configure for the health check to use?

You mean the "Http check method"?

Usually I use GET or OPTIONS. For emby it was GET.

Link to comment
Share on other sites

Hello @Luke

I had another problem today when I was playing some files that needed transcoding on the emby plug-in for Kodi.

So for testing I restored the last virtual machine and tested, no problem. But I did't changed the HAProxy configuration.

So as the backup was on a older version of emby (4.4.30) I tried to downgrade my new installation and the problem disappeared. 

I'll attach the log if you wanna see what's happening.

Here is the lines that logged the crash:

2020-09-27 20:35:46.390 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 4.5.0.50
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
	Operating system: Linux version 4.18.0-193.19.1.el8_2.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Mon Sep 14
	Framework: .NET Core 3.1.7
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 3
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.FormatException: System.FormatException: Input string was not in a correct format.
	   at ServiceStack.Text.SignedInteger`1.ParseInt64(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\DefaultMemory.cs:line 896
	   at ServiceStack.Text.SignedInteger`1.ParseObject(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\DefaultMemory.cs:line 801
	   at ServiceStack.Text.SignedInteger`1.ParseNullableObject(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\DefaultMemory.cs:line 788
	   at ServiceStack.Text.Common.JsReader`1.<>c__DisplayClass4_0`1.<GetCoreParseStringSpanFn>b__3(ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\JsReader.cs:line 70
	   at ServiceStack.Text.Jsv.JsvReader.<>c__DisplayClass2_0.<GetParseFn>b__0(String v) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Jsv\JsvReader.Generic.cs:line 18
	   at Emby.Server.Implementations.Services.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs)
	   at Emby.Server.Implementations.Services.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance)
	   at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(IRequest httpReq, RestPath restPath, Dictionary`2 requestParams, Object requestDto)
	   at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(HttpListenerHost host, IRequest httpReq, RestPath restPath)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: ServiceStack.Text
	TargetSite: Int64 ParseInt64(System.ReadOnlySpan`1[System.Char])

 

Thanks!

embyserver.txt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...