Any idea about Replication (Duplicate Entry)

Hi,
sorry if I write down wrong forum.
But,
When I Try to enroll HOTP or TOTP, I get this error:

Last_Error: Error ‘Duplicate entry ‘870’ for key ‘PRIMARY’’ on query.
Default database: ‘pi’. Query: ‘INSERT INTO pidea_audit (date, signature,
action, success, serial, token_type, user, realm, administrator,
action_detail, info, privacyidea_server, client, loglevel, clearance_level)
VALUES (‘2015-08-05 16:18:59’, ‘’, ‘GET /token/’, 1, ‘**’, NULL, NULL,
NULL, ‘admin’, ‘’, ‘realm: [’*’]’, ‘10.43.1.54’, ‘10.65.8.100’, NULL,
NULL)’

I ask here because of it is related about pi database.
Any idea?

Hi,
Ifound some workaround.
If we are sure there will be no inconsistency we can add this line on
/etc/mysql/my.cnf:
slave-skip-errors = 1062
1062 comes from SHOW SLAVE STATUS\G command
Last_Errno: 1062

then restart mysql service

5 Ağustos 2015 Çarşamba 16:25:55 UTC+3 tarihinde Tevfik Ceydeliler yazdı:>

Hi,
sorry if I write down wrong forum.
But,
When I Try to enroll HOTP or TOTP, I get this error:

Last_Error: Error ‘Duplicate entry ‘870’ for key ‘PRIMARY’’ on query.
Default database: ‘pi’. Query: ‘INSERT INTO pidea_audit (date, signature,
action, success, serial, token_type, user, realm, administrator,
action_detail, info, privacyidea_server, client, loglevel, clearance_level)
VALUES (‘2015-08-05 16:18:59’, ‘’, ‘GET /token/’, 1, ‘**’, NULL, NULL,
NULL, ‘admin’, ‘’, ‘realm: ['*']’, ‘10.43.1.54’, ‘10.65.8.100’, NULL,
NULL)’

I ask here because of it is related about pi database.
Any idea?

Hello,

you can also move the audit log to another SQL database, which is not
replicated and does not disturb the performance of the originial token
database.

Use the PI_AUDIT_SQL_URI in pi.cfg to specifiy another audit locaton.

http://privacyidea.readthedocs.org/en/latest/modules/audit.html?highlight=pi_audit_sql_uri#sql-audit-module

Kind regards
CorneliusAm Mittwoch, den 05.08.2015, 07:04 -0700 schrieb Tevfik Ceydeliler:

Hi,
Ifound some workaround.
If we are sure there will be no inconsistency we can add this line
on /etc/mysql/my.cnf:
slave-skip-errors = 1062
1062 comes from SHOW SLAVE STATUS\G command
Last_Errno: 1062

then restart mysql service

5 Ağustos 2015 Çarşamba 16:25:55 UTC+3 tarihinde Tevfik Ceydeliler
yazdı:
Hi,
sorry if I write down wrong forum.
But,
When I Try to enroll HOTP or TOTP, I get this error:

    Last_Error: Error 'Duplicate entry '870' for key 'PRIMARY'' on
    query. Default database: 'pi'. Query: 'INSERT INTO pidea_audit
    (date, signature, action, success, serial, token_type, user,
    realm, administrator, action_detail, info, privacyidea_server,
    client, loglevel, clearance_level) VALUES ('2015-08-05
    16:18:59', '', 'GET /token/', 1, '**', NULL, NULL, NULL,
    'admin', '', 'realm: [\'*\']', '10.43.1.54', '10.65.8.100',
    NULL, NULL)'
    
    
    
    I ask here because of it is related about pi database.
    Any idea?


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/d437c645-3756-4dea-a4d5-9b8043f556ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)