Skip to content
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

No response from Docker host from my local machine #127

Closed
mihui opened this issue Jul 15, 2024 · 1 comment · Fixed by #128 or #129
Closed

No response from Docker host from my local machine #127

mihui opened this issue Jul 15, 2024 · 1 comment · Fixed by #128 or #129
Assignees
Labels

Comments

@mihui
Copy link

mihui commented Jul 15, 2024

I used the ClamAV Dockerfile and deployed to my Kubernetes Cluster, it is working perfectly with this library.

However, when I am using the podman with my local nodejs app connected, it returns nothing:

const options = {
  debugMode: true,
  removeInfected: true,
  clamdscan: {
    host: '127.0.0.1',
    port: 3310,
    timeout: 999999,
    localFallback: false
  },
  preference: 'clamdscan',
};
const clamScan = await new NodeClam().init(options);
clamScan.scanFiles(['/path/to/virus.com'], (err, goods, bads, viruses) => {
  console.log(err, goods, bads, viruses);
  // It returns
  // null [] [] {}
});

Logs in console:

node-clam: Scanning a list of 1 passed files. [
  '/path/to/virus.com'
]
node-clam: Provided stream is readable.
node-clam: Attempting to establish socket/TCP connection for "scanStream"
node-clam: using remote server: 127.0.0.1:3310
node-clam: Received final data from stream.
node-clam: The input stream has dried up.
node-clam: ClamAV is done scanning.
node-clam: Raw Response:   
node-clam: Error Response:  
node-clam: File may be INFECTED!
node-clam: Scan Complete!
node-clam: Num Bad Files:  0
node-clam: Num Good Files:  0
node-clam: Num Viruses:  0
null [] [] {}
node-clam: Socket/Host connection closed.
node-clam: ClamAV socket has been closed! false

Logs in Docker:

Mon Jul 15 06:19:49 2024 -> instream(192.168.127.1@54184): Win.Test.EICAR_HDB-1 FOUND

My environment:

  • macOS: 14.5
  • podman: version 5.1.1
@kylefarris
Copy link
Owner

Sorry, I just got back from a family vacation. I will take a look at your PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants