Ad Widget

Collapse

"SQL statement execution has failed" at login screen.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex_vy
    Junior Member
    • Apr 2020
    • 5

    #1

    "SQL statement execution has failed" at login screen.

    Hi all,


    My Zabbix VM (Ubuntu/MySQL/apache) had a full hard drive recently, which caused MySQLd to stop, and of course the whole Zabbix environment.

    I cleared some data to start it again, so I could do some cleanup from the inside.
    Unfortunately, now I'm confronted with the following issue when trying to log in:
    Code:
    SQL statement execution has failed "INSERT INTO sessions (sessionid,userid,lastaccess,status) VALUES ('45638099965b4f61de9965a66673cc3e','10','1600874767','0')".
    Click image for larger version

Name:	Schermafbeelding 2020-09-23 om 17.26.25.png
Views:	6417
Size:	68.7 KB
ID:	409593

    Something obviously went wrong with the database.
    Does anyone know what steps I could take to fix this issue?

    Many thanks in advance,
    Alex

  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Do you allow the database connection user permission to update the database for Zabbix?
    ex.
    Code:
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    Zabbix is being downloaded over 4 000 000 times every year for a reason. Download and install Zabbix for free and try it yourself!

    Comment

    • alex_vy
      Junior Member
      • Apr 2020
      • 5

      #3
      Originally posted by Atsushi
      Do you allow the database connection user permission to update the database for Zabbix?
      ex.
      Code:
      mysql> grant all privileges on zabbix.* to zabbix@localhost;
      Zabbix is being downloaded over 4 000 000 times every year for a reason. Download and install Zabbix for free and try it yourself!
      I tried this now, but I'm still faced with the same error when trying to login as the admin.
      When I try to login as an LDAP user, I get the following error:
      Code:
      [LIST][*]SQL statement execution has failed "INSERT INTO sessions (sessionid,userid,lastaccess,status) VALUES ('9afa2e92d9cf16b32a5ea191952b70d8','10','16009380 26','0')".[/LIST]
      Click image for larger version

Name:	Screen Shot 2020-09-24 at 11.00.34.png
Views:	6448
Size:	31.8 KB
ID:	409641

      I'm unsure what is going on with the database. Any troubleshooting idea's to figure this out?

      Kind regards,
      Alex

      Comment

      • provels
        Member
        • Apr 2020
        • 93

        #4
        I think I had a similar issue after running out of disk space.
        Take a look at this thread. https://www.zabbix.com/forum/zabbix-...ory Scroll down to Post #10.

        In short, you need to:
        1. Increase the disk space available to the VM.
        2. Create a new partition in the available space.
        3. Add the new partition to the existing volume.
        4. Extend the file system over the extended volume.

        Hope this helps.

        Comment

        • alex_vy
          Junior Member
          • Apr 2020
          • 5

          #5
          Originally posted by provels
          I think I had a similar issue after running out of disk space.
          Take a look at this thread. https://www.zabbix.com/forum/zabbix-...ory Scroll down to Post #10.

          In short, you need to:
          1. Increase the disk space available to the VM.
          2. Create a new partition in the available space.
          3. Add the new partition to the existing volume.
          4. Extend the file system over the extended volume.

          Hope this helps.
          Hi Provels,

          Yes, this was part of the solution. I the meantime I've managed to add the partition to the volume, so space is fine.

          The issue itself however was an extra line I added to mySQL's conf file previously. After deleting this, all is back to normal.

          Thanks for the help!
          Alex

          Comment


          • tashihyolmo01
            tashihyolmo01 commented
            Editing a comment
            Hi alex

            Can you please elaborate the solution.
            how did u exactly do to solve the problem?

            regards;
        Working...