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

10.rc3 DB Error #1062

Hello,

v1.10-rc.3 (907ec36) 
MariaDB 10.0.27
PHP 5.6.24-0+deb8u1

time to time agent unable to login, in log such errors, helps only clear "sessions" table in db...


[INSERT INTO `ost_session` SET `session_id` = 'dpkq2csfk76fdsebo4r8l20083', `session_data` = 'csrf|a:2:{s:5:\"token\";s:40:\"f044cebc96b65936b20a1d56aa8a71eb4161b5cb\";s:4:\"time\";i:1473624490;}', `session_expire` = NOW() + INTERVAL 86400 SECOND, `user_ip` = '1.2.3.4', `user_agent` = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/601.7.8'] Duplicate entry 'dpkq2csfk76fdsebo4r8l20083' for key 'PRIMARY'

 ---- Трассировка ----
 #0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')
 #1 (root)/include/class.orm.php(3121): db_query('INSERT INTO `os...', true, true)
 #2 (root)/include/class.orm.php(596): MySqlExecutor->execute()
 #3 (root)/include/class.ostsession.php(216): VerySimpleModel->save()
 #4 (root)/include/class.ostsession.php(158): DbSessionBackend->update('dpkq2csfk76fdse...', 'csrf|a:2:{s:5:"...')
 #5 [internal function]: SessionBackend->write('dpkq2csfk76fdse...', 'csrf|a:2:{s:5:"...')
 #6 [internal function]: session_write_close()
 #7 {main}



Comments

  • Although the devs have asked the issue reports for th1 1.10 beta be posted to github I have back channel reported this thread to the devs to take a look at.  You still might be better served reporting it on github at: https://github.com/osTicket/osTicket/issues/new

    As a side note I have not seen this error in my test bed.  You might want to try removing the duplicate entry from the ost_session table and see if it helps.


  • The only solution is to clean ost_settion table
    but after some time this error appears...
    looks like if user try to connect from another ip address from same pc...
  • Are you running cron.php regularly?
  • yes, each 5 minutes

    */5 *   * * *   www-data        /usr/bin/php5 /var/www/helpdesk/docs/api/cron.php
  • Did you upgrade to the 1.10 stable or are you still using a Release Candidate?  If you haven't.... you should upgrade..
  • using  v1.10 (901e5ea) —  Up to date
  • This doesn't look right:
    /var/www/helpdesk/docs/api/cron.php

    the api is at OSTICKET_ROOT/api/cron.php so are you sure thats correct?
Sign In or Register to comment.