[SOLVED] Can't start opsi-server in docker
Verfasst: 24 Dez 2025, 10:38
I've used the docker compose at the opsi-docker git hub as a template to setup opsi as a portainer stack on a linux docker host.
All the other containers come up except the opsi-server. The logs on the container show the following loop
It keeps restarting until I stop it.
I'm probably missing something obvious here but I can't see what!
Code: Alles auswählen
x-restart-policy: &restart-policy
restart: unless-stopped
x-common-variables: &common-variables
TZ: Asia/Somewhere
services:
mysql:
<<: *restart-policy
image: mariadb:10.7
container_name: mysql-opsi
command: --max_connections=1000 --max_allowed_packet=256M --sort_buffer_size=4M
environment:
<<: *common-variables
MYSQL_ROOT_PASSWORD: ${DBRP}
MYSQL_DATABASE: opsi
MYSQL_USER: ${DBU}
MYSQL_PASSWORD: ${DBUP}
MYSQL_INITDB_SKIP_TZINFO: 1
volumes:
- /opt/dock/app/opsi/db:/var/lib/mysql
env_file:
- stack.env
redis:
<<: *restart-policy
image: redis/redis-stack-server:latest
container_name: redis-opsi
command: sh -c "redis-server --requirepass $$REDIS_PASSWORD --loadmodule /opt/redis-stack/lib/redistimeseries.so --dir /data"
environment:
<<: *common-variables
REDIS_PASSWORD: ${README}
volumes:
- /opt/dock/app/opsi/read:/data
env_file:
- stack.env
grafana:
<<: *restart-policy
image: grafana/grafana:latest
container_name: grafana-opsi
environment:
<<: *common-variables
GF_SECURITY_ADMIN_USER: ${GFAU}
GF_SECURITY_ADMIN_PASSWORD: ${GFAP}
GF_INSTALL_PLUGINS: simpod-json-datasource
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:%(http_port)s/grafana"
volumes:
- /opt/dock/app/opsi/graf:/var/lib/grafa
env_file:
- stack.env
opsi-server:
<<: *restart-policy
image: uibmz/opsi-server:4.3
container_name: opsi-config
depends_on:
- mysql
- redis
ports:
- "4447:4447"
- "69:69/udp"
hostname: opsi
domainname: goatlovers.xxx
environment:
<<: *common-variables
MYSQL_DATABASE: opsi
MYSQL_USER: ${DBU}
MYSQL_PASSWORD: ${DBUP}
REDIS_PASSWORD: ${README}
GF_SECURITY_ADMIN_USER: ${GFAU}
GF_SECURITY_ADMIN_PASSWORD: ${GFAP}
MYSQL_HOST: mysql
MYSQL_PORT: 3306
# MYSQL_PROPERTIES: "useSSL=true&connectionPoolMaxOverflow=20&unique_system_uuids=false"
REDIS_HOST: redis
GRAFANA_HOST: grafana
OPSI_ADMIN_PASSWORD: ${OAP}
OPSI_ROOT_PASSWORD:
# configserver / depotserver
OPSI_HOST_ROLE: configserver
# Run tftp server and opsipxeconfd? ("true"/"false")
OPSI_TFTPBOOT: "true"
# OPSI_SERVICE_ADDRESS and OPSI_HOST_KEY is needed for depotserver role only
OPSI_SERVICE_ADDRESS:
OPSI_HOST_KEY:
# opsconfd config
OPSICONFD_GRAFANA_EXTERNAL_URL: /grafana
OPSICONFD_LOG_LEVEL: 6
OPSICONFD_LOG_LEVEL_FILE: 4
OPSICONFD_RESTORE_BACKUP_URL: ${OPSICONFD_RESTORE_BACKUP_URL:-}
OPSILICSRV_URL: ${OPSILICSRV_URL:-}
OPSILICSRV_TOKEN: ${OPSILICSRV_TOKEN:-}
volumes:
- /opt/dock/app/opsi/data:/data
env_file:
- stack.env
Code: Alles auswählen
[5] [2025-12-24 11:56:36.577] [opsipxeconfd start] Connecting to OPSI Service at 'https://localhost:4447' (attempt 1) (service.py:151)
[4] [2025-12-24 11:56:36.596] [opsipxeconfd start] Failed to connect to OPSI Service at 'https://localhost:4447': Opsi service connection error: HTTPSConnectionPool(host='localhost', port=4447): Max retries exceeded with url: /rpc (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f2f21e54ad0>: Failed to establish a new connection: [Errno 111] Connection refused')), retry in 5 seconds. (service.py:162)
2025-12-24 11:56:36,719 WARN exited: opsiconfd (exit status 1; not expected)
I'm probably missing something obvious here but I can't see what!