Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-1674

Bad interpreting of iotdb-env.sh causing somaxconn warning failed

    XMLWordPrintableJSON

Details

    Description

      See the code of iotdb-env.sh

      https://github.com/apache/iotdb/blob/b76a799c4346ba16caf468e0c8f191949ff612b4/server/src/assembly/resources/conf/iotdb-env.sh#L39

      https://github.com/apache/iotdb/blob/b76a799c4346ba16caf468e0c8f191949ff612b4/server/src/assembly/resources/conf/iotdb-env.sh#L49

      I have tested in my MacBook and a Linux virtual machine, the command outputs are:

      Linux

      [root@a0933215a07b iotdb]# sysctl net.core.somaxconn
      net.core.somaxconn = 128
      

      MacOS

      [myuser iotdb]# sysctl kern.ipc.somaxconn
      kern.ipc.somaxconn: 128 
      

      Here we can see using awk '{print $2}' will get '=' in Linux, casuing the condition check failed.

      The best solution is using sysctl -n option directly:

      Linux

      [root@a0933215a07b iotdb]# sysctl -n net.core.somaxconn
      128
      

      MacOS

      [myuser iotdb]# sysctl -n kern.ipc.somaxconn
      128 
      

       

       

      Attachments

        Activity

          People

            ericpai Eric Pai
            ericpai Eric Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: