Multiple failed installs, please help! ! (API Error: EspoCRM API is unavailable.)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snminvip
    Junior Member
    • Mar 2022
    • 5

    Multiple failed installs, please help! ! (API Error: EspoCRM API is unavailable.)

    I have installed it many times, and every time I encounter this problem, I don't know how to deal with it. Permissions and Nginx are set as per the documentation.

    API Error: EspoCRM API is unavailable.


    [2022-03-23 11:51:36] WARNING: E_WARNING: Undefined array key "errors" {"code":2,"message":"Undefined array key "errors"","file":"/www/wwwroot/EspoCRM/install/vendor/smarty/libs/sysplugins/smarty_internal_templatebase.php(143) : eval()'d code","line":4} []
    [2022-03-23 11:51:36] WARNING: E_WARNING: Attempt to read property "value" on null {"code":2,"message":"Attempt to read property "value" on null","file":"/www/wwwroot/EspoCRM/install/vendor/smarty/libs/sysplugins/smarty_internal_templatebase.php(143) : eval()'d code","line":4} []


    Failed to load resource: the server responded with a status of 500 (Internal Server Error) /api/v1/:1
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hello,

    Please send the error log of your nginx server.

    Comment

    • snminvip
      Junior Member
      • Mar 2022
      • 5

      #3
      I tested and installed the latest project, and a white screen appeared after clicking install.

      Comment

      • lazovic
        Super Moderator
        • Jan 2022
        • 809

        #4
        Please check if the permissions and ownership are set correctly:


        Comment


        • snminvip
          snminvip commented
          Editing a comment
          The permissions that have been detected are the current user permissions.
      • axyl
        Member
        • Jun 2021
        • 32

        #5
        Hey Snmip,

        Your log file says that there are write file permission errors. So there's definitely a problem there.

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 809

          #6
          snminvip,

          You said the permissions are set for current user.
          Have you tried using www-data?

          Comment

          • MaxMax
            Junior Member
            • Mar 2022
            • 15

            #7
            What do you mean by www-data

            Comment

            • lazovic
              Super Moderator
              • Jan 2022
              • 809

              #8
              Hi MaxMax,

              All the EspoCRM files should be owned and group-owned by the webserver process. It can be www-data, daemon, apache, www, etc.

              In most cases, it is www-data. It is the user that web servers on Ubuntu (Apache, nginx, for example) use by default for normal operation. The web server process can access any file that www-data can access.

              To work with EspoCRM at the beginning, before installation, it is necessary to set the owner and group-owner, using these commands in terminal from your EspoCRM instance directory:
              Code:
              sudo chown -R <OWNER>:<GROUP-OWNER> .;
              Instead of owner and group-owner you should insert, for example, www-data and www-data (without brackets).

              Comment

              • pllabreu
                Junior Member
                • Jul 2022
                • 2

                #9
                The only thing that did it for me was to upgrade mariadb to the latest version. God knows why the error shows as API unavailable, but I decided to check the database version because there were errors related to it in the logs and I noticed i was running an old versions of MariaDB.
                All is working now!!

                Comment

                Working...