[Users] Re: openser + postgres starting problem

rkmr.em at gmail.com rkmr.em at gmail.com
Sun Mar 18 04:22:33 CET 2007


Thanks a lot. It worked.
This was from the latest 1.2 release from OpenSER. Maybe it should be
fixed there in the release?

I still get this error: Can you tell what I should do?
/usr/local/sbin/openserctl moni
database engine 'PGSQL' loaded
Control engine 'FIFO' loaded
ERROR: Error opening OpenSER's FIFO FIFO
ERROR: Make sure you have line 'fifo=FIFO' in your config
thanks a lot


On 3/17/07, Berry Bartels <berry at praatpaal.com> wrote:
> There was a ' to many on line 19
> PGSQL="$TOOLPATH"' -> PGSQL="$TOOLPATH"
>
> Try this one
>
> #
> # $Id: openserctl.pgsql 1827 2007-03-12 15:22:53Z bogdan_iancu $ # # sc:
> openser control; tool for maintaining openser #
> #===================================================================
>
> ##### ----------------------------------------------- ##### ### PGSQL
> specific variables and functions #
>
> ##### ----------------------------------------------- ##### ### load SQL
> base # if [ -f "$MYLIBDIR/openserctl.sqlbase" ]; then
>         . "$MYLIBDIR/openserctl.sqlbase"
> else
>         echo "Cannot load SQL core functions '$MYLIBDIR/openserctl.sqlbase'
> - exiting ..."
>         exit -1
> fi
>
> ##### ----------------------------------------------- ##### ### binaries if
> [ -z "$PGSQL" ] ; then
>         locate_tool psql
>         if [ -z "$TOOLPATH" ] ; then
>                 echo "error: 'psql' tool not found: set PGSQL variable to
> correct tool path"
>                 exit
>         fi
>         PGSQL="$TOOLPATH"
> fi
>
> ##### ----------------------------------------------- ##### ### variables
>
> # type of sql tables
> if [ -z "$TABLE_TYPE" ]; then
>         TABLE_TYPE=""
> fi
>
> # input: sql query, optional pgsql command-line params
> pgsql_query() {
>         # if password not yet queried, query it now
>         prompt_pw "PgSql password for user '$DBRWUSER@$DBHOST'"
>         mecho "pgsql_query: $PGSQL $2 -A -q -t -P fieldsep='    ' -h $DBHOST
> -U $DBRWUSER $DBNAME -c '$1'"
>         PGPASSWORD="$DBRWPW" $PGSQL $2 \
>                 -A -q -t \
>                 -P fieldsep="   " \
>                 -h $DBHOST \
>                 -U $DBRWUSER \
>                 $DBNAME \
>                 -c "$1"
> }
>
> # input: sql query, optional pgsql command-line params
> pgsql_ro_query() {
>         mdbg "pgsql_ro_query: $PGSQL $2 -h $DBHOST -U $DBROUSER $DBNAME -c
> '$1'"
>         PGPASSWORD="$DBROPW" $PGSQL $2 \
>                 -h $DBHOST \
>                 -U $DBROUSER \
>                 $DBNAME \
>                 -c "$1"
> }
>
> DBCMD=pgsql_query
> DBROCMD=pgsql_ro_query
> #DBRAWPARAMS="-A -q -t -P fieldsep=\"   \""
> DBRAWPARAMS="-A -q -t"
>
> Kind regards,
>
> Berry Bartels
>
>
> -----Original Message-----
> From: users-bounces at openser.org [mailto:users-bounces at openser.org] On Behalf
> Of rkmr.em at gmail.com
> Sent: zondag 18 maart 2007 0:23
> To: users at openser.org
> Subject: [Users] Re: openser + postgres starting problem
>
> Here is the full configuration file:
>
> more /usr/local/lib/openser/openserctl/openserctl.pgsql
> #
> # $Id: openserctl.pgsql 1827 2007-03-12 15:22:53Z bogdan_iancu $
> #
> # sc: openser control; tool for maintaining openser
> #
> #===================================================================
>
> ##### ----------------------------------------------- #####
> ### PGSQL specific variables and functions
> #
>
> ##### ----------------------------------------------- #####
> ### load SQL base
> #
> if [ -f "$MYLIBDIR/openserctl.sqlbase" ]; then
>         . "$MYLIBDIR/openserctl.sqlbase"
> else
>         echo "Cannot load SQL core functions
> '$MYLIBDIR/openserctl.sqlbase' - exiting ..."
>         exit -1
> fi
>
> ##### ----------------------------------------------- #####
> ### binaries
> if [ -z "$PGSQL" ] ; then
>         locate_tool psql
>         if [ -z "$TOOLPATH" ] ; then
>                 echo "error: 'psql' tool not found: set PGSQL variable
> to correct tool path"
>                 exit
>         fi
>         PGSQL="$TOOLPATH"'
> fi
>
> ##### ----------------------------------------------- #####
> ### variables
>
> # type of sql tables
> if [ -z "$TABLE_TYPE" ]; then
>         TABLE_TYPE=""
> fi
>
> # input: sql query, optional pgsql command-line params
> pgsql_query() {
>         # if password not yet queried, query it now
>         prompt_pw "PgSql password for user '$DBRWUSER@$DBHOST'"
>         mecho "pgsql_query: $PGSQL $2 -A -q -t -P fieldsep='    ' -h
> $DBHOST -U $DBRWUSER $DBNAME -c '$1'
> "
>         PGPASSWORD="$DBRWPW" $PGSQL $2 \
>                 -A -q -t \
>                 -P fieldsep="   " \
>                 -h $DBHOST \
>                 -U $DBRWUSER \
>                 $DBNAME \
>                 -c "$1"
> }
>
> # input: sql query, optional pgsql command-line params
> pgsql_ro_query() {
>         mdbg "pgsql_ro_query: $PGSQL $2 -h $DBHOST -U $DBROUSER $DBNAME -c
> '$1'"
>         PGPASSWORD="$DBROPW" $PGSQL $2 \
>                 -h $DBHOST \
>                 -U $DBROUSER \
>                 $DBNAME \
>                 -c "$1"
> }
>
> DBCMD=pgsql_query
> DBROCMD=pgsql_ro_query
> #DBRAWPARAMS="-A -q -t -P fieldsep=\"   \""
> DBRAWPARAMS="-A -q -t"
>
> thanks
>
>
> On 3/17/07, rkmr.em at gmail.com <rkmr.em at gmail.com> wrote:
> > Hi
> > If I compiled openser with postgres module and I get the following errors:
> >
> >
> > [mark at localhost|~|16:34:34] /usr/local/sbin/openserctl moni
> >
> > /usr/local/lib/openser/openserctl/openserctl.pgsql: line 57:
> > unexpected EOF while looking for matching `''
> > /usr/local/lib/openser/openserctl/openserctl.pgsql: line 70: syntax
> > error: unexpected end of file
> > database engine 'PGSQL' loaded
> > Control engine 'FIFO' loaded
> > ERROR: Error opening OpenSER's FIFO FIFO
> > ERROR: Make sure you have line 'fifo=FIFO' in your config
> >
> >
> > The line 57 3rd line in here:
> >
> > # input: sql query, optional pgsql command-line params
> > pgsql_ro_query() {
> >     mdbg "pgsql_ro_query: $PGSQL $2 -h $DBHOST -U $DBROUSER $DBNAME -c
> '$1'"
> >     PGPASSWORD="$DBROPW" $PGSQL $2 \
> >         -h $DBHOST \
> >         -U $DBROUSER \
> >         $DBNAME \
> >         -c "$1"
> > }
> >
> >
> > How to fix this?
> > thanks
> >
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>




More information about the Users mailing list