Announcement

Collapse
No announcement yet.

MQTT Plugin: Initializing plug-in(2): MQTT Instance::unable to open database file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MQTT Plugin: Initializing plug-in(2): MQTT Instance::unable to open database file

    Problem Statement

    MQTT Plugin isn't initializing and never shows up in the list PLUG-INS.

    Warning message on PLUG-INS web page

    WARNING: Failed getting InterfaceStatus from MQTT - the interface was not found in the list of active interfaces, the list may need to be refreshed.

    The following message shows up in the HS3 startup screen:

    Initializing plug-in(2): MQTT Instance::unable to open database fileSTACK: Server stack trace: Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.InitIO(String port) at Scheduler.clsHSPI.CheckInterfaces()


    Platform Summary

    Windows 10 Home
    HS3 Pro Edition 3.0.0.368
    1.5.0.0: MQTT

    The Gory Details

    I have attached a more detailed problem summary, complete with screenshots, detailed diagnostic information, what I have done so far to try and fix it, and more, as a PDF file.

    I am posting this question in both locations below and will post the answer, when available, in both as well.
    - https://www.domoticaforum.eu/viewtopic.php?f=74&t=10525
    - https://forums.homeseer.com/forumdisplay.php?f=620

    Thanks in advance for the assistance!

    Jason
    Attached Files
    Last edited by jjason; December 5, 2017, 02:58 AM. Reason: Changing to solved after posting solution

    #2
    I think your problem may be similar to mine, although I am on the Hometroller Z, which is linux. I wrote up what finally helped me and solved my issue of installation and initialization> Go to:
    https://forums.homeseer.com/showthre...=185697&page=3
    post 52.

    It was finally an issue of permissions, once I got the databases installed, which didn't happen for me when I installed from the Homeseer site

    Hope this helps
    Bruce

    Comment


      #3
      Thank for the very quick reply. I read your posting, and those on the DomaticaForum Europe, before I posted.

      If I understand correctly, you are running on a Raspberry PI (Linux) and had permissions issues. I'm running on Windows 10 Home, all the files are present, and I can read the database with the sqlite DB Browser myself. In short, I think I have a new problem with similar errors.

      If I'm missing something simple here, PLEASE correct me! I will not be offended in any way whatsoever - I have spent far too much time trying to debug this!

      Thanks!

      Jason

      Comment


        #4
        Originally posted by jjason View Post
        Thank for the very quick reply. I read your posting, and those on the DomaticaForum Europe, before I posted.

        If I understand correctly, you are running on a Raspberry PI (Linux) and had permissions issues. I'm running on Windows 10 Home, all the files are present, and I can read the database with the sqlite DB Browser myself. In short, I think I have a new problem with similar errors.

        If I'm missing something simple here, PLEASE correct me! I will not be offended in any way whatsoever - I have spent far too much time trying to debug this!

        Thanks!

        Jason

        Can you stop HS3 then right click on the HS3 icon and set the user permissions in the properties ===> Compatibility for the users to run as administrator (indeed this should happen during HS3 installation to install for all users ====> Windows only!). This should take care of all the HS3 folder contents.

        Then make sure developer mode is not enabled in the updater.
        Restart HomeSeer and enable the plugin but also don't forget to check Windows fire wall. I think that should fix it.


        Eman.
        TinkerLand : Life's Choices,"No One Size Fits All"

        Comment


          #5
          Eman,

          Thank you for the good advice!

          Here is what I found:
          1. HS3 was NOT running as administrator - fixed.
          2. HS3 was already in the firewall.
          3. Developer mode is disabled in the plugin menu.

          Results: Still have the same issue. No change.

          Comment


            #6
            The error says it cannot open the database file when InitIO is called from HS3, so I'd start there. Obviously it's "there" since you can open it with the SQL browser, so perhaps it's the permissions. Also might be an error opening the MQTT ini file but I believe HS3 would intercept that error and give you a more "friendly" message (and exit) than this does.

            A SQLite problem should throw some sqlite dll errors I would think, so probably not that. The sqlite db file is first opened in InitIO (when it calls the MQTT.start process which eventually calls the CheckTables function) which is where it's failing, so again it's pointing to the sqlite db file?

            What are the security permissions for both the HS3MQTT directory and the hs3mqtt.sqlite file? Everyone (R/W) ??

            Z

            Comment


              #7
              Ok - We have a solution

              After fiddling around for far too long with permissions, I took some fairly drastic steps to resolve the problem:
              • Made a copy of the "C:\Program Files (x86)\Homeseer HS3" directory to "C:\Program Files (x86)\Homeseer HS3 Copy"
              • Took a screenshot of all the installed plugins
              • Uninstalled everything HomeSeer
              • Reinstalled everything HomeSeer
              • Put back all the plugins
              • Copied the contents of "C:\Program Files (x86)\Homeseer HS3 Copy" back to "C:\Program Files (x86)\Homeseer HS3"


              End result was that whatever permissions issues were causing the issues have been resolved. MQTT plugin is working properly.

              Thank you everyone for the assistance!

              Comment

              Working...
              X