scline/docker-cacti

Cacti exited with code 1

yaweffah0 opened this issue · 3 comments

I get this error when I try to install Cacti on my server.

cacti exited with code 1

[root@NMS_Server compose]# docker-compose up Pulling db (mariadb:10.3)... 10.3: Pulling from library/mariadb 32d7611b468c: Pull complete e5be16fdc306: Pull complete a361e87bde5e: Pull complete 324b95d44184: Pull complete c7a02ed92077: Pull complete 8ea02edf9bf7: Pull complete 7f24c9bd9fe3: Pull complete 0d6d5537d6c9: Pull complete 309e2f0e8909: Pull complete fb7c12284efd: Pull complete b51c8be748ee: Pull complete ff7d4b81455a: Pull complete 805638aa8a32: Pull complete Digest: sha256:518be0d8a58b0f080eb623549c6a58bcad3e4a4489af447a0c612067ed474ded Status: Downloaded newer image for mariadb:10.3 Pulling cacti (smcline06/cacti:)... latest: Pulling from smcline06/cacti 7a0437f04f83: Pull complete 33c370c2cd19: Pull complete 2a132a08075a: Pull complete ad41a6ac1796: Pull complete c8d6ce164cce: Pull complete 8b2570e5be9f: Pull complete b9a8e7d4bec2: Pull complete 87277c0dc6bf: Pull complete 1b28abea8ede: Pull complete 6f9a9fbcbe97: Pull complete 77e332dc0e39: Pull complete cfc1f915d859: Pull complete 2fb0f7ab8985: Pull complete 600a0a78c8b2: Pull complete 683e4002c613: Pull complete da294e368fc3: Pull complete 8e20a2ef92c5: Pull complete 5634aa74e542: Pull complete Digest: sha256:aeff878b4da26a7b43e44f315c4e1e466b37578846d6c9ea8d0df0bf8734e727 Status: Downloaded newer image for smcline06/cacti:latest Creating cacti_db ... done Creating cacti ... done Attaching to cacti_db, cacti cacti | standard_init_linux.go:211: exec user process caused "exec format error" cacti_db | 2021-03-07 19:44:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.28+maria~focal started. cacti_db | 2021-03-07 19:44:07+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' cacti_db | 2021-03-07 19:44:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.28+maria~focal started. cacti_db | 2021-03-07 19:44:07 0 [Note] mysqld (mysqld 10.3.28-MariaDB-1:10.3.28+maria~focal) starting as process 1 ... cacti_db | 2021-03-07 19:44:07 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Using Linux native AIO cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Uses event mutexes cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Number of pools: 1 cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Using generic crc32 instructions cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 9, chunk size = 113.778M cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Completed initialization of buffer pool cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). cacti_db | 2021-03-07 19:44:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1625479 cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: 128 out of 128 rollback segments are active. cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Creating shared tablespace for temporary tables cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Waiting for purge to start cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: 10.3.28 started; log sequence number 1625488; transaction id 20 cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool cacti_db | 2021-03-07 19:44:08 0 [Note] Plugin 'FEEDBACK' is disabled. cacti_db | 2021-03-07 19:44:08 0 [Note] Recovering after a crash using tc.log cacti_db | 2021-03-07 19:44:08 0 [Note] Starting crash recovery... cacti_db | 2021-03-07 19:44:08 0 [Note] Crash recovery finished. cacti_db | 2021-03-07 19:44:08 0 [Note] InnoDB: Buffer pool(s) load completed at 210307 19:44:08 cacti_db | 2021-03-07 19:44:08 0 [Note] Server socket created on IP: '::'. cacti_db | 2021-03-07 19:44:08 0 [Warning] 'proxies_priv' entry '@% root@db' ignored in --skip-name-resolve mode. cacti_db | 2021-03-07 19:44:08 0 [Note] Reading of all Master_info entries succeeded cacti_db | 2021-03-07 19:44:08 0 [Note] Added new Master_info '' to hash table cacti_db | 2021-03-07 19:44:08 0 [Note] mysqld: ready for connections. cacti_db | Version: '10.3.28-MariaDB-1:10.3.28+maria~focal' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution cacti exited with code 1

On checking the logs of the containers created
I get this error for in the smcline06/cacti container.
standard_init_linux.go:211: exec user process caused "exec format error"

Would you be able to share your compose file that produced this error (please sanitize any passwords)?

`version: '2'
services:

cacti:
image: "smcline06/cacti"
container_name: cacti
restart: always
domainname: localhost
hostname: localhost
ports:
- "86:80"
- "443:443"
environment:
- DB_NAME=cacti_master
- DB_USER=cactiuser
- DB_PASS=
- DB_HOST=db
- DB_PORT=3306
- DB_ROOT_PASS=
- INITIALIZE_DB=1
- TZ=UTC
volumes:
- cacti-data:/cacti
- cacti-spine:/spine
- cacti-backups:/backups

links:
  - db

db:
image: "linuxserver/mariadb:version-110.4.18mariabionic"
container_name: cacti_db
restart: always
domainname: localhost
hostname: localhost
ports:
- "3306:3306"
command:
- mysqld
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --max_connections=200
- --max_heap_table_size=128M
- --max_allowed_packet=32M
- --tmp_table_size=128M
- --join_buffer_size=128M
- --innodb_buffer_pool_size=1G
- --innodb_doublewrite=ON
- --innodb_flush_log_at_timeout=3
- --innodb_read_io_threads=32
- --innodb_write_io_threads=16
- --innodb_buffer_pool_instances=9
- --innodb_file_format=Barracuda
- --innodb_large_prefix=1
- --innodb_io_capacity=5000
- --innodb_io_capacity_max=10000
environment:
- MYSQL_ROOT_PASSWORD=
- TZ=UTC
volumes:
- cacti-db:/var/lib/mysql

volumes:
cacti-db:
cacti-data:
cacti-spine:
cacti-backups:
`
@scline
Here is the content of the docker compose file. The OS is a centos based Euler OS, arm64 based. I changed the mariadb container to one compatible with system architecture. I
docker-compose.zip

Ah I see, this docker container was built for x86_64 CPU. You will likely have to do a bit of development to get it working on an ARM-based system. I am not even sure if the folks at cacti.net support ARM-based cacti deployments.

AS-IS this will not work on such a system. You can try changing the base dockerfile OS with something that's ARM-compatible but there are likely additional package/script changes required.