scline / docker-cacti

Cacti version 1+ under Docker
113 stars 56 forks source link

Cacti exited with code 1 #89

Closed yaweffah0 closed 3 years ago

yaweffah0 commented 3 years ago

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"

scline commented 3 years ago

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

yaweffah0 commented 3 years ago

`version: '2' services:

cacti: image: "smcline06/cacti" container_name: cacti restart: always domainname: localhost hostname: localhost ports:

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

scline commented 3 years ago

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.