Any idea what is the cause of this error & how to fix this?

[INSERT INTO `ostjobs_thread_referral` SET `thread_id` = 122117, `object_id` = 34, `object_type` = 'D', `created` = NOW()]

Duplicate entry '34-D-122117' for key 'ref'<br />


<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(207): osTicket->logDBError()<br />
#1 (root)/include/class.orm.php(3482): db_query()<br />
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()<br />
#3 (root)/include/class.thread.php(1961): VerySimpleModel->save()<br />
#4 (root)/include/class.thread.php(380): ThreadReferral::create()<br />
#5 (root)/include/class.ticket.php(3039): Thread->refer()<br />
#6 (root)/include/class.thread.php(1418): Ticket->systemReferral()<br />
#7 (root)/include/class.mailfetch.php(880): ThreadEntry::lookupByEmailHeaders()<br />
#8 (root)/include/class.mailfetch.php(955): MailFetcher->createTicket()<br />
#9 (root)/include/class.mailfetch.php(1035): MailFetcher->fetchEmails()<br />
#10 (root)/include/class.cron.php(25): MailFetcher::run()<br />
#11 (root)/include/class.cron.php(111): Cron::MailFetcher()<br />
#12 (root)/include/api.cron.php(19): Cron::run()<br />
#13 (root)/include/api.cron.php(40): CronApiController->run()<br />
#14 (root)/api/cron.php(23): LocalCronApiController::call()<br />
#15 {main}

Thanks

    rsclmumbai

    Just a duplicate entry warning. Trying to insert data that already exists. This can be ignored unless it happens a lot.

    Cheers.

      rsclmumbai

      Debug what’s going on. You may have email routing issues or something. It keeps trying to refer emails to to other Departments because it’s seeing another system email connected to another department in the headers and trying to refer when it already exists.

      Make sure you are running the latest version.

      Cheers.

      a month later

      This has been happening for me 2-3 times per day.

      [INSERT INTOost_thread_referralSETthread_id= 264526,object_id= 19,object_type= 'D',created= NOW()]
      Duplicate entry '19-D-264526' for key 'ost_thread_referral.ref'<br />
      <br />
      ---- Backtrace ----<br />
      #0 (root)/include/mysqli.php(207): osTicket->logDBError()<br />
      #1 (root)/include/class.orm.php(3482): db_query()<br />
      #2 (root)/include/class.orm.php(658): MySqlExecutor->execute()<br />
      #3 (root)/include/class.thread.php(1961): VerySimpleModel->save()<br />
      #4 (root)/include/class.thread.php(380): ThreadReferral::create()<br />
      #5 (root)/include/class.ticket.php(3039): Thread->refer()<br />
      #6 (root)/include/class.thread.php(588): Ticket->systemReferral()<br />
      #7 (root)/include/class.thread.php(910): Thread->postEmail()<br />
      #8 (root)/include/class.mailfetch.php(882): ThreadEntry->postEmail()<br />
      #9 (root)/include/class.mailfetch.php(955): MailFetcher->createTicket()<br />
      #10 (root)/include/class.mailfetch.php(1035): MailFetcher->fetchEmails()<br />
      #11 (root)/include/class.cron.php(25): MailFetcher::run()<br />
      #12 (root)/include/class.cron.php(111): Cron::MailFetcher()<br />
      #13 (root)/include/api.cron.php(19): Cron::run()<br />
      #14 (root)/include/api.cron.php(40): CronApiController->run()<br />
      #15 (root)/api/cron.php(23): LocalCronApiController::call()<br />
      #16 {main}

      Given the above information that I get via the alert email, how can I trace back to the Ticket Number / Email Address that is being fetched?

      Data Available: thread_id = 264526
      Data to find: Ticket Number

      Thanks

        Write a Reply...