Hello again Mariano -

Thanks for the detailed investigation. 

Mike will take a look when he returns next week.

regards

Hugh


On Thursday 19 April 2001 07:09, Mariano Absatz wrote:
> El 17 Apr 2001, a las 19:45, Mariano Absatz escribió:
> > Hi all,
> >
> > I had this problem a couple of times but not sistematically... I'm
> > starting a new installation and trying startup scripts (in fact before
> > preparing the config files) and now it is sistematic.
> >
> > Every time I kill -1 Radiator, to re-read the configuration file, it
> > fails...
> >
> > What I remember from my other installation was that if I made a minor
> > change to the config file (e.g. the trace level), it worked OK, but if I
> > edited something bigger, sometimes, it didn't liked it and it died... I
> > thought it had to do with the way Radiator generates perl code on the fly
> > while reading the config files.
> >
> > Now I made a couple of almost empty config files and every time I kill -1
> >
> > radiator it yields the following error:
> > > Can't locate object method "new" via package "Radius::SNMPAgent"
> > > (perhaps you forgot to load "Radius::SNMPAgent"?) at
> > > /usr/local/lib/perl5/site_perl/5.6.1/Radius/ServerConfig.pm line 133,
> > > <FILE> line 17.
>
> Alright, alright... so I SHOULD have RTFM... I had not installed the
> SNMP_Session package and that generated this particular error... anyway,
> read below...
>
> > As I keep cheking it... it's not generating the correct filenames for the
> > logfiles.
> >
> > There is only one logfile generated in /logs/radius and its name is
> > "logfile"... that is, it kinda processed the LogDir statement, but it
> > didn't process the LogFile nor the <Log File>...
>
> It seems that sometimes, somehow, it starts generating messages before
> processing LogFile and <Log FILE>, but AFTER processing LogDir... it's
> alright, I prefer to have the logs someplace else rather than not having
> them at all...
>
> > I'm including the contens of the /app/Radiator/etc/radius-acct.cfg (which
> > is invoked from the command line) and the contents of
> > /app/Radiator/etc/radius-common.cfg (which is included from the former).
>
> I'll change them now... keep reading :-)
>
> > For completeness... I also include the startup/shutdown/reload script
> > (/etc/init.d/radius-acct). It's running on a Netra T1 AC200, 1CPU 360MHz,
> > 512Mb RAM, 2x18Gb HD, Solaris 8, Perl v5.6.1, Radiator 2.18 with all the
> > patches up to 10-Apr-2001.
>
> So, I installed SNMP_Session, cleaned up things a bit, but still, when I
> kill -1, I get strange results...
>
> I started one instance of Radiator (accounting only) and I can stop it
> and start it again with no problem, however, if I kill -1 it I get the
> following message on screen (and on the logfile too)... anyway, now it
> keeps running...
>
> > # /etc/init.d/radius-acct reload
> > Reloading Radiator (acct) configuration:
> > DBD::Oracle::db prepare failed: ORA-03113: end-of-file on communication
> >  channel (DBD ERROR: OCIStmtExecute/Describe) {SELECT
> >  NAS_IDENTIFIER, NAS_SECRET, NAS_IGNOREACCTSIGNATURE, NAS_DUPINTERVAL,
> >  NAS_DEFAULTREALM, NAS_TYPE, NAS_SNMPCOMMUNITY, NAS_LIVINGSTONOFFS,
> >  NAS_LIVINGSTONHOLE, NAS_FRAMEDGROUPBASEADDRESS,
> >  NAS_FRAMEDGROUPMAXPORTSPERCLAS, NAS_REWRITEUSERNAME,
> >  NAS_NOIGNOREDUPLICATES, NAS_PREHANDLERHOOK FROM NAS_SERVICIO_CALIDAD}
> >  at /usr/local/lib/perl5/site_perl/5.6.1/Radius/SqlDb.pm line 201,
> >  <FILE> line 22.
> >     -done
>
> Stranger, still, is that the message appears on the <Log FILE> and on the
> %L/logfile (default name), but NOT in the LogFile...
>
> I use <Log FILE> for standard logging (trace level 2 or 3) and have a
> commented global LogFile with Trace 4 for debugging, however, this file
> only gets the "Radiator starting / Radiator stopping" (I'm not receiving
> packets, just testing start/stop/reload).
>
> Anyway, I put the trace level 4 in the <Log FILE> clause and got this
> result: (keep reading after the trace 4)
>
> ==========================================================================
> Wed Apr 18 17:47:09 2001: NOTICE: SIGTERM received: stopping
> Wed Apr 18 17:47:15 2001: DEBUG: Adding Clients from SQL database
> Wed Apr 18 17:47:15 2001: DEBUG: Query is: SELECT       NAS_IDENTIFIER,
> NAS_SECRET, NAS_IGNOREACCTSIGNATURE, NAS_DUPINTERVAL, NAS_DEFAULTREALM,
> NAS_TYPE, NAS_SNMPCOMMUNITY, NAS_LIVINGSTONOFFS, NAS_LIVINGSTONHOLE,
> NAS_FRAMEDGROUPBASEADDRESS, NAS_FRAMEDGROUPMAXPORTSPERCLAS,
> NAS_REWRITEUSERNAME, NAS_NOIGNOREDUPLICATES, NAS_PREHANDLERHOOK FROM
> NAS_SERVICIO_CALIDAD
>
> Wed Apr 18 17:47:16 2001: INFO: Server started: Radiator 2.18 on mr-radius
> Wed Apr 18 17:47:23 2001: NOTICE: SIGHUP received: restarting
> Wed Apr 18 17:47:23 2001: DEBUG: Adding Clients from SQL database
> Wed Apr 18 17:47:23 2001: DEBUG: Query is: SELECT       NAS_IDENTIFIER,
> NAS_SECRET, NAS_IGNOREACCTSIGNATURE, NAS_DUPINTERVAL, NAS_DEFAULTREALM,
> NAS_TYPE, NAS_SNMPCOMMUNITY, NAS_LIVINGSTONOFFS, NAS_LIVINGSTONHOLE,
> NAS_FRAMEDGROUPBASEADDRESS, NAS_FRAMEDGROUPMAXPORTSPERCLAS,
> NAS_REWRITEUSERNAME, NAS_NOIGNOREDUPLICATES, NAS_PREHANDLERHOOK FROM
> NAS_SERVICIO_CALIDAD
>
> Wed Apr 18 17:47:23 2001: ERR: Execute failed for 'SELECT
> NAS_IDENTIFIER, NAS_SECRET, NAS_IGNOREACCTSIGNATURE, NAS_DUPINTERVAL,
> NAS_DEFAULTREALM, NAS_TYPE, NAS_SNMPCOMMUNITY, NAS_LIVINGSTONOFFS,
> NAS_LIVINGSTONHOLE, NAS_FRAMEDGROUPBASEADDRESS,
> NAS_FRAMEDGROUPMAXPORTSPERCLAS, NAS_REWRITEUSERNAME,
> NAS_NOIGNOREDUPLICATES, NAS_PREHANDLERHOOK FROM NAS_SERVICIO_CALIDAD':
> ORA-03113: end-of-file on communication channel (DBD ERROR:
> OCIStmtExecute/Describe)
> Wed Apr 18 17:47:23 2001: INFO: Server started: Radiator 2.18 on mr-radius
> ==========================================================================
>
> The question is why these kind of things happen when I reload the config
> file (kill -1)?... in fact, I didn't even edit the config files...
>
> I usually reload the config file after changing the trace level... but it
> seems I'll have to stop and restart the server every time I do so...
>
> I attach the following files which have changed since my message of
> yesterday:
>
> /etc/init.d/radius-acct (the start/stop/reload script)
> /app/Radiator/etc/radius-acct.cfg (the configuration file)
> /app/Radiator/etc/radius-common.cfg (which is included from
>  radius-acct.cfg)
> /app/Radiator/etc/clients.cfg (which is included from radius-common.cfg)
>
>
> ==================== /etc/init.d/radius-acct =======================
> ==================== /etc/init.d/radius-acct =======================
> ==================== /etc/init.d/radius-acct =======================
> #!/bin/sh
> #
> # Radiator        This shell script takes care of starting and stopping
> #                 Radiator (Radius server).
> #
>
> ARGV0LEN=`/usr/ucb/expr length $0`
> POS=`/usr/ucb/expr $ARGV0LEN - 3`
> RADTYPE=`/usr/ucb/expr substr $0 $POS 4`
> # RADTYPE= "auth" o "acct" o "test" tomado de los ultimos 4 caracteres del
> # comando invocado
> RADVAR="rad_instance=$RADTYPE"
> RADIATOR=/app/Radiator/bin/radiusd
> RADCONFIG=/app/Radiator/etc/radius-$RADTYPE.cfg
> MATCHSTRING=".*$RADIATOR.*$RADVAR.*"
> # RADPID=/app/Radiator/tmp/rad-$RADTYPE.pid
>
> ORACLE_SID=radius; export ORACLE_SID
> ORACLE_BASE=/app/oracle; export ORACLE_BASE
> ORACLE_SID=radius; export ORACLE_SID
> ORACLE_HOME=/app/oracle/product/8.1.6; export ORACLE_HOME
> ORACLE_PATH=/app/oracle/product/8.1.6/bin; export ORACLE_PATH
> PATH=$PATH:$ORACLE_HOME/bin; export PATH
>
>
>
> RADCMDLINE="$RADIATOR $RADVAR -config_file $RADCONFIG"
>
>
> [ -f $RADIATOR ] || exit 0
>
> [ -f $RADCONFIG ] || exit 0
>
> # See how we were called.
> case "$1" in
>   start)
>         # Start daemons.
>         echo "Starting Radiator ($RADTYPE): "
>         $RADCMDLINE
>         echo "    -done"
>         ;;
>   stop)
>         # Stop daemons.
>         echo "Shutting down Radiator ($RADTYPE): "
>         # kill `cat $RADPID`
>                 /usr/bin/pkill -u0 -x -f $MATCHSTRING
>         echo "    -done"
>         ;;
>   restart)
>         # Stop daemons.
>         echo "Shutting down Radiator ($RADTYPE): "
>         # kill `cat $RADPID`
>                 /usr/bin/pkill -u0 -x -f $MATCHSTRING
>         echo "    -done"
>                 # Give time for the port to be actually released
>                 echo "Waiting...   :-/"
>                 sleep 1
>         # Start daemons.
>         echo "Starting Radiator ($RADTYPE): "
>         $RADCMDLINE
>         echo "    -done"
>         ;;
>   reload)
>         # reloading configuration
>         echo "Reloading Radiator ($RADTYPE) configuration: "
>         # kill -1 `cat $RADPID`
>                 /usr/bin/pkill -1 -u0 -x -f $MATCHSTRING
>         echo "    -done"
>         ;;
>   status)
>         # checking status
>                 if  /usr/bin/pgrep -u0 -x -f $MATCHSTRING ;
>                 then
>                         echo "Radiator ($RADTYPE) running" ;
>                 else
>                         echo "Radiator ($RADTYPE) NOT running" ;
>                 fi
>         ;;
>   *)
>         echo "Usage: $0 {start|stop|status|restart|reload}"
>         exit 1
> esac
>
> exit 0
> =========================================================================
> =========================================================================
> =========================================================================
>
>
>
> ================= /app/Radiator/etc/radius-acct.cfg =====================
> ================= /app/Radiator/etc/radius-acct.cfg =====================
> ================= /app/Radiator/etc/radius-acct.cfg =====================
> ##################################################################
> #                    ACCOUNTING CONFIGURATION                    #
> ##################################################################
>
> # For debugging, uncomment the 2 following lines
> #Trace      4
> #LogFile %L/%Y-%m/%{GlobalVar:rad_instance}/debugLog_%d-%q
>
> #Trace:
> #0 ERR. Error conditions. Serious and unexpected failures
> #1 WARNING. Warning conditions. Unexpected failures
> #2 NOTICE. Normal but significant conditions.
> #3 INFO. Informational messages.
> #4 DEBUG. Debugging messages.
> #5 Incoming raw packet dumps in hexadecimal.
>
> # include common configuration and global definitions
> include /app/Radiator/etc/radius-common.cfg
>
> ##################################################################
> #                       PROTOCOL SECTION                         #
> ##################################################################
>
> #
> # We only do accounting in this instance of Radiator
> #
> AuthPort
> AcctPort        1813
>
> <SNMPAgent>
>         Port    16113
>         Community       CONFIGURAR-COMUNIDAD
> </SNMPAgent>
>
> =========================================================================
> =========================================================================
> =========================================================================
>
>
> ================= /app/Radiator/etc/radius-common.cfg ====================
> ================= /app/Radiator/etc/radius-common.cfg ====================
> ================= /app/Radiator/etc/radius-common.cfg ====================
> ##################################################################
> #                      COMMON CONFIGURATION                      #
> ##################################################################
>
> ##################################################################
> #                FILES AND DIRECTORIES SECTION                   #
> ##################################################################
>
> LogDir          /logs/radius
> DbDir           /app/Radiator/db
> DefineGlobalVar ScriptDir       /app/Radiator/scripts
> DefineGlobalVar ConfigDir       /app/Radiator/etc
> DefineGlobalVar TempDir         /app/Radiator/tmp
>
> DictionaryFile  %{GlobalVar:ConfigDir}/dictionary
> PidFile     %{GlobalVar:TempDir}/rad-%{GlobalVar:rad_instance}.pid
>
> ##################################################################
> #                 DATABASE DEFINITIONS SECTION                   #
> ##################################################################
>
> DefineGlobalVar OracleHost      localhost
> DefineGlobalVar OracleSID       radius
>
> DefineGlobalVar MR_DBSource
> dbi:Oracle:host=localhost;sid=radius
> DefineGlobalVar MR_DBUsername   radmin
> DefineGlobalVar MR_DBAuth               radius
>
>
> ##################################################################
> #                        LOGGING SECTION                         #
> ##################################################################
> <Log FILE>
>     Identifier fileLoggerMetroAuth
>     Filename %L/%Y-%m/%{GlobalVar:rad_instance}/stdLog_%d-%q
>     Trace 4
> </Log>
>
>
>
> ##################################################################
> #                        REWRITE SECTION                         #
> ##################################################################
>
> # REWRITE USER NAME BEFORE ANYTHING ELSE
> # Rewrite any Name without realm to our realm
> # because defaultrealm does not match on HANDLER
> RewriteUsername     s/^([^@]+)$/$1\@metrored/
>
> # change everything in the username to lowercase
> RewriteUsername     tr/[A-Z]/[a-z]/
>
>
> ##################################################################
> #                       INCLUDES SECTION                         #
> ##################################################################
>
> # include clients section
> include %{GlobalVar:ConfigDir}/clients.cfg
> =========================================================================
> =========================================================================
> =========================================================================
>
> ==================== /app/Radiator/etc/clients.cfg =======================
> ==================== /app/Radiator/etc/clients.cfg =======================
> ==================== /app/Radiator/etc/clients.cfg =======================
> ##################################################################
> #                        CLIENTS SECTION                         #
> ##################################################################
>
> <ClientListSQL>
> # Client (NAS) info is in the database
>
>         DBSource        %{GlobalVar:MR_DBSource}
>         DBUsername      %{GlobalVar:MR_DBUsername}
>         DBAuth          %{GlobalVar:MR_DBAuth}
>
>         GetClientQuery  SELECT  \
>                         NAS_IDENTIFIER, NAS_SECRET, \
>                         NAS_IGNOREACCTSIGNATURE, NAS_DUPINTERVAL, \
>                         NAS_DEFAULTREALM, NAS_TYPE, NAS_SNMPCOMMUNITY, \
>                         NAS_LIVINGSTONOFFS, NAS_LIVINGSTONHOLE, \
>              NAS_FRAMEDGROUPBASEADDRESS, NAS_FRAMEDGROUPMAXPORTSPERCLAS, \
>                         NAS_REWRITEUSERNAME, NAS_NOIGNOREDUPLICATES, \
>                         NAS_PREHANDLERHOOK \
>                         FROM NAS_SERVICIO_CALIDAD
>
> </ClientListSQL>
>
> =========================================================================
> =========================================================================
> =========================================================================
>
>
> ===
> Archive at http://www.starport.net/~radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.

-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to