Announcement

Collapse
No announcement yet.

Impossible to install EspoCRM 6.1.4 : 500 Internal Server error

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

  • Impossible to install EspoCRM 6.1.4 : 500 Internal Server error

    Impossible to install EspoCRM 6.1.4 with docker file: acces to /api/v1/Metadata cause 500 Internal Server error

    I'm trying to install Espo via the official docker repo (https://github.com/espocrm/docker.git). It create images and when I start container all goes well. But during the installation I Have the error 'API Error: EspoCRM API is unavailable'. I made all the indicated solution but nothing, I still can't install Espo. Please can someone help me? I made some modifications on my .yaml file and that is what I set for MsqlDb connection (see joined files)

    My .yaml file is in the zip espocrm-docker-compose.zip
    Attached Files

  • #2
    Hi there.
    1. By default EspoCRM should be auto-installed, so you don't need to do it manually. In your case, the autoinstallation script was failed because it couldn't establish the connection with DB. The cause of this issue is you did not set these environment parameters for espocrm container:
    Code:
    ESPOCRM_DATABASE_HOST: mysqldb
    ESPOCRM_DATABASE_NAME: espocrm_db
    ESPOCRM_DATABASE_USER: espocrm_db_user
    ESPOCRM_DATABASE_PASSWORD: espocrm_db_user_pa55w0r2
    You need to do this, because by default, if these parameters are not defined in the .yml file the script uses the default params https://github.com/espocrm/docker/bl...ypoint.sh#L183

    2. I don't know why the API error occurs. I've tried to reproduce the issue with your .yml file and I was able to successfully finish the EspoCRM installation w/o any API issue.
    Please open enter to your espocrm container and run the command:
    Code:
    /etc/apache2/conf-enabled/docker-php.conf
    You should see configs that enable ./htaccess support:
    Code:
    <Directory /var/www/>
        Options -Indexes
        AllowOverride All
    </Directory>
    Did you change something in the default EspoCRM-dockerized files?

    If you will not be able to fix the API issue, you may also try to build EspoCRM container form image. E.g.
    Instead of:
    Code:
    build:
        context: ./apache
        dockerfile: Dockerfile
    Put this:
    Code:
    image: espocrm/espocrm

    Comment


    • #3
      Thank you for your answer Maximus.
      The cause of the auto install failure was the absence of those parameters, and also the fact that MySQL server was not yet started when espocrm container was trying to connect to it. I start them separatly and the auto install run well (when I opened my browser at espo url, it ask me to login, not to perform installation).

      I'm looking how to automatically wait for MySQl to start and my db to be create befor starting Espo container.
      Please does the image: espocrm/espocrm contain a script that can do that?

      Comment


      • #4
        > I'm looking how to automatically wait for MySQl to start and my db to be create befor starting Espo container.

        Basically, espocrm container should wait until MySQL up and run thanks to this parameter:
        Code:
        depends_on:
            - mysqldb
        With the provided parameter I've never experienced this issue. W/o this config sometimes I had such issue.

        Comment

        Working...
        X