Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

DB Error #1062 on insert into ost_user_email table

Fair warning ... I'm a relatively new user to osTicket (pretty impressed so far though).

Last night I got two emails indicating that there was a DB error #1062 on my system.

Both emails had the same timestamp and contents.

The error email contained the following:

[INSERT INTO ost_user_email SET address = 'newsletter@duhokotu.com']

Duplicate entry 'newsletter@duhokotu.com' for key 'address'

---- Backtrace ----
#0 (root)/include/mysqli.php(177): osTicket->logDBError('DB Error #1062', '[INSERT INTO os...')
#1 (root)/include/class.orm.php(221): db_query('INSERT INTO ost...')
#2 (root)/include/class.user.php(781): VerySimpleModel->save()
#3 (root)/include/class.user.php(173): UserEmail::ensure('newsletter@duho...')
#4 (root)/include/class.ticket.php(2516): User::fromVars(Array)
#5 (root)/include/class.mailfetch.php(737): Ticket::create(Array, Array, 'Email')
#6 (root)/include/class.mailfetch.php(785): MailFetcher->createTicket(1)
#7 (root)/include/class.mailfetch.php(865): MailFetcher->fetchEmails()
#8 (root)/include/class.cron.php(25): MailFetcher->run()
#9 (root)/include/class.cron.php(98): Cron->MailFetcher()
#10 (root)/include/api.cron.php(19): Cron->run()
#11 (root)/include/api.cron.php(12): CronApiController->run()
#12 [internal function]: CronApiController->execute()
#13 (root)/include/class.dispatcher.php(145): call_user_func_array(Array, Array)
#14 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('cron', Array)
#15 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('cron', Array)
#16 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/tasks/cron', NULL)
#17 (root)/api/http.php(31): Dispatcher->resolve('/tasks/cron')
#18 {main}


I checked the ost_user_email table and there was already a record for 'newsletter@duhokotu.com' .

I'm running osTicket 1.9.4 on a Centos 6 system.  MySQL 5.5.39, PHP 5.5.19, & Apache 2.2.15.

Not sure if it's significant but the schema signature is ' b26f29a6bb5dbb3510b057632182d138'.

The error log in the admin panel shows the same two errors.

Any suggestions?

Thanks!

david
Tagged:

Comments

  • Looks like someone tried to register an account for an address that already had an account to me.
  • This 'registration' came in through email.
  • Actually, now that I think about it it a bit more ... it could be a coincidental activity collision.

    I have my mail server running on one system and osTicket running on another.

    On the system running ost, I have normal cron setup to run the appropriate php script locally.

    On the mail server I setup incron to monitor my support mailbox file and run the cron script via a web request when the mailbox file is modified.

    It could have been a situation where the regular cron task fired at the same time that a mail came in, which caused the mail file to be modified, thus causing incron to fire the web request twice.

    I've disabled the mailbox monitoring process (via incron) on my mail server and I'll see if the problem reoccurs.

  • also IF osT gets an email from someone and it doesn't match one that exists it creates a guest user and associates the email address with that guest user.
Sign In or Register to comment.