Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to Emby after update from 1.7.0 to 1.8.1 #722

Closed
1 task done
mjtbrady opened this issue Apr 19, 2024 · 10 comments
Closed
1 task done

Can not connect to Emby after update from 1.7.0 to 1.8.1 #722

mjtbrady opened this issue Apr 19, 2024 · 10 comments

Comments

@mjtbrady
Copy link

Description

Running Jellyseerr and Emby on OpenMediaVault 7 with the OpenMediaVault Compose plugin.

Emby is in one compose file with host networking. Jellyseerr in another compose file with bridged networking. Both have been working well for some time and there have been several upgrades to both since the original install.

After updating Jellyseerr from 1.7.0 to 1.8.1 (1.8.0 does the same thing) today everything requiring a connection to Emby stopped working. Down grading to 1.7.0 with no other changes gets everything working again.

After much digging and going around in circles I found that changing "Settings -> Emby -> Internal URL" from a URL with the FQDN of the Emby server to a URL with the IP address of the Emby server gets everything working with 1.8.1.

I have included the log entries for a sync job failing on 1.8.1 with the FQDN still in place.

Version

1.8.1

Steps to Reproduce

  1. Upgrade to 1.8.1.
  2. Attempt to login with Emby user ID.

Screenshots

No response

Logs

2024-04-19T04:10:00.025Z [info][Jobs]: Starting scheduled job: Jellyfin Recently Added Scan
2024-04-19T04:10:00.025Z [info][Jellyfin Sync]: Jellyfin Sync Starting {"sessionId":"71d1726b-c18c-4bf3-8c95-02a5a70d1601"}
2024-04-19T04:10:00.028Z [info][Jellyfin Sync]: Beginning to process recently added for library: Concerts
2024-04-19T04:10:00.029Z [error][Jellyfin API]: Something went wrong while getting library content from the Jellyfin server: connect ECONNREFUSED ::1:8096
2024-04-19T04:10:00.030Z [error][Jellyfin Sync]: Sync interrupted {"errorMessage":"Invalid auth token"}

Platform

desktop

Device

Surface Pro

Operating System

Windows 11

Browser

Firefox

Additional Context

No response

Code of Conduct

  • I agree to follow Jellyseerr's Code of Conduct
@Fallenbagel
Copy link
Owner

Can you hop onto discord. This looks like a config issue.

@M0NsTeRRR
Copy link

Hello @mjtbrady it appears that the FQDN you are using resolve to ::1 it's the loopback address like 127.0.0.1. Can you tell me which FQDN you put in your configuration ?

@M0NsTeRRR
Copy link

M0NsTeRRR commented Apr 19, 2024

Okay, I've looked into the issue, and it seems that Node 17 (from changelog) prefer IPv6 over IPv4 for DNS resolution. This behavior has changed since the latest version of Jellyseer, which was using version 16. Currently, we're using Node.js 18.

To force IPv4 resolution, you can add an environment variable to the Jellyseer container: NODE_OPTIONS='--dns-result-order=ipv4first'

You could also fix your ipv6 setup to avoid this workaround (would be better).

@mjtbrady
Copy link
Author

@M0NsTeRRR thanks for looking at this.

The change with Node's behavior looks like it is the trigger for what I am seeing, but the underlying cause is that the FQDN for Emby absolutely should not be resolving to ::1. I will look into that.

@mjtbrady
Copy link
Author

Found it almost immediately.

The problem is that on the openmediavault host that is running Jellyseerr and Emby, there is an entry in the /etc/hosts file for ::1 with the FQDN. There shouldn't be. On openmediavault the /etc/hosts file is generated, so I believe that the root cause of this problem lies with openmediavault.

@M0NsTeRRR
Copy link

Your welcome, I got exactly the same issue regarding IPv6 so i've looked into it :)
Glad you found your DNS resolution issue :)

@j-seixas
Copy link

j-seixas commented May 9, 2024

@mjtbrady did you remove the ipv6 entry in OMV /etc/hosts? Or how did you resolve this?
I dont seem to be able to make it work with the NODE_OPTIONS='--dns-result-order=ipv4first'. Do I add it as an env in the docker compose file?

@mjtbrady
Copy link
Author

mjtbrady commented May 9, 2024

The problem is that when IPv6 is set to auto in the OMV GUI, an incorrect hosts file is generated. You will see in the hosts file that the OMV FQDN and hostname resolves to ::1. Which is very wrong and is what is causing the error.

I did not try setting NODE_OPTIONS. I have configured IPv6 statically in the OMV GUI. This results in a correctly generated host file. You could try setting IPv6 to "none" and see if that generates a correct file if you don't have/want IPv6.

@j-seixas
Copy link

Hmm, but from day 1 I've ipv6 disabled in my network interfaces, so it's not fixed by changing that. I will probably open a ticket in omv foruns to check this

@votdev
Copy link

votdev commented May 11, 2024

Found it almost immediately.

The problem is that on the openmediavault host that is running Jellyseerr and Emby, there is an entry in the /etc/hosts file for ::1 with the FQDN. There shouldn't be. On openmediavault the /etc/hosts file is generated, so I believe that the root cause of this problem lies with openmediavault.

Hostname and FQDN are added with reason for IPv6 localhost (::1) to fix a SaltStack name resolution behaviour which otherwise causes the deployment of SaltStack states to take minutes instead of seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants