Hello,

Indeed, the opensipsdbctl always assumes the DB backends are running on the default ports. If you can send the patch to us via Sourceforge, we would be happy to apply it.

Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com


On 04/10/2012 11:55 PM, Mariana Arduini wrote:
Hello all,

I was trying to run "opensipsdbctl create" on machine 192.168.16.40 with the following entries in file opensipsctlrc:

DBENGINE=PGSQL
DBHOST=192.168.16.51
DBNAME=opensips
DBRWUSER=opensips
DBRWPW=\"opensips\"
.
.
.

The postgres server in host 192.168.16.51 is running on port 6001 instead of 5432 (default port). Here is the output:

# opensipsdbctl create

INFO: creating database opensips ...

psql: could not connect to server: Connection refused

Is the server running on host "192.168.16.51" and accepting

                TCP/IP connections on port 5432?


I checked the command used to connect to the postgres server when running "opensipsdbctl create" and this is what I found in file opensipsdbctl.pgsql:


CMD="psql -q -h $DBHOST -U $DBROOTUSER "

DUMP_CMD="pg_dump -h $DBHOST -U $DBROOTUSER -c"


There is no "-p" option there. I've changed the files to include the port as following:


* opensipsctlrc:


DBENGINE=PGSQL
DBHOST=192.168.16.51
*DBPORT=6001*
DBNAME=opensips
DBRWUSER=opensips
DBRWPW=\"opensips\"
.
.
.

* script opensipsdbctl.pgsql

**

CMD="psql -q -h $DBHOST *-p $DBPORT* -U $DBROOTUSER"

DUMP_CMD="pg_dump -h $DBHOST *-p $DBPORT* -U $DBROOTUSER -c"


After few simple tests, it went fine. I'm concerned about any side effects those changes could cause or if there is any other file that needs to be changed the same way.


Is there any main reason why that "-p" option is missing? Is it mandatory to have the opensips database running on the default port or is this something we can change in order to remove that limitation?


Thanks a lot in advance!


Mariana.


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to