Jump to content

Emby Connect - 2 servers on 1 machine - Weird Issue


MRobi

Recommended Posts

Having the oddest issue with Emby Connect. Running 2 servers on my FreeNAS machine. 1 being 3.5.3 stable and 1 being 3.6.0.56 beta. I just setup the beta server on Sunday before leaving on a work trip.

 

Stable is at internal ip 192.168.2.100:8096 named Emby-Server

Beta is at ip 192.168.2.133:8097 named Emby-Server-Beta

 

I use 2 different ports so I can setup port forwarding through my router to the correct internal ip address.

 

If I go into Emby-Server (Stable) and connect my Emby Connect username to the user, I receive a confirmation e-mail for Emby-Server-Beta which points my Emby Connect to the Beta server.

 

If I go into Emby-Server-Beta and do the same, the confirmation e-mail I receive is for Emby-Server (Stable).

 

So whichever server I log in to and enter my Emby Connect account, it sends me confirmation for the OPPOSITE server. I would also think I should be able to have both servers linked to my Emby Connect account, but when it adds 1 it is removing the other. Lastly, neither are logging me in when I click on the server through Emby Connect, I have to manually enter my external IP and choose the port to be able to log into the server.

 

Everything worked great until I added the 2nd server on the same machine. Could it be because both servers are sharing the same external IP?

 

I don't have server logs at the moment as I'm sitting in an airport and unable to access them, but I'll get them up when I get home.

Link to comment
Share on other sites

Attached both server logs. I had to compress them because they were both tipping on 250mb.

 

Just did the same process on both.

 

Went into Users, into my profile, removed Emby Connect username and saved. Received notification showing it was removed.

Backed out, went back in, added my Emby Connect username and saved. Received notification about the e-mail being sent.

 

Checked e-mail, was notification for the opposite server.

Went back and repeated the steps on the other server and same result.

Only 1 is connected to my Emby Connect account.

Logs attached.

beta-log.zip

Log.zip

Link to comment
Share on other sites

How, exactly did you install these?

 

Did you, perhaps, pick up and move some of the files from your stable one to your beta one?

 

It sounds like both servers have the same ID and they are just overwriting each other in Connect.

Link to comment
Share on other sites

How, exactly did you install these?

 

Did you, perhaps, pick up and move some of the files from your stable one to your beta one?

 

It sounds like both servers have the same ID and they are just overwriting each other in Connect.

I do use a config folder stored outside of the jails that I mount in after the jail is setup. That way I can destroy a jail, re-install and load the configs and be up and running again in minutes.

 

In this situation, the config folder for the stable server was duplicated and loaded into the beta server. From there I went in and renamed the server, changed a few settings like the port and away I went.

 

So what you're saying is possible. Is there an option to generate a new server ID or a way to set one manually?

 

Sent from my ONEPLUS A5000 using Tapatalk

Link to comment
Share on other sites

Ok so because of this, Emby Connect will think they're the same server.

Is there a way to generate a new server id? Even if it's manually editing a config file somewhere.

Link to comment
Share on other sites

Try shutting down one of the servers and deleting the file "device.txt" from your data folder.  Then re-start the server.

Link to comment
Share on other sites

Try shutting down one of the servers and deleting the file "device.txt" from your data folder.  Then re-start the server.

Shut down 1, deleted device.txt, restarted and no change.

 

Shut down both, deleted device.txt from both, restarted and now both send a confirmation link for the stable server only.

 

The ID's are different now.

Stable starts with aa1a

Beta starts with 38ea

Link to comment
Share on other sites

Well, I'm not sure.  There could be other configuration items that you ended up sharing between the two as well.

 

Basically, that type of cloning and then simultaneous operation isn't something we've anticipated or tested.

Link to comment
Share on other sites

Well, I'm not sure.  There could be other configuration items that you ended up sharing between the two as well.

 

Basically, that type of cloning and then simultaneous operation isn't something we've anticipated or tested.

The cloning is likely FreeBSD/FreeNAS specific as it's a common practice for many to keep the configuration items mounted outside the jails and then link them in. It allows for the ability to quickly rebuild jails without having to start configurations from scratch every time. It also allows the ability to create snapshots of the jail settings in case of a whole system failure.

 

While in there, I noticed a file called connect.txt as well. I was short on time so I didn't open them or compare. Could deleting this and restarting have any effect? Or I guess a better question could deleting it and restarting have any negative effect?

 

Ultimately I don't need access to both servers remotely. I was simply doing it for the purpose of beta testing. I don't envision many who would be looking to run both a stable and beta server at the same time on the same system and absolutely need access to both through emby connect.

Link to comment
Share on other sites

  • 3 weeks later...

Took a bit of time today to see if I could figure this one out, and I found what was causing this.

 

I deleted both device.txt and connect.txt on both servers and still could only connect 1 server to emby connect. I got looking for other files and noticed that /config/users both had a folder with the exact same user id. I figured if a duplicate server id could cause connect to confuse the 2 servers than have a duplicate user id might cause the same issue. 

 

So on my beta server I created a new user which created a new folder in this directory with a unique ID. Then I deleted the original user account. I sent the connection request from the new user to connect and received the proper confirmation e-mail. 

 

I'm now able to connect to both servers using emby connect.

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