Version does not change after upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zoul
    Junior Member
    • Apr 2025
    • 8

    #1

    Version does not change after upgrade

    I am running EspoCRM 9.0.6 and I am trying to upgrade to the current version. EspoCRM is installed to `/var/www/espocrm`, from there I run `./command.sh upgrade` and that seems to run smoothly with some expected Docker image logs. But after checking `/#Admin/upgrade` on the instance I still get the version number as 9.0.6. What could I be doing wrong? How can I diagnose the issue further? Thank you!
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #2
    Hi zoul,

    Please make rebuild in the instance and refresh the page in your browser: https://docs.espocrm.com/administrat...spocrm-rebuild.

    Comment


    • zoul
      zoul commented
      Editing a comment
      Thank you! I’ve tried that, cleared the caches and reloaded the page. I still get the same old version and the red notice telling me to upgrade.
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #3
    zoul,

    Is there anything in the EspoCRM container logs or in the instance logs itself?

    Comment


    • zoul
      zoul commented
      Editing a comment
      There’s nothing interesting in `data/espocrm/data/logs`. There are no logs at `/#Admin/appLog` (can I turn that logging on somewhere?). Can I look somewhere else? I am not completely familiar with the setup and Docker.

      Running `docker compose ps` shows that the containers were created yesterday and have been running since then. Running `command.sh upgrade` seems to be a no-op (nothing new is pulled), so it looks like the newest containers should really be running? Running `docker compose restart` does not change anything.

      Looking at `/api/v1/Settings` reports version as "9.0.6" indeed.

      Thank you very much.
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #4
    zoul,

    The App log in UI will display the same information as in the log files in the folder if you enable the corresponding option in the config file: https://github.com/espocrm/espocrm/issues/3047.

    To check the instance container logs, you can run the following command: docker logs espocrm

    Comment


    • zoul
      zoul commented
      Editing a comment
      Perfect, the Docker logs contain this:

      ```
      info: Run "upgrade" action.
      info: Start upgrading from version 9.0.6.
      error: Upgrade error, more details:
      Error: SQLSTATE[HY000] [2002] Connection refused
      ```

      Does that make sense?
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #5
    zoul,

    A similar issue was already discussed here: https://github.com/espocrm/espocrm-docker/issues/58.

    You should add a health check for the database container to your docker-compose.yml file. If you have any problems with this solution, send me this file (remove passwords and domain for security reasons), and I will try to help you.

    Comment


    • zoul
      zoul commented
      Editing a comment
      I have tried to add the healthcheck and restart, didn’t help. This is our current docker-compose.yml:

      ```
      # MODE: letsencrypt
      # VERSION: 2.5.1

      services:

      espocrm-db:
      image: mariadb:latest
      container_name: espocrm-db
      command: --max-allowed-packet=64MB
      restart: always
      environment:
      MARIADB_ROOT_PASSWORD: •••
      MARIADB_DATABASE: espocrm
      MARIADB_USER: espocrm
      MARIADB_PASSWORD: •••
      volumes:
      - ./data/mariadb/data:/var/lib/mysql
      networks:
      - espocrm-network
      healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3

      espocrm-nginx:
      image: nginx
      container_name: espocrm-nginx
      environment:
      NGINX_HOST: •••
      restart: always
      depends_on:
      - espocrm
      - espocrm-websocket
      volumes:
      - ./data/nginx/conf.d/:/etc/nginx/templates
      - ./data/espocrm:/var/www/html
      - ./data/nginx/espocrm.conf:/etc/nginx/espocrm.conf
      - ./data/nginx/logs:/var/log/nginx
      - ./data/nginx/ssl:/etc/nginx/ssl:ro
      - ./data/nginx/certbot:/var/www/certbot
      ports:
      - "80:80"
      - "443:443"
      networks:
      - espocrm-network

      espocrm:
      image: espocrm/espocrm:fpm
      container_name: espocrm
      environment:
      ESPOCRM_DATABASE_HOST: espocrm-db
      ESPOCRM_DATABASE_USER: espocrm
      ESPOCRM_DATABASE_PASSWORD: •••
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: •••
      ESPOCRM_CONFIG_SITE_URL: •••
      restart: always
      depends_on:
      espocrm-db:
      condition: service_healthy
      volumes:
      - ./data/espocrm:/var/www/html
      networks:
      - espocrm-network

      espocrm-daemon:
      image: espocrm/espocrm:fpm
      container_name: espocrm-daemon
      volumes:
      - ./data/espocrm:/var/www/html
      restart: always
      depends_on:
      - espocrm
      entrypoint: docker-daemon.sh
      networks:
      - espocrm-network

      espocrm-websocket:
      container_name: espocrm-websocket
      image: espocrm/espocrm:fpm
      environment:
      ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
      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:
      - ./data/espocrm:/var/www/html
      restart: always
      depends_on:
      - espocrm
      entrypoint: docker-websocket.sh
      ports:
      - "8080:8080"
      networks:
      - espocrm-network

      espocrm-certbot:
      image: certbot/certbot
      container_name: espocrm-certbot
      volumes:
      - ./data/nginx/ssl:/etc/letsencrypt
      - ./data/nginx/certbot:/var/www/certbot
      command: certonly --webroot --webroot-path=/var/www/certbot --keep --agree-tos --rsa-key-size 4096 --email ••• --no-eff-email -d •••

      networks:
      espocrm-network:
      driver: bridge
      ```

      Perhaps the image `espocrm/espocrm:fpm` is wrong? I have no idea where that came from, I think I originally installed through some script.

      Thank you!
      Last edited by zoul; Today, 10:42 AM.
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #6
    zoul,

    This image is used for installation by the official script: https://docs.espocrm.com/administrat...tion-by-script.

    Please tell me if you ran the command to restart the services? sudo /var/www/espocrm/command.sh restart

    Comment


    • zoul
      zoul commented
      Editing a comment
      I have tried `docker compose restart` previously, now I also tried `command.sh restart`, neither of those helped. But now I have something new in the Docker logs:

      ```
      info: Run "upgrade" action.
      info: Start upgrading from version 9.0.6.
      error: Upgrade error, more details:
      Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for espocrm-db failed: Name or service not known
      ```
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #7
    zoul,

    Try running the following commands from the directory where the docker-compose.yml file is located:

    docker compose down
    docker compose up -d


    After that, if EspoCRM instance still hasn't upgraded, send the following logs:

    docker logs espocrm-db
    docker logs espocrm

    Comment


    • zoul
      zoul commented
      Editing a comment
      That finally did it! Thank you very much. Any guess why stopping and starting was different from just `docker compose restart`? Thank you again for your patience.
  • lazovic
    Super Moderator
    • Jan 2022
    • 1060

    #8
    zoul,

    Glad it worked for you.

    docker compose restart just restarts containers; it doesn't recreate them. It preserves current volumes, networks, configurations, and DNS cache, but it doesn't apply changes in docker-compose.yml, such as new volumes, networks, health checks, and environment variables.

    Comment


    • zoul
      zoul commented
      Editing a comment
      Ah, I really have to dive into Docker properly. Thank you again.
Working...