+ Responder ao Tópico



  1. #7

    Padrão

    tabela corrompida pode acntecer por N fatores..

    - desligamento incorreto
    - terminar o processo por kill -9

    para fazer analise.. vc precisa executar comandos de manutenção assim no shell do seu servidor faça:

    mysql -u root -p
    vai pedir a senha do root do mysql ai vc coloca.. caso nao tenha senha.. remota o -p ..

    mysql>
    mysql> use radius;
    mysql> repair table radacct;
    mysql> optimize table radacct;
    mysq> exit

    pronto.. isso vai fazer analise .. ali no use radius.. radius eh o nome da database.. se a sua for diferente deve mudar..

  2. #8

    Padrão

    Caro Alexandre,
    Obrigado por nos ajudar, mas vou te abusar mais ainda. Refiz os procedimentos para reparar e otimizar a tabela radacct mas não adiantou, ai resolvi recriar a mesma que também não obtive resultado. Resolvi olhar no debug do radius (radiusd -X) e observei que o mesmo carrega e executa os módulos mas acontece o seguinte:
    modcall[authorize] funciona
    modcall[authenticate] funciona
    não aparece o accounting e pula para
    modcall[postauth]

    Será que é isso, ou seja, ele não executa o accounting. Obs: Meu SQL no modulo accounting está descomentado (ativado).

    O que pode ser? Agradeço a quem puder ajudar!



  3. #9

    Padrão

    e o concentrador... ta enviando os pacotes de accounting ? talvez o problema nem seja no radius.. seja no concentrador q nao esta enviando os pacotes de acct...

  4. #10

    Padrão

    Caro Alexandre,

    Desculpe-me minha ignorancia, mas o que é concentrador( meu mikrotik?)

    Se for como saberei?



  5. #11

    Padrão

    roda o radius com as opções de debug

    radius -X

    fica observando o tipo do pacote q recebe.. se eh accounting-start .. accounting-stop ou se eh interim-update

    se for update.. l radius ta rececebendo os updates do concentrador (mikrotik) .. entao o problema eh no radius.. caso nao esteja recebendo... o problema eh no concentrador (mikrotik)

    ai vc precisa procurar o pq...

  6. #12

    Padrão

    Caro Alexandre,

    Não vi nada referente a pacotes, olha um exemplo:

    rad_recv: Access-Request packet from host 7.7.7.7:1711, id=222, length=197
    Service-Type = Framed-User
    Framed-Protocol = PPP
    NAS-Port = 757
    NAS-Port-Type = Ethernet
    User-Name = "rpcicerobezerra"
    Calling-Station-Id = "00:0A:52:7A:CF:7C"
    Called-Station-Id = "blkparafuso"
    NAS-Port-Id = "ether1"
    MS-CHAP-Challenge = 0x8333a497b42e8b0eb9d63d645319f213
    MS-CHAP2-Response = 0x010077a2ef5bdc545d725b57c77008f5583a0000000000000000b9b5a020fe1834150895dbff990d2e2c125895ce5e673729
    NAS-Identifier = "blkpar"
    NAS-IP-Address = 7.7.7.7
    Processing the authorize section of radiusd.conf
    modcall: entering group authorize for request 7
    modcall[authorize]: module "preprocess" returns ok for request 7
    modcall[authorize]: module "chap" returns noop for request 7
    rlm_mschap: Found MS-CHAP attributes. Setting 'Auth-Type = mschap'
    modcall[authorize]: module "mschap" returns ok for request 7
    radius_xlat: 'rpcicerobezerra'
    rlm_sql (sql): sql_set_user escaped user --> 'rpcicerobezerra'
    radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'rpcicerobezerra' ORDER BY id'
    rlm_sql (sql): Reserving sql socket id: 2
    rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'rpcicerobezerra' ORDER BY id
    radius_xlat: 'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'rpcicerobezerra' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
    rlm_sql_mysql: query: SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'rpcicerobezerra' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
    radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'rpcicerobezerra' ORDER BY id'
    rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'rpcicerobezerra' ORDER BY id
    radius_xlat: 'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'rpcicerobezerra' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
    rlm_sql_mysql: query: SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'rpcicerobezerra' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
    rlm_sql (sql): Released sql socket id: 2
    modcall[authorize]: module "sql" returns ok for request 7
    rlm_pap: Found existing Auth-Type, not changing it.
    modcall[authorize]: module "pap" returns noop for request 7
    modcall: leaving group authorize (returns ok) for request 7
    rad_check_password: Found Auth-Type MS-CHAP
    auth: type "MS-CHAP"
    Processing the authenticate section of radiusd.conf
    modcall: entering group MS-CHAP for request 7
    rlm_mschap: Told to do MS-CHAPv2 for rpcicerobezerra with NT-Password
    modcall[authenticate]: module "mschap" returns ok for request 7
    modcall: leaving group MS-CHAP (returns ok) for request 7
    Sending Access-Accept of id 222 to 7.7.7.7 port 1711
    Framed-IP-Address = 192.168.215.10
    MS-CHAP2-Success = 0x01533d31433238383532313038343332344633303342453046354546373346303732383137334330434139
    Finished request 7
    Going to the next request
    --- Walking the entire request list ---
    Waking up in 6 seconds...
    --- Walking the entire request list ---
    Cleaning up request 7 ID 222 with timestamp 49d50866
    Nothing to do. Sleeping until we see a request.

    Ajuda em algo esse exemplo?