Jump to content

"Error creating port map" - system requires reboot every day or so


Go to solution Solved by seanbuff,

Recommended Posts

Martinspire
Posted

Hi all, merry christmas.

For a few weeks I've been having issues with Emby from external sources. I had hoped it would fix itself but apparently something is broken on my network in combination with Emby.

About every day or so I need to reboot Emby in order to access it from outside my LAN, I've tried reinstalling, I've tried assigning a different IP on the network. I've tried changing the Emby server ports and I've looked at settings I might've set that break it but I'm not sure whats happening.

What I do see is an error popping up every now and then:

2022-12-24 18:15:13.391 Error PortMapper: Error creating port map
*** Error Report ***
Version: 4.7.11.0
Command line: C:\Users\<user>\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows 10.0.22621
Framework: .NET 6.0.10
OS/Process: x64/x64
Runtime: C:/Users/<user>/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 4
Data path: C:\Users\<user>\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\<user>\AppData\Roaming\Emby-Server\system
System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd. (192.168.1.1:53179) - <This roughly translates to "can't connect because target computer has actively denied connection, but in Dutch">
---> System.Net.Sockets.SocketException (10061): Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, 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.Net.Sockets.SocketException: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd.
Source: System.Net.Sockets
TargetSite: Void ThrowException(System.Net.Sockets.SocketError, System.Threading.CancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)

Now the actively denying connection thing seems odd. I can't really find anything usefull with the 10061 error code and same goes for the Error Creating Port Map error. I've enabled UPNP on my LAN, have total control over its settings where the Emby server has a fixed IP (by the Asus router). There's no duplicate NAT or anything (my Xbox or Playstation work fine in that regard) and I can't see any other device using the IP or whatever. I've switched ports a couple of times to see if that would fix it but right now its still giving me the same error.

So is there anything else I can do to debug or even fix this?

Posted

Hello Martinspire,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:


Thank you.

Emby Team

  • Solution
seanbuff
Posted
37 minutes ago, Martinspire said:

So is there anything else I can do to debug or even fix this?

Hi, UPnP using PortMapper tends to be troublesome at times. I would recommend removing the PortMapper plugin from Emby, and setup port forwarding in your router instead.

Follow this guide from the 'Setup Port Forwarding' section: https://support.emby.media/support/solutions/articles/44002137137-remote-setup

Let us know where you get stuck.

  • Like 1
  • Agree 1
Posted

Hi, can you please attach the complete emby server log file? Thanks.

Martinspire
Posted
On 12/25/2022 at 1:32 AM, seanbuff said:

Hi, UPnP using PortMapper tends to be troublesome at times. I would recommend removing the PortMapper plugin from Emby, and setup port forwarding in your router instead.

Follow this guide from the 'Setup Port Forwarding' section: https://support.emby.media/support/solutions/articles/44002137137-remote-setup

Let us know where you get stuck.

Allright, gonna try this but its a shame things don't seem to work automatically anymore. Not sure whats blocking what. On my Asus Router there doesn't seem anything wrong and on my device I have BitDefender and Adguard running, but they don't seem to be in the way of connecting to emby (plus I've whitelisted everything I could think of)

Martinspire
Posted (edited)

Allright so set up port forwarding. I'm gonna reboot everything again but I don't see it working yet. I've got some screenshots to show the setup.

However externally doesn't seem to want to connect to the new situation

 

settings.png

access enabled.pnglocally works.png

forwarding.png

Also on canyouseeme.org it doesn't show as working:

Error: I could not see your service on 85.144.37.150 on port (8099)
Reason: Connection timed out

 

Edit:

Not sure what to do now. Both Port Forwarding or Triggering doesn't seem to work at all. Even switching ports again doesn't seem to fix it. Port mapper might not be a permanent solution, but at least that seemed to work some of the time.

Edit2: 

Meddling with some ports and enabled port mapping again has at least brought functionality back but I doubt it will stay online as it did before. Not sure why manual port mapping in the router didn't work but I tried a few things and made sure everything was enabled and set. But just couldn't get it to work externally. Which is weird

Edited by Martinspire
update
GrimReaper
Posted
3 hours ago, Martinspire said:

Not sure why manual port mapping in the router didn't work

Because you've mapped your ports wrong, according your screenshots: it should be http External 8099 -> Internal 8098.

You don't need https as you don't have SSL set-up on your server.

  • Agree 2
Martinspire
Posted
On 12/27/2022 at 12:23 PM, GrimReaper said:

Because you've mapped your ports wrong, according your screenshots: it should be http External 8099 -> Internal 8098.

You don't need https as you don't have SSL set-up on your server.

Thanks for spotting the mistake. It works now with manual port forwarding. I just hope that eventually the bug gets fixed so I can turn it automatically again. 

  • Thanks 1

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