Re: Mysql failover

2007-03-19 Thread Fox
Le Fri, Mar 16, 2007 at 04:28:52PM +0200, Etienne Pretorius ecrivait:
> I would rather keep it as it is, as it is a problem to be looked at and can be
> identified by the logs.

And what if the first mysql server goes down right before receiving a
SIGHUP because of logrotate ?

Regards,
Fox.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Mysql failover

2007-03-16 Thread Etienne Pretorius
I would rather keep it as it is, as it is a problem to be looked at and 
can be identified by the logs.


Kind Regards
Etienne
Network Administrator

Luis Galán wrote:

Hello!

Yes it can authenticate trough  mysql server number 2.
But it both mysql server are down, obviously it can't.


Luis

Alan DeKok escribió:
  

Luis Galán wrote:
...
  

1.- If my mysql server 1 is down and mysql server 2 is up. And I try to 
start the freeradius daemon, it returns me an error like that:

  

...
  

2.- If I start freeradius daemon and my 2 mysql server is up, all works 
fine (obviously), but if my mysql server 1 fails, freeradius still works 
(Great!!).


Then it seems that the problem is only at the start time. Is it Right?
Is it a bug?

  

  It's arguably a bug.  The server could be a little more forgiving of
databases that are down.

  On the other hand, if your databases are down, then the server can't
really authenticate anyone, can it?

  Alan DeKok.
--
  http://deployingradius.com   - The web site of the book
  http://deployingradius.com/blog/ - The blog
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
  

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
  
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Re: Mysql failover

2007-03-16 Thread Luis Galán
Hello!

Yes it can authenticate trough  mysql server number 2.
But it both mysql server are down, obviously it can't.


Luis

Alan DeKok escribió:
> Luis Galán wrote:
> ...
>   
>> 1.- If my mysql server 1 is down and mysql server 2 is up. And I try to 
>> start the freeradius daemon, it returns me an error like that:
>> 
> ...
>   
>> 2.- If I start freeradius daemon and my 2 mysql server is up, all works 
>> fine (obviously), but if my mysql server 1 fails, freeradius still works 
>> (Great!!).
>>
>> Then it seems that the problem is only at the start time. Is it Right?
>> Is it a bug?
>> 
>
>   It's arguably a bug.  The server could be a little more forgiving of
> databases that are down.
>
>   On the other hand, if your databases are down, then the server can't
> really authenticate anyone, can it?
>
>   Alan DeKok.
> --
>   http://deployingradius.com   - The web site of the book
>   http://deployingradius.com/blog/ - The blog
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>   
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Mysql failover

2007-03-16 Thread Alan DeKok
Luis Galán wrote:
...
> 1.- If my mysql server 1 is down and mysql server 2 is up. And I try to 
> start the freeradius daemon, it returns me an error like that:
...
> 2.- If I start freeradius daemon and my 2 mysql server is up, all works 
> fine (obviously), but if my mysql server 1 fails, freeradius still works 
> (Great!!).
> 
> Then it seems that the problem is only at the start time. Is it Right?
> Is it a bug?

  It's arguably a bug.  The server could be a little more forgiving of
databases that are down.

  On the other hand, if your databases are down, then the server can't
really authenticate anyone, can it?

  Alan DeKok.
--
  http://deployingradius.com   - The web site of the book
  http://deployingradius.com/blog/ - The blog
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: mysql failover

2004-05-31 Thread jesk
On Tuesday 01 June 2004 00:41, jesk wrote:
> On Monday 31 May 2004 16:58, jesk wrote:
> > On Sunday 30 May 2004 14:07, Gary McKinney wrote:
> > > Hmmm -
> > >
> > > The "logic" of the request does not really make much sense... If the
> > > FreeRadius
> > > server is responding to the NAS but the mysql server back-end is not
> > > responding
> > > that does not mean the "radius" server is broken...
> > >
> > > I would think you could setup to authenticate through multiple mysql
> > > backend servers
> > > to handle the event of the primary being offline or down instead of
> > > forcing a purfectly
> > > good working radius server to "act" like it was down  and if you
> > > setup a secondary
> > > freeradius server to handle the event of the primary going down you can
> > > use the
> > > mysql servers that the first radius server points to for authentication
> > > by the second
> > > radius server so they have a common shared database (double
> > > redundancy).
> > >
> > > Check the email archives - I remember someone answered how to setup
> > > multiple sql servers to be used for user authentication in freeradius
> > > (which is what you really
> > > want to do here)...  if the first mysql server is not responding the
> > > second (or next in line)
> > > will perform the response instead
> > >
> > > gm...
> > >
> > > - Original Message -
> > > From: "jesk" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, May 30, 2004 6:38 AM
> > > Subject: Re: mysql failover
> > >
> > > > On Friday 28 May 2004 17:36, jesk wrote:
> > > > > hi everybody,
> > > > >
> > > > > is there a way to configure freeradius to NOT answer to a NAS if
> > > > > the mysql-backend is down, so that the nas can switch to the next
> > > > > secondary configured freeradius server with its own mysql-backend?
> > > > > i tested freeradius and shutted down the mysqlserver, the request
> > > > > from the nas came in and freeradius rejected the request in cause
> > > > > of the closed mysqldb-handle, now the nas rejected the ppp session
> > > > > and didnt requested the secondary freeradius.
> > > > > can somebody help me?
> > > > >
> > > > >
> > > > > thanks in advance,
> > > > >
> > > > > christian
> > > > >
> > > > >
> > > > > -
> > > > > List info/subscribe/unsubscribe? See
> > > > > http://www.freeradius.org/list/users.html
> > > >
> > > > no way?
> > > >
> > > > -
> > > > List info/subscribe/unsubscribe? See
> > >
> > > http://www.freeradius.org/list/users.html
> > >
> > >
> > > -
> > > List info/subscribe/unsubscribe? See
> > > http://www.freeradius.org/list/users.html
> >
> > hi,
> >
> > my intend was to setup 2 freeradius server, both server have to local its
> > own mysql-db. both mysqlserver are used to handle all 3 kinds of "aaa".
> > the replication for accounting data is done with radrelay, this works
> > very fine. but now there is this problem with the potentiality breakdown
> > of a mysqlserver. if iam handling this like you said, then i couldnt log
> > accounting data, in cause of the radrelay i think, accounting data would
> > be logged twice. is there no easy way to come around this circumstances?
> > i use the mysql for all accounts only the DEFAULT entry is in the USER
> > file.
> >
> > thanks for any hints!
> >
> > regards,
> > christian
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
>
> hi,
>
> i configured the "always" module with handled in the authorize section:
> 
> redundant {
> sql
> handled
> }
> 
>
> i believed that that would do nothing if the mysql module would fail, but
> it return a reject to the mysql client:
>
> 
> radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
> Username = 'test' ORDER BY id'
> rlm_sql (sql): Ignoring unconnected handle 4..
> rlm_sql

Re: mysql failover

2004-05-31 Thread jesk
On Monday 31 May 2004 16:58, jesk wrote:
> On Sunday 30 May 2004 14:07, Gary McKinney wrote:
> > Hmmm -
> >
> > The "logic" of the request does not really make much sense... If the
> > FreeRadius
> > server is responding to the NAS but the mysql server back-end is not
> > responding
> > that does not mean the "radius" server is broken...
> >
> > I would think you could setup to authenticate through multiple mysql
> > backend servers
> > to handle the event of the primary being offline or down instead of
> > forcing a purfectly
> > good working radius server to "act" like it was down  and if you
> > setup a secondary
> > freeradius server to handle the event of the primary going down you can
> > use the
> > mysql servers that the first radius server points to for authentication
> > by the second
> > radius server so they have a common shared database (double redundancy).
> >
> > Check the email archives - I remember someone answered how to setup
> > multiple sql servers to be used for user authentication in freeradius
> > (which is what you really
> > want to do here)...  if the first mysql server is not responding the
> > second (or next in line)
> > will perform the response instead....
> >
> > gm...
> >
> > - Original Message -
> > From: "jesk" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, May 30, 2004 6:38 AM
> > Subject: Re: mysql failover
> >
> > > On Friday 28 May 2004 17:36, jesk wrote:
> > > > hi everybody,
> > > >
> > > > is there a way to configure freeradius to NOT answer to a NAS if the
> > > > mysql-backend is down, so that the nas can switch to the next
> > > > secondary configured freeradius server with its own mysql-backend?
> > > > i tested freeradius and shutted down the mysqlserver, the request
> > > > from the nas came in and freeradius rejected the request in cause of
> > > > the closed mysqldb-handle, now the nas rejected the ppp session and
> > > > didnt requested the secondary freeradius.
> > > > can somebody help me?
> > > >
> > > >
> > > > thanks in advance,
> > > >
> > > > christian
> > > >
> > > >
> > > > -
> > > > List info/subscribe/unsubscribe? See
> > > > http://www.freeradius.org/list/users.html
> > >
> > > no way?
> > >
> > > -
> > > List info/subscribe/unsubscribe? See
> >
> > http://www.freeradius.org/list/users.html
> >
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
>
> hi,
>
> my intend was to setup 2 freeradius server, both server have to local its
> own mysql-db. both mysqlserver are used to handle all 3 kinds of "aaa". the
> replication for accounting data is done with radrelay, this works very
> fine. but now there is this problem with the potentiality breakdown of a
> mysqlserver. if iam handling this like you said, then i couldnt log
> accounting data, in cause of the radrelay i think, accounting data would be
> logged twice. is there no easy way to come around this circumstances? i use
> the mysql for all accounts only the DEFAULT entry is in the USER file.
>
> thanks for any hints!
>
> regards,
> christian
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


hi,

i configured the "always" module with handled in the authorize section:

redundant {
sql
handled
}


i believed that that would do nothing if the mysql module would fail, but it 
return a reject to the mysql client:


radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE 
Username = 'test' ORDER BY id'
rlm_sql (sql): Ignoring unconnected handle 4..
rlm_sql (sql): Ignoring unconnected handle 3..
rlm_sql (sql): Ignoring unconnected handle 2..
rlm_sql (sql): Ignoring unconnected handle 1..
rlm_sql (sql): Ignoring unconnected handle 0..
rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
  modcall[authorize]: module "sql" returns fail for request 0
  modcall[authorize]: module "handled" returns handled for request 0
modcall: group redundant returns handled for request 0
modcall: group authorize returns handled for request 0
There was no response configured: rejecting request 0
Server rejecting request 4.
Finished request 4
Going to the next request


can somebody say me what im doing wrong?

thanks and regards,

christian

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: mysql failover

2004-05-31 Thread jesk
On Sunday 30 May 2004 14:07, Gary McKinney wrote:
> Hmmm -
>
> The "logic" of the request does not really make much sense... If the
> FreeRadius
> server is responding to the NAS but the mysql server back-end is not
> responding
> that does not mean the "radius" server is broken...
>
> I would think you could setup to authenticate through multiple mysql
> backend servers
> to handle the event of the primary being offline or down instead of forcing
> a purfectly
> good working radius server to "act" like it was down  and if you setup
> a secondary
> freeradius server to handle the event of the primary going down you can use
> the
> mysql servers that the first radius server points to for authentication by
> the second
> radius server so they have a common shared database (double redundancy).
>
> Check the email archives - I remember someone answered how to setup
> multiple sql servers to be used for user authentication in freeradius
> (which is what you really
> want to do here)...  if the first mysql server is not responding the second
> (or next in line)
> will perform the response instead
>
> gm...
>
> - Original Message -
> From: "jesk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, May 30, 2004 6:38 AM
> Subject: Re: mysql failover
>
> > On Friday 28 May 2004 17:36, jesk wrote:
> > > hi everybody,
> > >
> > > is there a way to configure freeradius to NOT answer to a NAS if the
> > > mysql-backend is down, so that the nas can switch to the next secondary
> > > configured freeradius server with its own mysql-backend?
> > > i tested freeradius and shutted down the mysqlserver, the request from
> > > the nas came in and freeradius rejected the request in cause of the
> > > closed mysqldb-handle, now the nas rejected the ppp session and didnt
> > > requested the secondary freeradius.
> > > can somebody help me?
> > >
> > >
> > > thanks in advance,
> > >
> > > christian
> > >
> > >
> > > -
> > > List info/subscribe/unsubscribe? See
> > > http://www.freeradius.org/list/users.html
> >
> > no way?
> >
> > -
> > List info/subscribe/unsubscribe? See
>
> http://www.freeradius.org/list/users.html
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html

hi,

my intend was to setup 2 freeradius server, both server have to local its own 
mysql-db. both mysqlserver are used to handle all 3 kinds of "aaa". the 
replication for accounting data is done with radrelay, this works very fine.
but now there is this problem with the potentiality breakdown of a 
mysqlserver. if iam handling this like you said, then i couldnt log 
accounting data, in cause of the radrelay i think, accounting data would be 
logged twice. is there no easy way to come around this circumstances? 
i use the mysql for all accounts only the DEFAULT entry is in the USER file.

thanks for any hints!

regards,
christian

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: mysql failover

2004-05-30 Thread Gary McKinney
Hmmm -

The "logic" of the request does not really make much sense... If the
FreeRadius
server is responding to the NAS but the mysql server back-end is not
responding
that does not mean the "radius" server is broken...

I would think you could setup to authenticate through multiple mysql backend
servers
to handle the event of the primary being offline or down instead of forcing
a purfectly
good working radius server to "act" like it was down  and if you setup a
secondary
freeradius server to handle the event of the primary going down you can use
the
mysql servers that the first radius server points to for authentication by
the second
radius server so they have a common shared database (double redundancy).

Check the email archives - I remember someone answered how to setup multiple
sql servers to be used for user authentication in freeradius (which is what
you really
want to do here)...  if the first mysql server is not responding the second
(or next in line)
will perform the response instead

gm...

- Original Message - 
From: "jesk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 30, 2004 6:38 AM
Subject: Re: mysql failover


> On Friday 28 May 2004 17:36, jesk wrote:
> > hi everybody,
> >
> > is there a way to configure freeradius to NOT answer to a NAS if the
> > mysql-backend is down, so that the nas can switch to the next secondary
> > configured freeradius server with its own mysql-backend?
> > i tested freeradius and shutted down the mysqlserver, the request from
> > the nas came in and freeradius rejected the request in cause of the
> > closed mysqldb-handle, now the nas rejected the ppp session and didnt
> > requested the secondary freeradius.
> > can somebody help me?
> >
> >
> > thanks in advance,
> >
> > christian
> >
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
>
> no way?
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: mysql failover

2004-05-30 Thread jesk
On Friday 28 May 2004 17:36, jesk wrote:
> hi everybody,
>
> is there a way to configure freeradius to NOT answer to a NAS if the
> mysql-backend is down, so that the nas can switch to the next secondary
> configured freeradius server with its own mysql-backend?
> i tested freeradius and shutted down the mysqlserver, the request from
> the nas came in and freeradius rejected the request in cause of the
> closed mysqldb-handle, now the nas rejected the ppp session and didnt
> requested the secondary freeradius.
> can somebody help me?
>
>
> thanks in advance,
>
> christian
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html

no way?

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html