Jump to content
Froxlor Forum
  • 0

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '209' for key 'PRIMARY'


Question

Running the cron today delivered me an email with:

Quote

froxlor[5842]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '209' for key 'PRIMARY'
froxlor[5842]: --- DEBUG:
#0 /var/www/froxlor/lib/Froxlor/Database/Database.php(83): PDOStatement->execute(Array)
#1 /var/www/froxlor/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php(368): Froxlor\Database\Database::pexecute(Object(PDOStatement), Array)
#2 /var/www/froxlor/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php(296): Froxlor\Cron\Http\LetsEncrypt\AcmeSh::runAcmeSh(Array, Array, 'issue', Object(Froxlor\FroxlorLogger), 1, false)
#3 /var/www/froxlor/lib/Froxlor/Cron/Http/HttpConfigBase.php(37): Froxlor\Cron\Http\LetsEncrypt\AcmeSh::run(true)
#4 /var/www/froxlor/lib/Froxlor/Cron/System/TasksCron.php(148): Froxlor\Cron\Http\HttpConfigBase->init()
#5 /var/www/froxlor/lib/Froxlor/Cron/System/TasksCron.php(52): Froxlor\Cron\System\TasksCron::rebuildWebserverConfigs()
#6 /var/www/froxlor/lib/Froxlor/Cron/MasterCron.php(111): Froxlor\Cron\System\TasksCron::run()
#7 /var/www/froxlor/scripts/froxlor_master_cronjob.php(20): Froxlor\Cron\MasterCron::run()
#8 {main}
We are sorry, but a MySQL - error occurred. The administrator may find more information in the syslog

The syslog itself didn't show more, database integrity check said everything is okay, and a --force --debug runs through until a specific domain is ready for Let's Encrypt.
(always the same)

So i had a look at the database around the specific domain, but no duplicate entries found 😕

How to fix that?
 

edit:
now some steps further, in domain_ssl_settings there are some entries which have the same domainid, might this be the issue? If yes, which one to delete?

 


THX

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
21 minutes ago, lonesomewalker said:

edit:
now some steps further, in domain_ssl_settings there are some entries which have the same domainid, might this be the issue? If yes, which one to delete?

Yes, there can of course only be ONE certificate per domain. no idea how you managed to get around that but the database design does not allow that.

The entries should have a date in the field "expirationdate" - just keep the one that expires the latest

Link to post
Share on other sites
  • 0
Just now, lonesomewalker said:

Ewww... is this right?
There are two tables: panel_domains and panel_domainss

no of course not...

1 minute ago, lonesomewalker said:

I have never seen that in the past, how can this happen, and how to fix that? 😬

Cannot tell you how, I'm not your system admin. 'panel_domainss' it not part of froxlor.

11 minutes ago, lonesomewalker said:

Okay, deleted the duplicated ones with older timestamps -> still the SQL error 😕
Since the debug message says acme, this should be somewhat related to SSL, right?

delete all of the dupliactes. You somehow seem to have managed to let froxlor think the domain should get a new entry instead of an update...very very bizarre...not idea how you've managed that. But given your additional table problem I'd suggest you check your system thoroughly

Link to post
Share on other sites
  • 0

Okay, the duplicated table is solved; old backup.

The ugly part: i think the SSL stuff can be solved by just deleting ALL the entries and do a full recreation.
Unfortunately there is a rate limit...

Any possibility to find the one duplicate?
Already did a full search in the table, no duplicate so far.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...