espocrm / espocrm-docker

Official Docker Image for EspoCRM
https://hub.docker.com/r/espocrm/espocrm
GNU Affero General Public License v3.0
56 stars 34 forks source link

Unable to upgrade #44

Closed omoroca closed 1 month ago

omoroca commented 1 month ago

Hello, we are unable to upgrade from 8.1.4 to whatever version It's an docker compose setup and it always says:

Run "upgrade" action.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4.
Start upgrading process from version 8.1.4
The MAX_UPGRADE_COUNT exceded. The upgrading process has been stopped.

that from 8.1.4 to 8.1.5, from 8.1.4. to 8.2.0 and so on. What's the issue? Thanks

lazespo commented 1 month ago

Hi @omoroca,

Can you please tell me what CLI commands you used to upgrade your EspoCRM instance? You can also attach your docker-compose.yml file.

omoroca commented 1 month ago

Hi, so I was just tired, I guess...

after the weekend I tried again upgrading. Just for the sake of completeness: change the image version in the docker-compose.yml file: image: espocrm/espocrm:8.1.4 to image: espocrm/espocrm:8.2.0, for example docker compose pull docker compose up -d and then monitoring logs docker compose logs -f espocrm

Result: The MAX_UPGRADE_COUNT exceded. The upgrading process has been stopped.

then I saw the mysql contianer was stopped. [mysql: [ERROR] unknown variable 'default-authentication-plugin=mysql_native_password' [closed]](https://dba.stackexchange.com/questions/287285/mysql-error-unknown-variable-default-authentication-plugin-mysql-native-pass)

changed: command: --default-authentication-plugin=mysql_native_password to command: --mysql-native-password=ON and it works now.

docker-compose.yml file now looks like this (test instance)

services:
  mysql:
    container_name: mysql
    image: mysql:8
    cap_add:
      - SYS_NICE  # CAP_SYS_NICE
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "3"
#    command: --default-authentication-plugin=mysql_native_password
    command: --mysql-native-password=ON
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: super-secret-password
      MYSQL_PASSWORD: super-secret-password
    volumes:
      - mysql:/var/lib/mysql

  espocrm:
    container_name: espocrm
    image: espocrm/espocrm:8.2.4
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "3"
    environment:
      ESPOCRM_DATABASE_PASSWORD: super-secret-password
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: super-secret-password
      ESPOCRM_SITE_URL: "http://localhost:8080"
    restart: always
#    ports:
#      - 80:80
    volumes:
     - espocrm:/var/www/html

  espocrm-daemon:
    container_name: espocrm-daemon
    image: espocrm/espocrm:8.2.4
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "3"
    volumes:
     - espocrm:/var/www/html
    restart: always
    entrypoint: docker-daemon.sh

  espocrm-websocket:
    image: espocrm/espocrm:8.2.4
    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:
      - espocrm:/var/www/html
    restart: always
    entrypoint: docker-websocket.sh
#    ports:
#      - 8081:8080

..

long story short...i was just tired i guess.

Sorry for bothering you and have a nice day. 👋

lazespo commented 1 month ago

@omoroca,

You may find useful the following information: https://docs.espocrm.com/administration/docker/installation/#switching-to-mysql-84