Jump to content

Remote Access Problem


zetetic
Go to solution Solved by zetetic,

Recommended Posts

zetetic

This would be useful functionality. For some reason every few days I can't connect to Emby from outside my network, but I can still connect to my Jriver server running on the same PC. Once I restart Emby it is fine again.

Link to comment
Share on other sites

Hi @zetetic let's try to get to the bottom of this. Can you please attach the emby server log from when this happens?

Thanks !

Link to comment
Share on other sites

  • Solution
zetetic

No problem. Looks like there is a lot of info in the logs I probably do not want on a public forum. There are a lot of port mapping errors which seem a likely problem.

These keep repeating in the logs. Is this enough data to know something?

2022-06-17 07:32:01.141 Error PortMapper: Error in GetSpecificMappingAsync
	*** Error Report ***
	Version: 4.7.2.0
	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-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-113-generic (buildd@lcy02-amd64-067) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #127-Ubuntu SMP Wed May 18 14:30:56 UTC 2
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: An error occurred while sending the request.
	 ---> System.IO.IOException: The response ended prematurely.
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   --- End of inner exception stack trace ---
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Mono.Nat.Upnp.UpnpNatDevice.GetSpecificMappingAsync(Protocol protocol, Int32 publicPort, CancellationToken cancellationToken)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	InnerException: System.IO.IOException: The response ended prematurely.
	Source: System.Net.Http
	TargetSite: Void MoveNext()
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	
2022-06-17 07:32:01.147 Error HttpClient: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>402</errorCode>
<errorDescription>Invalid Args</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

2022-06-17 07:32:01.148 Error PortMapper: Error in DeletePortMap
	*** Error Report ***
	Version: 4.7.2.0
	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-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-113-generic (buildd@lcy02-amd64-067) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #127-Ubuntu SMP Wed May 18 14:30:56 UTC 2
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	<s:Body>
	<s:Fault>
	<faultcode>s:Client</faultcode>
	<faultstring>UPnPError</faultstring>
	<detail>
	<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
	<errorCode>402</errorCode>
	<errorDescription>Invalid Args</errorDescription>
	</UPnPError>
	</detail>
	</s:Fault>
	</s:Body>
	</s:Envelope>
	
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Mono.Nat.Upnp.UpnpNatDevice.DeletePortMap(Mapping mapping, CancellationToken cancellationToken)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	
2022-06-17 07:32:01.208 Error PortMapper: Error creating port map
	*** Error Report ***
	Version: 4.7.2.0
	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-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-113-generic (buildd@lcy02-amd64-067) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #127-Ubuntu SMP Wed May 18 14:30:56 UTC 2
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: An error occurred while sending the request.
	 ---> System.IO.IOException: The response ended prematurely.
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   --- End of inner exception stack trace ---
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMapInternal(Mapping mapping, CancellationToken cancellationToken)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken)
	   at Emby.PortMapper.ExternalPortForwarding.CreateRules(INatDevice device, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	InnerException: System.IO.IOException: The response ended prematurely.
	Source: System.Net.Http
	TargetSite: Void MoveNext()
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

Coincidentally, the problem was occurring right now and I think I just solved it myself by manually adding the port mapping in my router.

I very much appreciate the time to consider this.

Link to comment
Share on other sites

  • 2 weeks later...
Quote

Coincidentally, the problem was occurring right now and I think I just solved it myself by manually adding the port mapping in my router.

HI @zetetic so are you all set now, or are you still having an issue with this?

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...