Page 1 of 1

Want to run the Database on another Server.

PostPosted: Wed Feb 20, 2013 9:14 pm
by Eluminare
Hello,

i want to run the Postgresql Database on another Server than MusicCabinet. But when I try to configure it, MusicCabinet says, that the Database has to be reachable under localhost.

How can I override / change this?

I am running Musiccabinet on a CentOS VM with Tomcat installed.

Best Regards
Eluminare

Re: Want to run the Database on another Server.

PostPosted: Wed Feb 20, 2013 9:30 pm
by hakko
The default URLs that MusicCabinet uses when connecting to the PostgreSQL database are:

Code: Select all
musiccabinet.jdbc.url=jdbc:postgresql://localhost:5432/musiccabinet
musiccabinet.jdbc.initialurl=jdbc:postgresql://localhost:5432/template1


These can be overridden by using system properties. In the start script for your Subsonic/MusicCabinet server, try adding the following properties:

Code: Select all
-Dmusiccabinet.jdbc.url=jdbc:postgresql://localhost:2345/musiccabinet
-Dmusiccabinet.jdbc.initialurl=jdbc:postgresql://localhost:2345/template1


.. to have the port changed to 2345. So in your case, replace localhost with a server of your choice and make sure to configure PostgreSQL to accept incoming connections from the server running MusicCabinet (by default, only connections from localhost are allowed).

Re: Want to run the Database on another Server.

PostPosted: Wed Feb 20, 2013 9:38 pm
by hakko
(note: I haven't tried this myself, but it "should" work)

Re: Want to run the Database on another Server.

PostPosted: Wed Feb 20, 2013 10:53 pm
by Eluminare
Hello hakko,
thank you for your support and this really great and fast answer.

But i have one stupid question, where does I find the start script und what is it named like?

I am running MusicCabinet 0.7.22 on CentOS 6.3 with Tomcat7

Best Regards
Eluminare

___________________________________

I have solved the problem by changing a few lines in the applicationContext-service.xml.