Multiple instances in Windows 7

General discussions.

Moderator: moderators

Multiple instances in Windows 7

Postby ramja » Tue Mar 20, 2012 7:22 am

Running SS in Windows 7 64 successfully and enjoyably for many months. Can listen from my Droid both directly on LAN and Dyndnsing in through the cell phone system.

Basically trying to have different folders exposed for different users - can't find direct way to do it in the GUI - am i missing something there?

As an alternative, is it possible to run 2 instances with different users and different streamable folders? If so, how?

A related question - how does one change the port SS listens to?
ramja
 
Posts: 5
Joined: Tue Mar 20, 2012 1:01 am

Re: Multiple instances in Windows 7

Postby MadEvil » Tue Mar 20, 2012 8:32 am

Hi,

Yes you can have more instances on one Server.

Use for this the standalone Installation -> http://www.subsonic.org/pages/installat ... standalone

you can configure the Startup Settings (Port adress,Home Diretory, Java Memory, ...) via Subsonic.bat

best regards
Madsonic Developer
User avatar
MadEvil
 
Posts: 354
Joined: Wed Nov 09, 2011 8:35 pm
Location: Vienna

Re: Multiple instances in Windows 7

Postby ramja » Tue Mar 20, 2012 11:19 pm

Thanks ME - that's exactly what I was looking for. :mrgreen:
ramja
 
Posts: 5
Joined: Tue Mar 20, 2012 1:01 am

Re: Multiple instances in Windows 7

Postby willieb » Thu Aug 02, 2012 4:26 am

Can someone provide any details for running multiple instances on Windows using the standalone version?

I want to have 2 instances running to allow different users to access different content. Anyone? Thanks.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby bushman4 » Thu Aug 02, 2012 11:56 am

Basic rundown:
  1. Install subsonic in a standard installation. When asked where to install it to, make the path "C:\Program Files\Subsonic 2" for example. Get it configured correctly with the port settings that you want, memory, media shares, etc... This will become the "Second" installation.
  2. Stop the subsonic service.
  3. Rename C:\subsonic directory to c:\subsonic2 (for example)
  4. Open c:\program files\Subsonic2\subsonic-service.exe.vmoptions in a text editor and add the line "-Dsubsonic.home=c:/subsonic2" to the file.
  5. Using regedit, navigate to HKLM\SYSTEM\CurrentControlSet\Service. Find the KEY named "Subsonic" and rename it to "Subsonic2"
  6. Inside that key, find the entry called "DisplayName" and change it's VALUE to "Subsonic 2"
  7. Restart the computer
  8. Verify that Subsonic still works with the settings created before. Verify that, in the service control panel, that the service is listed as "Subsonic 2" is started.
  9. Run the Subsonic installation again, this time accepting all defaults. This will create c:\program files\Subsonic and c:\subsonic, plus a service called "Subsonic". This is the "first" instance now.

NB: Subsonic Agent, the tray icon, will no longer work at all. Changes will have to be made by editing the subsonic-service.exe.vmoptions files directly.

Hope this helps. As always, no guarantee. But it has worked for me in the past.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Multiple instances in Windows 7

Postby willieb » Thu Aug 02, 2012 2:36 pm

Man, awesome instructions. Thanks so much. I will be trying this soon and will post results.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby willieb » Wed Aug 08, 2012 6:43 pm

Thanks again for the directions. It worked great for a while but now I can only start 1 of the 2 services. I get this error in the logs when attempting to start the 2nd subsonic service. Again, it worked fine for several days then all of a sudden this. Any ideas? I've searched all files for 9412 in text hopefully looking for somewhere in a config files that it specifies 9412 to no avail. I didn't see this error before. I think the port is related to the control panel that runs in the task bar, but I don't use it at all. Thanks for any help that can be provided.

6937 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Looking for RMI registry at port '9412'
6984 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Could not detect RMI registry - creating new one
6984 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11121f6: defining beans [service,org.springframework.remoting.rmi.RmiServiceExporter#0]; root of factory hierarchy
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0' defined in class path resource [applicationContext-deployer.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 9412; nested exception is:
java.net.BindException: Address already in use: JVM_Bind

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at net.sourceforge.subsonic.booter.Main.<init>(Main.java:24)
at net.sourceforge.subsonic.booter.Main.main(Main.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
Caused by: java.rmi.server.ExportException: Port already in use: 9412; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:398)
at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:370)
at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:331)
at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:263)
at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 22 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
... 37 more
Shutting down database.
Done.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby willieb » Thu Aug 09, 2012 11:54 am

No ideas?

I guess I could run another virtual machine, maybe a light version of linux that won't require many resources. I'd much rather run 2 instances on one server but I'll run an additional linux server until hopefully there's some type of media control per user.

Regardless I love subsonic, thanks for all the hard work and time to all those involved.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby bushman4 » Thu Aug 09, 2012 11:56 am

Did you recently change versions of subsonic?

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Multiple instances in Windows 7

Postby willieb » Thu Aug 09, 2012 12:37 pm

Thanks for your reply.

No, I am running 4.7 beta 3. This is a fresh install on clean install of Windows XP Pro. They ran fine together for a while with no problems. I was changing some ports around in subsonic-service.exe.vmoptions then all of a sudden they both won't run at the same time. In the subsonic-service.exe.vmoptions file I have individual IPs. I put both subsonic-service.exe.vmoptions back as they were and that didn't help. I also tried defaulting back to listening to 0.0.0.0 (all IPs) on different ports. Nothing is working so far.

Using CurrPorts (Like TCPView) subsonic is showing listening on IP 0.0.0.0 port 9412 on the server; however on my desktop I just installed subsonic (to duplicate the fresh install on the server) and it's showing listening on 127.0.0.1 port 9412. Another difference also is that on my local desktop it shows subsonic-agent-elevated.exe as the process path and on my server it's showing subsonic-service.exe as the process path. I'm not sure what's changed or how I can change it back as it was so I can run both instances at the same time.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby willieb » Thu Aug 09, 2012 1:13 pm

I just figured it out. Weird as it seems, it was my antivirus. I use Kaspersky. Just for the heck of it I paused protection and started both services and they started!

Upon further investigation, the issue was caused by changing my Kaspersky firewall setting from low to high security. Thanks again for your help.
Last edited by willieb on Thu Aug 09, 2012 1:46 pm, edited 1 time in total.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Multiple instances in Windows 7

Postby bushman4 » Thu Aug 09, 2012 1:21 pm

Makes some sense... looks like Subsonic is using the Java Remote Registry object which runs on port 4192. It also looks like it checks to see if it can connect to a pre-existing instance of that service, and if not, tries to start it.

I bet Kaspersky blocked the attempt to see if it is already there, so Subsonic thoguht it needed to start up a copy, but when it tried, the first instance was already bound to the port.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Multiple instances in Windows 7

Postby Nikonerik » Sat Dec 29, 2012 10:07 pm

I completely uninstalled subsonic through the control panel, deleted files from c:\ and c:\program files (x86) and deleted the reg entry described above.

I know my non-default port is forwarded correctly . . .

When I make the changes in steps three and such I get an error in my browser saying that it cannot connect to the server . . .

More importantly my Subsonic service reports that it "cannot get the status"


(sigh)
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm

Re: Multiple instances in Windows 7

Postby Nikonerik » Tue Jan 08, 2013 12:59 pm

bump . . .

any thoughts??

Anyone . . .

Beuller . . . .


Beuller . . . . . . . .


Beuller
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm

Re: Multiple instances in Windows 7

Postby hakko » Tue Jan 08, 2013 1:36 pm

Have you tried the latest MusicCabinet version (0.7.18) which started exposing videos to iSub etc? I dunno if it works (I don't have an iPhone/iPad running IOS5) but I guess it's worth a try? since that's what you're trying to achieve if I'm not wrong.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Next

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests