1 Reply Latest reply on Sep 16, 2011 8:17 PM by Rick.Smith1

    ERROR 1016 (HY000) at line 1: Can't open file: 'logs.MYI' (errno: 145)

    Rick.Smith1 Expert

      We've been having issues with our Gateway for some time now. In an effort to identify why we had the problems, we tried to look at the system logs of the gateway through the management console. We were unable to get any information, so following this article http://kb.landesk.com/support/docs/DOC-3191 we atempted to export the management gateway logs to identify the problem.


      The commands simply returned an error and we submitted a case to LANDesk and tried to work with our TAM to figure out the problem.


      [[email protected] tmp]$ lslog > logs.txt

      ERROR 1016 (HY000) at line 1: Can't open file: 'logs.MYI' (errno: 145)

      ERROR 1016 (HY000) at line 1: Can't open file: 'logs.MYI' (errno: 145)


      Here is what I was later able to determine.


      1. Removed a debug log that was 27 GB in file size.
        1. http://community.landesk.com/support/docs/DOC-2344
      2. Disable the debug log from being created in the first place.
        1. http://community.landesk.com/support/docs/DOC-5139
      3. Determined that the logs.MYI were related to the SYSLOG database on the gateway.
      4. Obtained the Username\password to MySQL, see step 9 1-3 (NOT 4, actually if you run 4 you will get an error about not being able to read the logs.MYI file)
        1. http://community.landesk.com/support/docs/DOC-2344
      5. Fixed logs.myi corruption issue
        1. Stopped the mysqld
          1. /etc/initd/mysqld stop
        2. Use myisamchk to repair the logs.myi
          1. myisamchk -r /var/lib/mysql/syslog/logs.MYI -t /var/temp -f (NOTE: You will need to create the directory 'temp' under var. This avoids filling up your / directory. If you get out of drive space errors under /tmp this is because you did not use the -t /var/temp OR your /var is full, which is another problem)
        3. Start the mysqld service
          1. /etc/initd/mysqld start


      If your not comfortable with Linux or MySQL, then you probably will not want to mess with this at all, but atleast this can be used as a reference for the LANDesk support teams and anyone who is comfortable with Linux and MySQL. You might get permission problems, if you dont know what 'sudo sh' does you might want to stop fixing this on your own and let LANDesk support do it.


      And seriously, who doesnt create a seperate /tmp partition to avoid the problems of filling up the / partition.