Menu

#19 TCP port change and Local TCPsocket support

104.x
closed-works-for-me
nobody
None
4
2024-03-12
2023-06-23
Julien C.
No

Dear Markus,

We need to deploy clamsap on customer's SAP system running with instance number 10, which means that GW will listen on TCP port 3310, the same as the default TCP port used by clamd daemon.

We tried to change the clamd TCP port to another value but clamsap is still trying to reach clamd on default port 3310.
We also tried to disable TCP port and use only local TCPsocket /var/lib/clamav/clamd-socket, but clamsap fail with same issue. (cf attachment)

TCP port is hardcoded in libclamdsap and cannot be changed, but it should read configuration from the clamd.conf file.
I found also that LOCAL_SOCKET_PATH is commented out in the source code.

Is there any chance that future release of clamsap will support local TCPsocket or anpoother TCP port, imported from clamd.conf configuration file ?

Thanks & Regards
Julien

1 Attachments

Discussion

  • Markus Strehle

    Markus Strehle - 2023-06-30

    Hello Julien,

    I have setup your configuration and I see clamd running on different than 3310 and from VSI that is supported too.

    What I did

    1. Changed the TCP port in clamd.conf . Depending on your OS , search for clamd.conf and change
      or add :
      -
      TCPSocket 8888
      TCPAddr 127.0.0.1

    Ensure that no other sections with TCPSocket are in clamd.conf.

    1. Restart clamd, e.g. sudo clamd -c /etc/clamd.conf
    2. Check LISTEN, e.g. netstat -ln , search for entries and check that 8888 is visible. In your case 3310 should be there as well
    3. VSI configuration needs parameter: INITSERVERS , the default of it is tcp://127.0.0.1:3310, therefore a default clamd and VSI finds each other
    4. Change or create a parameter INITSERVERS with value tcp://127.0.0.1:8888 , restart VSI

    If clamd is not available you see now following error

    Connect to ClamAV daemon (process clamd) failed. Connected host: 127.0.0.1 on port: 8888.". Please see also SAP note 2253580.<<<

    regards,
    -markus

     
  • Markus Strehle

    Markus Strehle - 2023-06-30

    here my clamconf

    Software settings

    Version: 0.103.8
    Optional features supported: MEMPOOL IPv6 AUTOIT_EA06 BZIP2 LIBXML2 PCRE2 ICONV JSON

    Database information

    Database directory: /var/lib/clamav
    daily.cvd: version 26954, sigs: 2037855, built on Thu Jun 29 07:29:58 2023
    main.cld: version 62, sigs: 6647427, built on Thu Sep 16 12:32:42 2021
    bytecode.cvd: version 334, sigs: 91, built on Wed Feb 22 21:33:21 2023
    main.cvd: version 62, sigs: 6647427, built on Thu Sep 16 12:32:42 2021
    Total number of signatures: 15332800

    Platform information

    uname: Linux 3.10.0-1160.25.1.el7.x86_64 #1 SMP Tue Apr 13 18:55:45 EDT 2021 x86_64
    OS: linux-gnu, ARCH: x86_64, CPU: x86_64
    Full OS version: "Red Hat Enterprise Linux Server release 7.9 (Maipo)"
    zlib version: 1.2.7 (1.2.7), compile flags: a9
    platform id: 0x0a2181810800000002040805

     
  • Julien C.

    Julien C. - 2023-06-30

    Hi Markus,

    I missed that parameter INITSERVERS. It works in my setup.
    It seems that VSI doesn't support local socket, so we will change the clamd tcp port to an used port.

    Thanks for your answer and your support.

    Best Regards,
    Julien

     
  • Markus Strehle

    Markus Strehle - 2024-03-12
    • status: open --> closed-works-for-me
     

Log in to post a comment.

MongoDB Logo MongoDB