New Instance throws PDOException

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simond
    Junior Member
    • May 2019
    • 13

    New Instance throws PDOException

    Good day,

    I have been facing a problem for some time now dealing with following error:

    Code:
    Espo.ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /var/www/application/Espo/ORM/EntityManager.php line 158 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/application/Espo/ORM/EntityManager.php:158)"} []
    This happened to my development system, I was running in a local docker connected to my local (containerless) mysql. Everything was working fine until suddenly it was not anymore.
    The error seems to negate randomly changes I implemented in my extensions, as well as all log output. My log level in /data/config.php is set to debug.
    Entities I create using extensions are still set up and I can create and edit them. However, methods implemented in /myextension/files/application/Modules/mynamespace/Services/Account.php are not called anymore, even though they used to work fine.

    Not even setting up a completely new espo, with a fresh database seems to tackle the problem. The system immediately throws the error three times.
    I am using MySQL v5.7.10 and started using espo 5.6.2 but upgraded to 5.6.9 without success.

    Has anybody faced a similar issue or has any idea about possible solutions?

    Thanks in advance and best wishes
    Simon
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello,
    check please whether your local MySQL still runs.

    Comment


    • simond
      simond commented
      Editing a comment
      It is running and when I use the espo I can see new entries for example for users or accounts.
      Restarting didn't help either
  • simond
    Junior Member
    • May 2019
    • 13

    #3
    Actually I can edit the espo code in /application/Espo/ORM/EntityManager.php and write stuff to the log.
    I see now that it is triggered every minute without throwing the error.
    Is there anything of interest I could have logged, to get more information about the issue?

    Comment

    • simond
      Junior Member
      • May 2019
      • 13

      #4
      So I just found out that stuff not working could actually be a result of a conflict between two extensions. I expected the different namespaces to avoid this conflict, because I also address different methods. Is there any documentation about how files are loaded in espo?

      However, the log is still not outputting anything from my custom code, neither do I get log output when installing extensions (which I got before).
      I really wonder, what could've broken. I wasn't using the system when it first occurred.

      Comment

      • manu
        Junior Member
        • Aug 2019
        • 1

        #5
        I have been facing a same problem.

        [2019-08-05 08:54:20] Espo.ERROR: Uncaught Exception PDOException: "SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)" at /home/mistykat/public_html/crm/application/Espo/ORM/EntityManager.php line 158 {"exception":"[object] (PDOException(code: 1045): SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) at /home/mistykat/public_html/crm/application/Espo/ORM/EntityManager.php:158)"} []

        Pls, Give me the solution. If any...

        Comment

        • Maximus
          Senior Member
          • Nov 2018
          • 2731

          #6
          simond, have you solve your issue. Its seems that you have some custom code error. I am going to moving this topic into the 'Developer help' branch of the forum. Hope someone will help you to solve it.

          manu, please check whether you have set a proper DB user and password.
          > Access denied for user 'root'@'localhost' (using password: NO)
          you can check this and change in the EspoCRM/data/config.php file.

          Comment

          Working...