Any idea about Replication (Duplicate Entry)

21 views
Skip to first unread message

Tevfik Ceydeliler

unread,
Aug 5, 2015, 9:25:55 AM8/5/15
to privacyidea
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?

Tevfik Ceydeliler

unread,
Aug 5, 2015, 10:04:57 AM8/5/15
to privacyidea
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ı:

Cornelius Kölbel

unread,
Aug 6, 2015, 1:40:24 AM8/6/15
to priva...@googlegroups.com
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
Cornelius
> --
> 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...@googlegroups.com.
> To post to this group, send email to priva...@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
corneliu...@netknights.it
+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
Reply all
Reply to author
Forward
0 new messages