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!
Version does not change after upgrade
Collapse
X
-
Hi zoul,
Please make rebuild in the instance and refresh the page in your browser: https://docs.espocrm.com/administrat...spocrm-rebuild. -
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.
-
-
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 espocrmComment
-
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
-
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; 06-10-2025, 10:42 AM.
-
-
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 restartComment
-
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
```
-
-
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 espocrmComment
-
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
-
I am having the same issue. I cannot upgrade. I installed EspoCRM with the script in Ubuntu and now when I ran the CLI command: sudo /var/www/espocrm/command.sh upgrade it creates a backup and then restarts Espocrm but when I look at the logs I see this:
Error: SQLSTATE[HY000] [2002] Connection refused
Please help.
I see here to edit the docker-compose.yml file but what do I edit and where?
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 20s
start_period: 10s
timeout: 10s
retries: 3
espocrm-db:
condition: service_healthy
I am using v9.03 but cannot upgrade. Please help from all you EspoCRM experts out there. I am using ubuntu and login as ubuntu user. Thanks!Comment
-
Hi lazovic and thanks for providing me with the example. I saw another post about this example. I made those changes but then I remember I got something about bad argument on line 60 or something along those lines. I will try to make the changes in the docker-compose.yml file again and get the exact error message and post it here. I just don't know what to add and where on the docker-compose.yml file. Does anyone have a working example of the docker-compose.yml file in a system that was installed with v.9 and then could not upgrade because a similar error and then they modified the docker-composed.yml and now it works. All information pertaining to the server can be replaced by xxx. I just need to know where to add the healthcheck text in the docker-composed.yml file. Again, thanks!Comment
-
crmman,
If you get any errors, first provide information about them. The file that was sent to you is working. You can also see from it that the healthcheck tool must be added for the database container, and you also need to specify a dependency for the container with the EspoCRM instance itself, so that it starts only after the database container is fully loaded.Comment
Comment