Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Unexpected exit code from freshclam: 127 #217

Open
cmatchett1982 opened this issue Jun 16, 2023 · 6 comments
Open

Unexpected exit code from freshclam: 127 #217

cmatchett1982 opened this issue Jun 16, 2023 · 6 comments

Comments

@cmatchett1982
Copy link

cmatchett1982 commented Jun 16, 2023

If someone could help understand that the issue is here.

Attempting to create directory /tmp/clamav_defs.
Starting freshclam with defs in /tmp/clamav_defs.
Unexpected exit code from freshclam: 127.
File does not exist: main.cld
File does not exist: main.cvd
File does not exist: daily.cld
File does not exist: daily.cvd
File does not exist: bytecode.cld

@cmatchett1982
Copy link
Author

Does this mean that the definitions are not in the S3 bucket?

@cmatchett1982
Copy link
Author

START RequestId: 6a9ed9db-148d-4e4b-89cf-6f30688a9228 Version: $LATEST
Script starting at 2023/06/16 21:47:50 UTC
Attempting to create directory /tmp/clamav_defs.
Starting freshclam with defs in /tmp/clamav_defs.
freshclam output:
./bin/freshclam: error while loading shared libraries: libclamav.so.9: cannot open shared object file: No such file or directory
Unexpected exit code from freshclam: 127.
File does not exist: main.cld
File does not exist: main.cvd
File does not exist: daily.cld
File does not exist: daily.cvd
File does not exist: bytecode.cld
File does not exist: bytecode.cvd
Script finished at 2023/06/16 21:47:50 UTC
END RequestId: 6a9ed9db-148d-4e4b-89cf-6f30688a9228
REPORT RequestId: 6a9ed9db-148d-4e4b-89cf-6f30688a9228 Duration: 557.54 ms Billed Duration: 558 ms Memory Size: 1024 MB Max Memory Used: 79 MB Init Duration: 344.79 ms

@JarmBlueOak
Copy link

You may want to check your S3 permissions for the lambda function role and bucket policy as S3 always responds with does not exist if permission is denied.

@cmatchett1982
Copy link
Author

cmatchett1982 commented Jun 17, 2023

the iam permissions assigned to the lambda execution role is s3:* and there is no bucket policy. do i need to install libtool-ltdl

@cmatchett1982
Copy link
Author

cmatchett1982 commented Jun 17, 2023

it appears that the code is skipping

'to_download = clamav.update_defs_from_s3(
s3_client, AV_DEFINITION_S3_BUCKET, AV_DEFINITION_S3_PREFIX
)

for download in to_download.values():
    s3_path = download["s3_path"]
    local_path = download["local_path"]
    print("Downloading definition file %s from s3://%s" % (local_path, s3_path))
    s3.Bucket(AV_DEFINITION_S3_BUCKET).download_file(s3_path, local_path)
    print("Downloading definition file %s complete!" % (local_path))'

@cmatchett1982
Copy link
Author

i added in a count of 'to_download'

Attempting to create directory /tmp/clamav_defs.
files to download: {}
Number of objects to download: 0
/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:./bin
Starting freshclam with defs in /tmp/clamav_defs.
freshclam output:
./bin/freshclam: error while loading shared libraries: libltdl.so.7: cannot open shared object file: No such file or directory
Unexpected exit code from freshclam: 127.
File does not exist: main.cld
File does not exist: main.cvd
File does not exist: daily.cld
File does not exist: daily.cvd
File does not exist: bytecode.cld
File does not exist: bytecode.cvd
Script finished at 2023/06/17 15:00:31 UTC

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants