Run multiple instances of subsonic plugin

Status
Not open for further replies.

Yosh

Cadet
Joined
Apr 6, 2014
Messages
5
Hello all! I've only been using FreeNAS a day so far but must start by saying how much I'm liking it!

I've come from a windows 2012 media server where I could have two subsonic instances running with modifications to registry and files; using ports 4040 and 4041 (I need this as I use one instance for music and a separate instance for videos).

I have installed my first instance on subsonic on freenas (via the plugins install page). This works fine and is set to port 4040 (pluginjail gives it x.x.x.2 IP). - All ok.

I then installed the subsonic plugin again, changed it to use port 4041 and jail IP is x.x.x.4. However, I am then unable to connect to the x.x.x.4 IP and it also starts causing various issues with the first subsonic plugin.
Once I uninstall the second instance the first will work fine again so I am assuming they're using the same set of files for both instance?

If anyone has managed to run 2 instances of subsonic please let me know how you managed it.

Many thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
This isn't a subsonic forum.

But, I'd think that you could easily do this by having 2 jails- one for each installation.
 

Yosh

Cadet
Joined
Apr 6, 2014
Messages
5
I'm aware it's not a subsonic forum. As stated in post I have 2 jails with 2 ip addresses. I've posted it here as the plugin file is sourced from freenas sources. I will raise it on subsonic forums if preffered.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Sorry, I guess I should elaborate... just woke up and haven't had coffee yet.

The 2 jails shouldn't be using the same files. If they share the same network port that could be a little weird. Some people have had problems with 2 jails on the same port. This should be trivially easy, so I'm a little confused.

But, your logic with doing 2 jails is definitely the way to go.

I don't use Subsonic, and I actually don't really know what Subsonic does. But, I have run 2 copies of a program at the same time on 2 jails and I think that's the logical approach to this problem.
 

Yosh

Cadet
Joined
Apr 6, 2014
Messages
5
Many thanks. Yea..... just having my first cup now so sorry for my blunt response. Thanks for your help.

As I now know it is possible to run multiple instance of a plugin successfully I will keep on playing with it. Maybe setting the first install to port 4041 before running a second install as the default port is 4040 so may be clashing on the install? (sorry.... thinking out loud...).

Thanks again for your help.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
There shouldn't be an issue. Jails are on isolated virtual FileSystems and don't share the same files. They also are assigned their own virtual IP and can never bind to each other's IPs.

Test
I just installed two instances of Subsonic and started them (left them both at 4040), and had no issues. I assume you need them both available externally on different IP's, just port forward 4040 to one of them and 4041 to the other.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok, I am getting an issue where I keep getting logged out if I have both Subsonic instances open in the same browser. This is because both instances are setting cookies to the same domain (I am accessing my FreeNAS instance remotely from a domain). Cookies are domain + path specific, and don't necessarily need to specify a path, and Subsonic's JSESSIONID cookie doesn't.

This is only an issue when using the same browser to access both instances at the same IP (but with different ports). I could solve this issue by setting a webroot of '/subsonic' to one of the instances; now the cookies aren't overwriting each other.

Was this the issue you were having? If so, it is not FreeNAS specific, and I'm not sure why you didn't experience it on Windows.
 

Yosh

Cadet
Joined
Apr 6, 2014
Messages
5
Thanks mate. This option did cross my mind early morning but thought my problem was with the jails; I've used freenas for just over a day but have now explored / researched how and where the jails are saved so apologies for my stupid assumption in my original post!

I'm running both on port 4040 sorted the problem. Still frustrated the port option causes an issue but that's not an issue with freenas. I'm also able to login to both at the same time although I am using 2 different logins.

Thanks again for testing this, much appreciated!
 

Yosh

Cadet
Joined
Apr 6, 2014
Messages
5
RESOLVED

Just an update; Since my last post I thought I'd try and change one of the 2 subsonic plugin ports. I changed one to 4041 and both work fine. So either way works. No idea why I had problems to start with, obviously something silly I did.

Thanks for the support.

Y.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Any suggestions on how to change the port from 4040 to 80? Or is there a good reason to leave it on 4040?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Status
Not open for further replies.
Top