Announcement

Collapse
No announcement yet.

Can't update docker container

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

  • MRobi1
    replied
    I managed to get this working late last night pretty much through lots of trial and error. With the MySQL version upgrade and the espocrm major upgrade, the order things are done apparently matters and it's not just a simple docker compose pull && docker compose up -d

    Step 1: Update extensions. Always good practice before any updates as many extensions release compatibility updates as needed.
    Step 2: Update MySQL first. Follow the instructions https://docs.espocrm.com/administrat.../installation/ at the bottom of the page. In between step #2 and step #3, you must also update your docker-compose.yml and change image: mysql:8 to image: mysql:8.4.0
    Step 3: After starting the MySQL container, it takes 5-10 minutes to convert your database. You need to wait for this to finish before proceeding or the espocrm update will fail
    Step 4: Update your docker-compose.yml to image: espocrm/espocrm:8.1.5 and then docker stop espocrm, docker compose pull && docker compose up -d
    Step 5: After update to 8.1.5 edit docker-compose.yml again and now the latest tag can be used image: espocrm/espocrm:latest docker stop espocrm, docker compose pull && docker compose up -d

    Leave a comment:


  • lazovic
    replied
    Hi MRobi1,

    A similar issue was recently discussed on GitHub in this thread: https://github.com/espocrm/espocrm-docker/issues/44.

    I see that there is still a line about default authentication plugin in your docker-compose.yml file, you need to follow the following instructions and be sure to remove it: https://docs.espocrm.com/administrat...ng-to-mysql-84.

    In the provided logs there is an error about reading greeting packet. Its possible cause is a lack of RAM.

    I ask kindly you to also check the database container logs with the following command: sudo docker logs mysql

    Leave a comment:


  • MRobi1
    started a topic Can't update docker container

    Can't update docker container

    Currently on v8.1.3. Tried updating to latest version using docker compose pull && docker compose up -d.
    After pulling latest images, I get error 500 trying to access espocrm.
    Restoring from nightly backup gets me back up and running.

    Here is the log from the docker container.
    Code:
    Run "upgrade" action.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    Start upgrading process from version 8.1.3.
    The MAX_UPGRADE_COUNT exceded. The upgrading process has been stopped.
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.X.X.X. Set the 'ServerName' directive globally to suppress this message
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.X.X.X. Set the 'ServerName' directive globally to suppress this message
    [Sun Jun 09 15:47:02.841370 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.59 (Debian) configured -- resuming normal operations
    [Sun Jun 09 15:47:02.841550 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'​
    And here is the log from espocrm from /data/logs
    Code:
    [2024-06-09 15:47:07] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2006] MySQL server has gone away" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2006): SQLSTATE[HY000] [2006] MySQL server has gone away at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): Error while reading greeting packet. PID=16 at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:47:17] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:47:27] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2006] MySQL server has gone away" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2006): SQLSTATE[HY000] [2006] MySQL server has gone away at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): Error while reading greeting packet. PID=18 at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:47:37] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] Connection refused" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:47:47] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:47:57] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:48:07] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:48:17] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    [2024-06-09 15:48:27] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)\n[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known at /var/www/html/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}  ​
    And finally my docker compose:
    Code:
    services:
      mysql:
        image: mysql:8
        container_name: mysql
        command: --default-authentication-plugin=mysql_native_password    
        environment:
          MYSQL_ROOT_PASSWORD: secretpassword
          MYSQL_DATABASE: databasename
          MYSQL_USER: secretuser
          MYSQL_PASSWORD: secretpassword
        volumes:
          - mysql:/var/lib/mysql
        restart: always
      espocrm:
        image: espocrm/espocrm:latest
        container_name: espocrm
        environment:
          ESPOCRM_DATABASE_PLATFORM: Mysql
          ESPOCRM_DATABASE_HOST: mysql
          ESPOCRM_DATABASE_USER: secretusername
          ESPOCRM_DATABASE_PASSWORD: secretpassword
          ESPOCRM_ADMIN_USERNAME: secretusername
          ESPOCRM_ADMIN_PASSWORD: secretpassword
          ESPOCRM_SITE_URL: "https://fqdn.com"
        volumes:
          - /root/espo/:/var/www/html
        restart: always
        ports:
          - 8080:80
      espocrm-daemon:
        image: espocrm/espocrm
        container_name: espocrm-daemon
        volumes:
          - /root/espo/:/var/www/html
        restart: always
        entrypoint: docker-daemon.sh
      espocrm-websocket:
        image: espocrm/espocrm
        container_name: espocrm-websocket    
        environment:
          ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
          ESPOCRM_CONFIG_WEB_SOCKET_URL: "ws://localhost:8081"
          ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN: "tcp://*:7777"
          ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN: "tcp://espocrm-websocket:7777"
        volumes:
          - /root/espo/:/var/www/html
        restart: always
        entrypoint: docker-websocket.sh
        ports:
          - 8081:8080
    volumes:
      mysql:
      espocrm:
    ​
    I checked the release notes on GitHub and saw no mention of breaking changes in the releases.
    I also saw the note in the docs about switching to MySQL8.4 and followed those steps as well and same issue.
    I opened a GitHub issue but was directed here for support on docker.​ Any help would be appreciated.
    Last edited by MRobi1; 06-09-2024, 09:57 PM.
Working...
X