[Users] Re: openser + postgres starting problem

Stephen Varga varga at zbzoom.net
Sun Mar 18 18:17:30 CET 2007


Verify that you have one of the following lines in your openserctlrc file

    OSER_FIFO="/tmp/openser_fifo"
    or
    #OSER_FIFO="FIFO" 

If the variable OSER_FIFO doesn't exist when the openserct is executed 
it will default to /tmp/openser_fifo

Hopefully that should get you going.

Steve

rkmr.em at gmail.com wrote:
> I have these settings in openser.cfg and openser starts fine.
> But when I do openserctl moni I get those errors. May be this is a bug?
> thanks
>
> On 3/18/07, Stephen Varga <varga at zbzoom.net> wrote:
>> FIFO is now a module in version 1.2
>>
>> Here are the configuration commands to enable it openser 1.2.
>>
>> mpath="/usr/local/lib/openser/modules/"
>> loadmodule "mi_fifo.so"
>> modparam("mi_fifo","fifo_name","/tmp/openser_fifo")
>>
>> Here is the link to the mi_fifo module documentation.
>> http://www.openser.org/docs/modules/devel/mi_fifo.html
>>
>> Steve
>>
>> rkmr.em at gmail.com wrote:
>> > Should I have it in
>> > etc/openser/openser.cfg
>> > OR?
>> > etc/openser/openserctlrc
>> >
>> > I get the same error if I have in either of the files. If I have it in
>> > openser.cfg openser doesnt start. The message is syntax error where I
>> > have this setting.
>> > Do you know what I should do?
>> > thanks
>> >
>> > On 3/18/07, Berry Bartels <berry at praatpaal.com> wrote:
>> >> Make sure you have the following lines in your configuration
>> >>
>> >> fifo="/tmp/ser_fifo"
>> >> fifo_db_url="postgres://<username>:<password>@localhost/<database>"
>> >>
>> >> Replace <username>,<password> and <database> with the right values.
>> >>
>> >> Berry
>> >>
>> >> -----Original Message-----
>> >> From: rkmr.em at gmail.com [mailto:rkmr.em at gmail.com]
>> >> Sent: zondag 18 maart 2007 4:23
>> >> To: berry at praatpaal.com
>> >> Cc: users at openser.org; devel at openser.org
>> >> Subject: Re: [Users] Re: openser + postgres starting problem
>> >>
>> >> 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
>> >> >
>> >>
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at openser.org
>> > http://openser.org/cgi-bin/mailman/listinfo/users
>> >
>> >
>>
>>
>
>





More information about the sr-users mailing list