Want to run the Database on another Server.

Artist radio, genre radio & related artists. A Subsonic server for music nerds.

Moderator: moderators

Want to run the Database on another Server.

Postby Eluminare » Wed Feb 20, 2013 9:14 pm

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
Eluminare
 
Posts: 12
Joined: Wed Feb 20, 2013 9:09 pm

Re: Want to run the Database on another Server.

Postby hakko » Wed Feb 20, 2013 9:30 pm

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).
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Want to run the Database on another Server.

Postby hakko » Wed Feb 20, 2013 9:38 pm

(note: I haven't tried this myself, but it "should" work)
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Want to run the Database on another Server.

Postby Eluminare » Wed Feb 20, 2013 10:53 pm

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.
Eluminare
 
Posts: 12
Joined: Wed Feb 20, 2013 9:09 pm


Return to MusicCabinet

Who is online

Users browsing this forum: No registered users and 12 guests