<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello,<br>
    <br>
    Indeed, the opensipsdbctl always assumes the DB backends are running
    on the default ports.<br>
    If you can send the patch to us via Sourceforge, we would be happy
    to apply it.<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
    <br>
    On 04/10/2012 11:55 PM, Mariana Arduini wrote:
    <blockquote
cite="mid:CABHUZgCSGVFFxOgbuDEnqP5+s0+Vd1jdPqhSCWNoST3gsop6Bw@mail.gmail.com"
      type="cite">Hello all,
      <div><br>
      </div>
      <div>I was trying to run "opensipsdbctl create" on machine
        192.168.16.40 with the following entries in file&nbsp;opensipsctlrc:</div>
      <div><br>
      </div>
      <div>
        <div>DBENGINE=PGSQL</div>
        <div>DBHOST=192.168.16.51</div>
        <div>DBNAME=opensips</div>
        <div>DBRWUSER=opensips</div>
        <div>DBRWPW=\"opensips\"</div>
      </div>
      <div>.</div>
      <div>.</div>
      <div>.</div>
      <div><br>
      </div>
      <div>The postgres server in host 192.168.16.51 is running on port
        6001 instead of 5432 (default port). Here is the output:</div>
      <div><br>
      </div>
      <div># opensipsdbctl create</div>
      <div>
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;">
          <span lang="EN-US">INFO: creating database opensips ...</span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;"><span
            lang="EN-US">psql: could not connect to server: Connection
            refused</span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;"><span
            lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is the server running on host
            "192.168.16.51" and accepting</span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;"><span
            lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCP/IP connections on port
            5432?</span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;"><span
            lang="EN-US"><br>
          </span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;">
          <span lang="EN-US">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:</span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;">
          <span lang="EN-US"><br>
          </span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><span
            style="font-size: 15px;" lang="EN-US"></span></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif">CMD="psql
            -q -h $DBHOST -U $DBROOTUSER "</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif">DUMP_CMD="pg_dump
            -h $DBHOST -U $DBROOTUSER -c"</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif"><br>
          </font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" face="Calibri, sans-serif">There
            is no "-p" option there. &nbsp;I've changed the files<span
              class="Apple-style-span" style="font-family: arial;
              font-size: small;">&nbsp;to include the port as following:</span></font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif"><span
              class="Apple-style-span" style="font-family: arial;
              font-size: small;"><br>
            </span></font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif"><span
              class="Apple-style-span" style="font-family: arial;
              font-size: small;">
              <meta http-equiv="content-type" content="text/html;
                charset=ISO-8859-1">
              * opensipsctlrc:</span></font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif"><span
              class="Apple-style-span" style="font-family: arial;
              font-size: small;"><br>
            </span></font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" face="Calibri, sans-serif"><span
              class="Apple-style-span" style="font-family: arial;
              font-size: small;">
              <meta http-equiv="content-type" content="text/html;
                charset=ISO-8859-1">
            </span></font></p>
        <div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif">DBENGINE=PGSQL</font></div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif">DBHOST=192.168.16.51</font></div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif"><b>DBPORT=6001</b></font></div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif">DBNAME=opensips</font></div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif">DBRWUSER=opensips</font></div>
          <div><font class="Apple-style-span" face="Calibri, sans-serif">DBRWPW=\"opensips\"</font></div>
        </div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif">.</font></div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif">.</font></div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif">.</font></div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif"><br>
          </font></div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif">*&nbsp;<span
              class="Apple-style-span" style="font-family:
              Calibri,sans-serif; font-size: 15px;">script&nbsp;opensipsdbctl.pgsql</span></font></div>
        <div><font class="Apple-style-span" face="Calibri, sans-serif"><span
              class="Apple-style-span" style="font-family:
              Calibri,sans-serif; font-size: 15px;"><br>
            </span></font></div>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;
          font-size: 11pt; font-family: Calibri,sans-serif;">
          <font class="Apple-style-span" color="#e46c0a"><b>
              <meta http-equiv="content-type" content="text/html;
                charset=ISO-8859-1">
              <span class="Apple-style-span" style="color: rgb(0, 0, 0);
                font-weight: normal;"></span></b></font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" style="background-color:
            rgb(255, 255, 255);">CMD="psql -q -h $DBHOST&nbsp;</font>&nbsp;<b>-p
            $DBPORT</b>&nbsp;-U $DBROOTUSER"</p>
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" style="background-color:
            rgb(255, 255, 255);">DUMP_CMD="pg_dump -h $DBHOST <b>-p
              $DBPORT</b> -U $DBROOTUSER -c"</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" style="background-color:
            rgb(255, 255, 255);"><br>
          </font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" style="background-color: rgb(255,
            255, 255);">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.</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" style="background-color: rgb(255,
            255, 255);"><br>
          </font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" style="background-color:
            rgb(255, 255, 255);">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?</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" style="background-color: rgb(255,
            255, 255);"><br>
          </font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;">
          <font class="Apple-style-span" style="background-color:
            rgb(255, 255, 255);">Thanks a lot in advance!</font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" style="background-color: rgb(255,
            255, 255);"><br>
          </font></p>
        <p class="x_MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><font
            class="Apple-style-span" style="background-color: rgb(255,
            255, 255);">Mariana.</font></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>