The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

форумы  помощь  поиск  регистрация  майллист  ВХОД  слежка  RSS
"database error `Duplicate entry 'aba56a4e302fbde1' for key 1..."
Вариант для распечатки  
Пред. тема | След. тема 
Форумы OpenNET: Виртуальная конференция (Public)
Изначальное сообщение [Проследить за развитием треда]

"database error `Duplicate entry 'aba56a4e302fbde1' for key 1..." 
Сообщение от IPKILLER Искать по авторуВ закладки(ok) on 15-Сен-05, 16:08  (MSK)
Здравствуйте!

Установил и настроил связку Mabill+FreeNIBS+FreeRADIUS+Mgetty+pppd под Unix FreeBSD 5.4. Когда к системе по обычному модему подключается пользователь с логином test паролем test123, то его отключает по причине того, что якобы пользователь с таким логином уже подключён, хотя это не так. Юзер какбы залипает в системе.
Вот подробный лог работы FreeRADIUS-сервера:

rad_recv: Access-Request packet from host 127.0.0.1:59350, id=0, length=72
User-Name = "test"
User-Password = "test123"
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-IP-Address = 127.0.0.1
NAS-Port = 983168
Calling-Station-Id = ""
State = 0x
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
radius_xlat:  'test'
rlm_nibs (sql_set_user): sql_set_user escaped user --> 'test'
rlm_nibs (nibs_fill_user): begin for user `test' ------------
radius_xlat:  'SELECT user, password, crypt_method, uid, gid, deposit, credit, unix_timestamp(add_date), blocked, activated, unix_timestamp(expired), total_time, total_traffic, total_money, unix_timestamp(last_connection), framed_ip, framed_mask, callback_number FROM radius_users WHERE user = 'test''
rlm_nibs (nibs): Reserving sql socket id: 60
rlm_nibs (sql_release_socket): Released sql socket id: 60
radius_xlat:  'SELECT tos, do_with_tos, direction, fixed, fixed_cost, activation_time, total_time_limit, month_time_limit, week_time_limit, day_time_limit, total_traffic_limit, month_traffic_limit, week_traffic_limit, day_traffic_limit, total_money_limit, month_money_limit, week_money_limit, day_money_limit, login_time, huntgroup_name, simultaneous_use, port_limit, session_timeout, idle_timeout, allowed_prefixes, no_pass, no_acct, allow_callback, other_params FROM radius_users WHERE user = 'test''
rlm_nibs (nibs_fill_user): ----- prof mode begin for user `test' -----
rlm_nibs (nibs): Reserving sql socket id: 59
rlm_nibs (sql_release_socket): Released sql socket id: 59
rlm_nibs (nibs_fill_user): ----- prof mode end for user `test' -----
rlm_nibs (nibs_fill_user): end for user `test' ------------
rlm_nibs (nibs_add_attrs): begin for user `test' ------------
rlm_nibs (nibs_add_attrs): add PW_PASSWORD
rlm_nibs (nibs_add_attrs): add PW_IDLE_TIMEOUT
rlm_nibs (nibs_add_attrs): add PW_SIMULTANEOUS_USE
rlm_nibs (nibs_add_attrs): add PW_SESSION_TIMEOUT
rlm_nibs (nibs_add_attrs): add all other params
rlm_nibs (nibs_add_attrs): end for user `test' ------------
  modcall[authorize]: module "nibs" returns ok for request 0
  modcall[authorize]: module "mschap" returns noop for request 0
modcall: group authorize returns ok for request 0
auth: type Local
auth: user supplied User-Password matches local User-Password
modcall: entering group session for request 0
radius_xlat:  'test'
rlm_nibs (sql_set_user): sql_set_user escaped user --> 'test'
radius_xlat:  'SELECT id, user, server, port, ip, protocol, last_change FROM radius_actions WHERE terminate_cause = 'Online' ORDER BY user'
rlm_nibs (nibs): Reserving sql socket id: 58
rlm_nibs (sql_release_socket): Released sql socket id: 58
radius_xlat:  'SELECT id, user, server, port, ip, call_from FROM radius_actions WHERE user = 'test' AND terminate_cause = 'Online''
rlm_nibs (nibs): Reserving sql socket id: 57
rlm_nibs (sql_release_socket): Released sql socket id: 57
  modcall[session]: module "nibs" returns ok for request 0
modcall: group session returns ok for request 0
Login OK: [test/test123] (from client localhost port 983168 cli )
modcall: entering group post-auth for request 0
radius_xlat:  'test'
rlm_nibs (sql_set_user): sql_set_user escaped user --> 'test'
rlm_nibs (nibs_fill_user): begin for user `test' ------------
radius_xlat:  'SELECT user, password, crypt_method, uid, gid, deposit, credit, unix_timestamp(add_date), blocked, activated, unix_timestamp(expired), total_time, total_traffic, total_money, unix_timestamp(last_connection), framed_ip, framed_mask, callback_number FROM radius_users WHERE user = 'test''
rlm_nibs (nibs): Reserving sql socket id: 56
rlm_nibs (sql_release_socket): Released sql socket id: 56
radius_xlat:  'SELECT tos, do_with_tos, direction, fixed, fixed_cost, activation_time, total_time_limit, month_time_limit, week_time_limit, day_time_limit, total_traffic_limit, month_traffic_limit, week_traffic_limit, day_traffic_limit, total_money_limit, month_money_limit, week_money_limit, day_money_limit, login_time, huntgroup_name, simultaneous_use, port_limit, session_timeout, idle_timeout, allowed_prefixes, no_pass, no_acct, allow_callback, other_params FROM radius_users WHERE user = 'test''
rlm_nibs (nibs_fill_user): ----- prof mode begin for user `test' -----
rlm_nibs (nibs): Reserving sql socket id: 55
rlm_nibs (sql_release_socket): Released sql socket id: 55
rlm_nibs (nibs_fill_user): ----- prof mode end for user `test' -----
rlm_nibs (nibs_fill_user): end for user `test' ------------
rlm_nibs (nibs_filter): begin for user 'test' ------------
rlm_nibs (nibs_filter): Expire filter for user 'test'
rlm_nibs (nibs_find_in_blacklist): Blacklist filter for user 'test'
rlm_nibs (nibs_find_in_blacklist): No telephone number for user 'test'
rlm_nibs (nibs_filter): end for user 'test' ------------
radius_xlat:  'rlm_nibs (rlm_nibs_postauth): User `test' login OK [127.0.0.1:983168]%s%s%s'
rlm_nibs (rlm_nibs_postauth): User `test' login OK [127.0.0.1:983168] ||
  modcall[post-auth]: module "nibs" returns ok for request 0
modcall: group post-auth returns ok for request 0
Sending Access-Accept of id 0 to 127.0.0.1:59350
Idle-Timeout = 600
Session-Timeout = 1000385488
Acct-Interim-Interval = 60
Service-Type = Framed-User
Framed-Protocol = PPP
Framed-Compression = Van-Jacobson-TCP-IP
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 127.0.0.1:64306, id=1, length=97
User-Name = "test"
NAS-IP-Address = 127.0.0.1
NAS-Port = 983168
Calling-Station-Id = ""
State = 0x
Acct-Status-Type = Start
Acct-Session-Id = "127.0.0.1 cuaa0 [853] Thu Sep 15 15:49:49 2005\n"
modcall: entering group preacct for request 1
  modcall[preacct]: module "preprocess" returns noop for request 1
modcall: group preacct returns noop for request 1
modcall: entering group accounting for request 1
rlm_acct_unique: Hashing 'NAS-Port = 983168,NAS-IP-Address = 127.0.0.1,Acct-Session-Id = "127.0.0.1 cuaa0 [853] Thu Sep 15 15:49:49 2005\n",User-Name = "test"'
rlm_acct_unique: Acct-Unique-Session-ID = "fba0572d3aba3ab6".
  modcall[accounting]: module "acct_unique" returns ok for request 1
radius_xlat:  '/usr/local/freeradius/var/log/radius/radacct/127.0.0.1/detail-20050915'
rlm_detail: /usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /usr/local/freeradius/var/log/radius/radacct/127.0.0.1/detail-20050915
  modcall[accounting]: module "detail" returns ok for request 1
  modcall[accounting]: module "unix" returns ok for request 1
radius_xlat:  '/usr/local/freeradius/var/log/radius/radutmp'
radius_xlat:  'test'
  modcall[accounting]: module "radutmp" returns ok for request 1
radius_xlat:  'test'
rlm_nibs (sql_set_user): sql_set_user escaped user --> 'test'
rlm_nibs (nibs_fill_user): begin for user `test' ------------
radius_xlat:  'SELECT user, password, crypt_method, uid, gid, deposit, credit, unix_timestamp(add_date), blocked, activated, unix_timestamp(expired), total_time, total_traffic, total_money, unix_timestamp(last_connection), framed_ip, framed_mask, callback_number FROM radius_users WHERE user = 'test''
rlm_nibs (nibs): Reserving sql socket id: 54
rlm_nibs (sql_release_socket): Released sql socket id: 54
radius_xlat:  'SELECT tos, do_with_tos, direction, fixed, fixed_cost, activation_time, total_time_limit, month_time_limit, week_time_limit, day_time_limit, total_traffic_limit, month_traffic_limit, week_traffic_limit, day_traffic_limit, total_money_limit, month_money_limit, week_money_limit, day_money_limit, login_time, huntgroup_name, simultaneous_use, port_limit, session_timeout, idle_timeout, allowed_prefixes, no_pass, no_acct, allow_callback, other_params FROM radius_users WHERE user = 'test''
rlm_nibs (nibs_fill_user): ----- prof mode begin for user `test' -----
rlm_nibs (nibs): Reserving sql socket id: 53
rlm_nibs (sql_release_socket): Released sql socket id: 53
rlm_nibs (nibs_fill_user): ----- prof mode end for user `test' -----
rlm_nibs (nibs_fill_user): end for user `test' ------------
radius_xlat:  'SELECT time_on, in_bytes, out_bytes, unix_timestamp(start_time), billing_minus, hour_in_bytes, hour_out_bytes, hour_traffic_money, last_change FROM radius_actions WHERE id = '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn' AND unique_id = 'fba0572d3aba3ab6' AND server = '127.0.0.1' AND port = 983168 AND user = 'test' AND terminate_cause='Online''
rlm_nibs (nibs): Reserving sql socket id: 52
rlm_nibs (sql_release_socket): Released sql socket id: 52
radius_xlat:  'INSERT INTO radius_actions (gid, id, unique_id, user, server, port, client_ip, protocol, ip, call_to, call_from, terminate_cause, connect_info, start_time, last_change, before_billing) VALUES (%d, '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn', 'fba0572d3aba3ab6', 'test', '127.0.0.1', 983168, '127.0.0.1', '', '', '', '', 'Online', '', '2005-09-15 15:49:49', 1126784989, %8.6f)'
rlm_nibs (nibs): Reserving sql socket id: 51
rlm_nibs (sql_release_socket): Released sql socket id: 51
  modcall[accounting]: module "nibs" returns ok for request 1
modcall: group accounting returns ok for request 1
Sending Accounting-Response of id 1 to 127.0.0.1:64306
Finished request 1
Going to the next request
Cleaning up request 1 ID 1 with timestamp 43295fdd
rl_next:  returning NULL
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 0 with timestamp 43295fdd
Nothing to do.  Sleeping until we see a request.
rad_recv: Accounting-Request packet from host 127.0.0.1:63188, id=2, length=103
User-Name = "test"
NAS-IP-Address = 127.0.0.1
NAS-Port = 983168
Calling-Station-Id = ""
State = 0x
Acct-Status-Type = Stop
Acct-Session-Id = "127.0.0.1 cuaa0 [853] Thu Sep 15 15:49:49 2005\n"
Acct-Session-Time = 32
modcall: entering group preacct for request 2
  modcall[preacct]: module "preprocess" returns noop for request 2
modcall: group preacct returns noop for request 2
modcall: entering group accounting for request 2
rlm_acct_unique: Hashing 'NAS-Port = 983168,NAS-IP-Address = 127.0.0.1,Acct-Session-Id = "127.0.0.1 cuaa0 [853] Thu Sep 15 15:49:49 2005\n",User-Name = "test"'
rlm_acct_unique: Acct-Unique-Session-ID = "fba0572d3aba3ab6".
  modcall[accounting]: module "acct_unique" returns ok for request 2
radius_xlat:  '/usr/local/freeradius/var/log/radius/radacct/127.0.0.1/detail-20050915'
rlm_detail: /usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /usr/local/freeradius/var/log/radius/radacct/127.0.0.1/detail-20050915
  modcall[accounting]: module "detail" returns ok for request 2
  modcall[accounting]: module "unix" returns ok for request 2
radius_xlat:  '/usr/local/freeradius/var/log/radius/radutmp'
radius_xlat:  'test'
  modcall[accounting]: module "radutmp" returns ok for request 2
radius_xlat:  'test'
rlm_nibs (sql_set_user): sql_set_user escaped user --> 'test'
rlm_nibs (nibs_fill_user): begin for user `test' ------------
radius_xlat:  'SELECT user, password, crypt_method, uid, gid, deposit, credit, unix_timestamp(add_date), blocked, activated, unix_timestamp(expired), total_time, total_traffic, total_money, unix_timestamp(last_connection), framed_ip, framed_mask, callback_number FROM radius_users WHERE user = 'test''
rlm_nibs (nibs): Reserving sql socket id: 50
rlm_nibs (sql_release_socket): Released sql socket id: 50
radius_xlat:  'SELECT tos, do_with_tos, direction, fixed, fixed_cost, activation_time, total_time_limit, month_time_limit, week_time_limit, day_time_limit, total_traffic_limit, month_traffic_limit, week_traffic_limit, day_traffic_limit, total_money_limit, month_money_limit, week_money_limit, day_money_limit, login_time, huntgroup_name, simultaneous_use, port_limit, session_timeout, idle_timeout, allowed_prefixes, no_pass, no_acct, allow_callback, other_params FROM radius_users WHERE user = 'test''
rlm_nibs (nibs_fill_user): ----- prof mode begin for user `test' -----
rlm_nibs (nibs): Reserving sql socket id: 49
rlm_nibs (sql_release_socket): Released sql socket id: 49
rlm_nibs (nibs_fill_user): ----- prof mode end for user `test' -----
rlm_nibs (nibs_fill_user): end for user `test' ------------
radius_xlat:  'SELECT time_on, in_bytes, out_bytes, unix_timestamp(start_time), billing_minus, hour_in_bytes, hour_out_bytes, hour_traffic_money, last_change FROM radius_actions WHERE id = '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn' AND unique_id = 'fba0572d3aba3ab6' AND server = '127.0.0.1' AND port = 983168 AND user = 'test' AND terminate_cause='Online''
rlm_nibs (nibs): Reserving sql socket id: 48
rlm_nibs (sql_release_socket): Released sql socket id: 48
radius_xlat:  'UPDATE radius_actions SET terminate_cause = 'Online', stop_time = 0, id = '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn', unique_id = 'fba0572d3aba3ab6' WHERE id LIKE '%127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn' AND unique_id LIKE '%fba0572d3aba3ab6' AND server = '127.0.0.1' AND port = 983168 AND user = 'test' AND terminate_cause = 'Offline' AND (-10 <= (unix_timestamp(start_time) - (1126785021 - 32))) AND ((unix_timestamp(start_time) - (1126785021 - 32)) <= 10)'
rlm_nibs (nibs): Reserving sql socket id: 47
rlm_nibs (sql_release_socket): Released sql socket id: 47
radius_xlat:  'SELECT time_on, in_bytes, out_bytes, unix_timestamp(start_time), billing_minus, hour_in_bytes, hour_out_bytes, hour_traffic_money, last_change FROM radius_actions WHERE id = '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn' AND unique_id = 'fba0572d3aba3ab6' AND server = '127.0.0.1' AND port = 983168 AND user = 'test' AND terminate_cause='Online''
rlm_nibs (nibs): Reserving sql socket id: 46
rlm_nibs (sql_release_socket): Released sql socket id: 46
radius_xlat:  'INSERT INTO radius_actions (gid, id, unique_id, user, server, port, client_ip, protocol, ip, call_to, call_from, terminate_cause, connect_info, start_time, last_change, before_billing) VALUES (%d, '127.0.0.1 cuaa0 =5B853=5D Thu Sep 15 15:49:49 2005=5Cn', 'fba0572d3aba3ab6', 'test', '127.0.0.1', 983168, '127.0.0.1', '', '', '', '', 'Online', '', from_unixtime(1126785021 - %d), 1126785021, %8.6f)'
rlm_nibs (nibs): Reserving sql socket id: 45
rlm_nibs_mysql: MYSQL check_error: 1062 received
rlm_nibs (rlm_nibs_accounting): Couldn't finish `accounting_start_query_alt' for user `test' - database error `Duplicate entry 'fba0572d3aba3ab6' for key 1'
rlm_nibs (sql_release_socket): Released sql socket id: 45
  modcall[accounting]: module "nibs" returns fail for request 2
modcall: group accounting returns fail for request 2
Finished request 2
Going to the next request
--- Walking the entire request list ---
Cleaning up request 2 ID 2 with timestamp 43295ffd
Nothing to do.  Sleeping until we see a request.

В чём могут быть грабли?

Заранее спасибо!

  Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

 Оглавление

Индекс форумов | Темы | Пред. тема | След. тема
Сообщения по теме

1. "database error `Duplicate entry 'aba56a4e302fbde1' for key 1..." 
Сообщение от NoName Искать по авторуВ закладки on 15-Сен-05, 18:23  (MSK)
Судя по всему у вас повреждена база freenibs. Пересоздайте ее ( нас сколько я понимаю вы сейчас в тестовом режиме...)
используйте drop database для уничтожения существующей.


PS попробуйте осуществить подключение от root (я имею в виду подключение к MySQL


MyHomePage - http://surgutnet.ru

  Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

2. "database error `Duplicate entry 'aba56a4e302fbde1' for key 1..." 
Сообщение от IPKILLER Искать по авторуВ закладки(??) on 15-Сен-05, 22:24  (MSK)
>Судя по всему у вас повреждена база freenibs. Пересоздайте ее ( нас
>сколько я понимаю вы сейчас в тестовом режиме...)
>используйте drop database для уничтожения существующей.
>
>
>PS попробуйте осуществить подключение от root (я имею в виду подключение к
>MySQL
>
>
>MyHomePage - http://surgutnet.ru
Базу я пересоздавал и подключения к базе у меня от root`а - результат тотже. Правда базу я удалял через phpMyAdmin.

  Удалить Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх


Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ]
Пожалуйста, прежде чем написать сообщение, ознакомьтесь с данными рекомендациями.




Спонсоры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2022 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру