Announcement

Collapse
No announcement yet.

Installation Issue EspoCRM 8.0

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

  • Installation Issue EspoCRM 8.0

    Good morning. We are trying to install a fresh EspoCRM 8 on Ubuntu.

    We follow the manual installation instructions, (including correcting permissions), create the database and user, and point the browser to our subdomain. The installation wizard appears.

    We fill in the database configuration, test connection which passes.

    All system requirements on the following page are green "Success'.

    On clicking "Install" we receive: "An unexpected error occurred"

    Espo error log reports:

    [...] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}

    ​We're not sure what this means or how to fix it.

    Thanks in advance.

    Ubuntu 22.04.3 / Espo 8.0.0 / PHP 8.1.23 / MariaDB 10.6.12 /
    Last edited by Cmpx; 09-14-2023, 10:34 AM.

  • #2
    Hi Cmpx,

    Could you please send the server logs?

    Comment


    • #3
      Thank you for the reply.

      Here is the apache2 access log for one session from beginning to error:

      Code:
      [...] - - [14/Sep/2023:10:45:16 +0000] "GET / HTTP/1.1" 302 4914 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:16 +0000] "GET /install/ HTTP/1.1" 200 6020 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:24 +0000] "POST /install/ HTTP/1.1" 200 18010 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:30 +0000] "POST /install/ HTTP/1.1" 200 5932 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:32 +0000] "POST /install/index.php HTTP/1.1" 200 363 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:38 +0000] "POST /install/index.php HTTP/1.1" 200 687 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:38 +0000] "POST /install/ HTTP/1.1" 200 5967 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:43 +0000] "POST /install/index.php HTTP/1.1" 200 365 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:43 +0000] "POST /install/index.php HTTP/1.1" 200 365 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:43 +0000] "GET /api/v1/ HTTP/1.1" 401 234 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:43 +0000] "POST /install/index.php HTTP/1.1" 500 317 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:43 +0000] "POST /install/ HTTP/1.1" 200 5563 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:44 +0000] "POST /install/index.php HTTP/1.1" 200 365 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:44 +0000] "POST /install/index.php HTTP/1.1" 200 365 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:45 +0000] "GET /api/v1/ HTTP/1.1" 401 234 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
      [...] - - [14/Sep/2023:10:45:45 +0000] "POST /install/index.php HTTP/1.1" 500 317 "https://[myserveraddress.example]/install/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"​
      ​
      There is nothing in the error log.

      Comment


      • #4
        Cmpx,

        I just checked the EspoCRM v8.0 installation with your system requirements, and everything went well.

        Try installing EspoCRM again, just create a new database and link a new user (make sure that he has grant access to this database).

        Comment


        • #5
          Originally posted by Cmpx View Post
          Good morning. We are trying to install a fresh EspoCRM 8 on Ubuntu.

          We follow the manual installation instructions, (including correcting permissions), create the database and user, and point the browser to our subdomain. The installation wizard appears.

          We fill in the database configuration, test connection which passes.

          All system requirements on the following page are green "Success'.

          On clicking "Install" we receive: "An unexpected error occurred"

          Espo error log reports:

          [...] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}

          ​We're not sure what this means or how to fix it.

          Thanks in advance.

          Ubuntu 22.04.3 / Espo 8.0.0 / PHP 8.1.23 / MariaDB 10.6.12 /
          From this logfile it is looking for a table named espocrm.user, which of course does not exist, because the database installation of espocrm does not have such a table. Did you configure anything manually, which could cause this?

          Comment


          • #6
            Thank you.

            Wiped the web root directory, reinstalled all files, reran the suggested permissions corrections noted here, deleted the database, created it again, relinked the user.

            This time, briefly, the api/v1 warning page appeared making suggestions about modifying apache2 configuration files and enabling .htaccess files.

            We have been through each step one by one to attempt to resolve the issue previously, and did so again now.

            Here are new Espo error logs with some additional errors at the top:

            Code:
            [2023-09-14 11:10:31] ERROR: Uncaught Exception RuntimeException: "Route collector cache file directory `data/cache/application` is not writable" at /var/www/html/crm/vendor/slim/slim/Slim/Routing/RouteCollector.php line 141 {"exception":"[object] (RuntimeException(code: 0): Route collector cache file directory `data/cache/application` is not writable at /var/www/html/crm/vendor/slim/slim/Slim/Routing/RouteCollector.php:141)"}
            [2023-09-14 11:10:32] ERROR: Uncaught Exception RuntimeException: "Route collector cache file directory `data/cache/application` is not writable" at /var/www/html/crm/vendor/slim/slim/Slim/Routing/RouteCollector.php line 141 {"exception":"[object] (RuntimeException(code: 0): Route collector cache file directory `data/cache/application` is not writable at /var/www/html/crm/vendor/slim/slim/Slim/Routing/RouteCollector.php:141)"}
            [2023-09-14 11:15:47] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:17:33] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:18:06] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:18:23] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:18:25] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:18:41] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            [2023-09-14 11:18:42] ERROR: Uncaught Exception PDOException: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist" at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php line 76 {"exception":"[object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.user' doesn't exist at /var/www/html/crm/application/Espo/ORM/Executor/DefaultSqlExecutor.php:76)"}
            
            ​
            We note that data/cache/application is, in fact, writable all the way back up to the base install folder.

            Here is our relevant apache2 configuration:

            Code:
            <VirtualHost *:443>
            
            ErrorLog ${APACHE_LOG_DIR}/espocrm_error.log
            CustomLog ${APACHE_LOG_DIR}/espocrm_access.log combined
            
            ServerName ourserver.example
            
            DocumentRoot "/var/www/html/crm/public/"
            Alias /client/ "/var/www/html/crm/client/"
            
            <Directory /var/www/html/crm/public/>
            Require all granted
            </Directory>
            
            SSLCertificateFile /etc/letsencrypt/live/ourserver.example/fullchain.pem
            SSLCertificateKeyFile /etc/letsencrypt/live/ourserver.example/privkey.pem
            Include /etc/letsencrypt/options-ssl-apache.conf
            
            </VirtualHost>
            
            ​

            Comment


            • #7
              Originally posted by shalmaxb View Post

              From this logfile it is looking for a table named espocrm.user, which of course does not exist, because the database installation of espocrm does not have such a table. Did you configure anything manually, which could cause this?
              Thank you. Absolutely nothing was configured manually. We simply followed the installation instructions, created the (empty) database and relevant user, and pointed the browser at the domain.

              Comment


              • #8
                Originally posted by lazovic View Post
                Cmpx,

                I just checked the EspoCRM v8.0 installation with your system requirements, and everything went well.

                Try installing EspoCRM again, just create a new database and link a new user (make sure that he has grant access to this database).
                lazovic Could your share your Apache configuration files to confirm we are using similar settings? Thank you.

                Comment


                • #9
                  Cmpx,

                  Your Apache configuration looks correct, but I'm using nginx, so we can't compare the configurations.

                  Can you please show a screenshot of the errors that appear in your browser window? Especially those that notify about server setup.

                  Comment


                  • #10
                    Thank you. Here is the advisory page that appears. We have confirmed or attempted each step one by one but nothing changes.

                    Attached Files

                    Comment


                    • #11
                      Cmpx,

                      This part of the documentation should help you, pay special attention to the second point: https://docs.espocrm.com/administrat...-rewrite-rules

                      Comment


                      • #12
                        Thank you for that. As I say, we have followed all of those points to the letter and nothing produces any change.

                        • All required PHP libraries are installed and enabled.
                        • Apache config is set to the correct paths

                        Then we followed, one by one:

                        • Mod rewrite is enabled -> tested -> no change to api warning page
                        • .htaccess support enabled -> tested -> no change to api warning page
                        • Rewrite base in the api/v1 directory modified -> tested -> no change to api warning page

                        We are not using FastCGI, so no HTTP AUTHORIZATION support needed.



                        lazovic perhaps you could share your nginx / phpfpm config. We have just spun up an alternative nginx machine to rule out issues with apache configuration.

                        Comment


                        • #13
                          Cmpx,

                          If you have the opportunity to switch between virtual machines and servers, I would recommend that you do not waste time setting up the server itself and install EspoCRM via a script (the server must be absolutely clean, just clean Ubuntu): https://docs.espocrm.com/administrat...ion-by-script/

                          This will be much easier and simpler, problems will not arise.

                          Comment


                          • #14
                            Thanks for that lazovic, we just tried it on a fresh server via the install script and it comes up without issues.

                            This would certainly allow us to test it.

                            However there are issues with that method:

                            1) It's a docker install, which we'd rather avoid.

                            2) Many of the usual configuration options are hidden.

                            3) We would rather run it alongside our other services on our already established machine, to conserve resources.

                            Why it isn't installing manually, when following the install instructions, is a puzzle.

                            Perhaps we can examine this instance to try to build a worknig one manually.

                            Comment

                            Working...
                            X