ofelia
ofelia copied to clipboard
Error starting exec: Unrecognized input header: 60
Hello,
I'm encountering an unexpected error when running scheduled jobs in WHMCS. The initial setup of the scheduler appears to be fine. The log output confirms the successful registration of the jobs:
2023-07-22T21:45:27.903+02:00 scheduler.go:34 ▶ NOTICE New job registered "whmcs-2" - "/usr/local/bin/php -q /opt/whmcs_folders/crons/cron.php" - "@daily"
2023-07-22T21:45:27.904+02:00 scheduler.go:34 ▶ NOTICE New job registered "whmcs-1" - "/usr/local/bin/php -q /opt/whmcs_folders/crons/cron.php" - "@every 5m"
2023-07-22T21:45:27.904+02:00 scheduler.go:54 ▶ DEBUG Starting scheduler with 2 jobs
However, after 5 minutes, an error occurs when the job "whmcs-1" attempts to run:
2023-07-22T21:50:27.005+02:00 common.go:125 ▶ NOTICE [Job "whmcs-1" (0858b34b2be5)] Started - /usr/local/bin/php -q /opt/whmcs_folders/crons/cron.php
2023-07-22T21:50:27.022+02:00 common.go:121 ▶ ERROR [Job "whmcs-1" (0858b34b2be5)] Finished in "17.328679ms", failed: true, skipped: false, error: error starting exec: Unrecognized input header: 60
Here's a snippet from my docker-compose file which outlines the related services:
version: "3.9"
networks:
sushiweb:
external: true
services:
whmcs:
container_name: whmcs
image: docker.io/sushibox/dapi:latest
restart: always
networks:
whmcs_network:
ipv4_address: 172.xx.xx.1
labels:
- "ofelia.enabled=true"
- "ofelia.job-exec.whmcs-1.schedule=@every 5m"
- "ofelia.job-exec.whmcs-1.command=/usr/local/bin/php -q /opt/whmcs_folders/crons/cron.php"
- "ofelia.job-exec.whmcs-2.schedule=@daily"
- "ofelia.job-exec.whmcs-2.command=/usr/local/bin/php -q /opt/whmcs_folders/crons/cron.php"
whmcs-crons:
container_name: whmcs-crons
image: mcuadros/ofelia:latest
restart: always
depends_on:
- whmcs
networks:
whmcs_network:
ipv4_address: 172.xx.xx.2
environment:
- DOCKER_HOST=tcp://dockerproxy:2375
- PUID=${PUID}
- PGID=${PGID}
- UMASK=${UMASK}
command: daemon --docker
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
I'm not certain what is causing this issue. Any assistance or guidance would be greatly appreciated.
Please let me know if you need more information or if I've missed any details.
I faced the same issue...
For me it was the Docker Socket Proxy!
I've changed the following environment flag of the docker socket proxy (tecnativa): EXEC=1
hope it helps!