Page 1 of 2
Multiple instances in Windows 7

Posted:
Tue Mar 20, 2012 7:22 am
by ramja
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?
Re: Multiple instances in Windows 7

Posted:
Tue Mar 20, 2012 8:32 am
by MadEvil
Hi,
Yes you can have more instances on one Server.
Use for this the standalone Installation ->
http://www.subsonic.org/pages/installat ... standaloneyou can configure the Startup Settings (Port adress,Home Diretory, Java Memory, ...) via Subsonic.bat
best regards
Re: Multiple instances in Windows 7

Posted:
Tue Mar 20, 2012 11:19 pm
by ramja
Thanks ME - that's exactly what I was looking for.

Re: Multiple instances in Windows 7

Posted:
Thu Aug 02, 2012 4:26 am
by willieb
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.
Re: Multiple instances in Windows 7

Posted:
Thu Aug 02, 2012 11:56 am
by bushman4
Basic rundown:
- 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.
- Stop the subsonic service.
- Rename C:\subsonic directory to c:\subsonic2 (for example)
- Open c:\program files\Subsonic2\subsonic-service.exe.vmoptions in a text editor and add the line "-Dsubsonic.home=c:/subsonic2" to the file.
- Using regedit, navigate to HKLM\SYSTEM\CurrentControlSet\Service. Find the KEY named "Subsonic" and rename it to "Subsonic2"
- Inside that key, find the entry called "DisplayName" and change it's VALUE to "Subsonic 2"
- Restart the computer
- 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.
- 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
Re: Multiple instances in Windows 7

Posted:
Thu Aug 02, 2012 2:36 pm
by willieb
Man, awesome instructions. Thanks so much. I will be trying this soon and will post results.
Re: Multiple instances in Windows 7

Posted:
Wed Aug 08, 2012 6:43 pm
by willieb
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.
Re: Multiple instances in Windows 7

Posted:
Thu Aug 09, 2012 11:54 am
by willieb
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.
Re: Multiple instances in Windows 7

Posted:
Thu Aug 09, 2012 11:56 am
by bushman4
Did you recently change versions of subsonic?
Glenn
Re: Multiple instances in Windows 7

Posted:
Thu Aug 09, 2012 12:37 pm
by willieb
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.
Re: Multiple instances in Windows 7

Posted:
Thu Aug 09, 2012 1:13 pm
by willieb
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.
Re: Multiple instances in Windows 7

Posted:
Thu Aug 09, 2012 1:21 pm
by bushman4
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
Re: Multiple instances in Windows 7

Posted:
Sat Dec 29, 2012 10:07 pm
by Nikonerik
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)
Re: Multiple instances in Windows 7

Posted:
Tue Jan 08, 2013 12:59 pm
by Nikonerik
bump . . .
any thoughts??
Anyone . . .
Beuller . . . .
Beuller . . . . . . . .
Beuller
Re: Multiple instances in Windows 7

Posted:
Tue Jan 08, 2013 1:36 pm
by hakko
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.