-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exec Error on External Filter (ARM64) #1865
Comments
Hi! Did you skip the header of the script here or is it missing? The container only has sh, no full bash so you need to have it as #!/bin/sh
set -e
reqSpace=10000000 # 100GB
SPACE=$(df "/Media" | awk 'END{print $4}')
if [ "$SPACE" -le $reqSpace ]
then
SPACE=$(df -kh . | tail -n1 | awk '{print $4}')
echo "Less than 100 GB of storage space is available."
echo "Free Space: $SPACE GB"
exit 1
fi
if [ "$SPACE" -gt $reqSpace ]
then
SPACE=$(df -kh . | tail -n1 | awk '{print $4}')
echo "More than 100 GB of storage space is available."
echo "Free Space: $SPACE GB"
exit 0
fi Also make sure it has executable permissions |
It looks like I missed the shell script header. I'll update it and advise. |
@desi76 How did it go? |
For unrelated reasons, my SBC suffered a catastrophic failure. I think Docker updated and now it won't start. I'll update you when I can. |
** Autobrr Version**
1.52.0
Describe the bug
I'm running autobrr on Docker, on Ubuntu Linux, on an ARM64 SBC, using a shell script in an external filter to calculate free space and fail the filter if free space < 100 GB. The external filter is failing with the logged error:
(Television) external filter check error error="error executing external command: fork/exec /config/freespace.sh: exec format error"= method=CheckFilter module=filter stack=[{"func":"(*service).RunExternalFilters","line":"564","source":"service.go"},{"func":"(*service).CheckFilter","line":"451","source":"service.go"},{"func":"(*service).processFilters","line":"205","source":"service.go"},{"func":"(*service).Process","line":"182","source":"service.go"},{"func":"goexit","line":"1223","source":"asm_arm64.s"}]
The script is set as executable and I've set CHOWN to assign the script with the container's PUID / PGID. I can run the shell script successfully when logged into autobrr's container.
To Reproduce
Run:
/config/freespace.sh
as external filter.Result (when executed manually, in container):
More than 100 GB of storage space is available. Free Space: 355.5G GB
Expected behavior
Expecting successful execution of shell script and filter.
Screenshots
Desktop (please complete the following information):
Linux SHADE 5.4.180 #1.5 SMP PREEMPT Tue Apr 25 16:40:09 CST 2023 aarch64 aarch64 aarch64 GNU/Linux. Ubuntu 22.04.5 LTS
27.3.1, build ce12230
Additional context
Shell script:
Docker Compose:
autobrr:
container_name: autobrr
image: ghcr.io/autobrr/autobrr:latest
network_mode: bridge
restart: unless-stopped
# logging:
# driver: json-file
# options:
# max-file: ${DOCKERLOGGING_MAXFILE}
# max-size: ${DOCKERLOGGING_MAXSIZE}
# user: 1000:1000
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- AUTOBRR__LOG_PATH="/log"
- AUTOBRR__LOG_MAX_SIZE=64 # string/int without MB
- AUTOBRR__LOG_MAX_BACKUPS=7
- AUTOBRR__LOG_LEVEL=INFO
volumes:
- ${CONF}/autobrr/:/config
- ${LOGS}/autobrr/:/log
- ${MEDIA}:/Media
ports:
- 7474:7474
The text was updated successfully, but these errors were encountered: