Welcome to Centmin Mod Community
Register Now

Line is not an assignment in file /etc/sysctl.d/101-sysctl.conf

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Aug 2, 2019.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,405
    320
    83
    May 31, 2014
    Ratings:
    +608
    Local Time:
    9:07 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Please fill in any relevant information that applies to you:
    • CentOS Version:CentOS 7 64bit
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed: 1.17.2
    • PHP Version Installed: 7.3.8
    • MariaDB MySQL Version Installed: 10.3.x
    • When was last time updated Centmin Mod code base ? : just now

    Hello

    I just update the system and i got this:
    Code:
    Job for systemd-sysctl.service failed because the control process exited with error code. See "systemctl status systemd-sysctl.service" and "journalctl -xe" for details.
    Then i check it and i got this:
    Code:
    systemctl status systemd-sysctl.service
    ‚óŹ systemd-sysctl.service - Apply Kernel Variables
       Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static; vendor preset: disabled)
       Active: failed (Result: exit-code) since Thu 2019-08-01 20:04:19 UTC; 2min 45s ago
         Docs: man:systemd-sysctl.service(8)
               man:sysctl.d(5)
     Main PID: 28310 (code=exited, status=1/FAILURE)
    
    Aug 01 20:04:19 server.domain.com systemd[1]: Starting Apply Kernel Variables...
    Aug 01 20:04:19 server.domain.com systemd-sysctl[28310]: Line is not an assignment in file '/etc/sysctl.d/101-sysctl.conf': (null)
    Aug 01 20:04:19 server.domain.com systemd[1]: systemd-sysctl.service: main process exited, code=exited, status=1/FAILURE
    Aug 01 20:04:19 server.domain.com systemd[1]: Failed to start Apply Kernel Variables.
    Aug 01 20:04:19 server.domain.com systemd[1]: Unit systemd-sysctl.service entered failed state.
    Aug 01 20:04:19 server.domain.com systemd[1]: systemd-sysctl.service failed.
    Contents of /etc/sysctl.d/101-sysctl.conf :
    Code:
    # centminmod added
    fs.nr_open=12000000
    fs.file-max=9000000
    net.core.wmem_max=16777216
    net.core.rmem_max=16777216
    net.ipv4.tcp_rmem=8192 87380 16777216
    net.ipv4.tcp_wmem=8192 65536 16777216
    net.core.netdev_max_backlog=65536
    net.core.somaxconn=65535
    net.core.optmem_max=8192
    net.ipv4.tcp_fin_timeout=10
    net.ipv4.tcp_keepalive_intvl=30
    net.ipv4.tcp_keepalive_probes=3
    net.ipv4.tcp_keepalive_time=240
    net.ipv4.tcp_max_syn_backlog=65536
    net.ipv4.tcp_sack=1
    net.ipv4.tcp_syn_retries=3
    net.ipv4.tcp_synack_retries = 2
    net.ipv4.tcp_tw_recycle = 0
    net.ipv4.tcp_tw_reuse = 0
    net.ipv4.tcp_max_tw_buckets = 1440000
    vm.swappiness=10
    vm.min_free_kbytes=65536
    net.ipv4.ip_local_port_range=1024 65535
    net.ipv4.tcp_slow_start_after_idle=0
    net.ipv4.tcp_limit_output_bytes=65536
    net.ipv4.tcp_rfc1337=1
    net.ipv4.conf.all.accept_redirects = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.all.log_martians = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.conf.all.secure_redirects = 0
    net.ipv4.conf.all.send_redirects = 0
    net.ipv4.conf.default.accept_redirects = 0
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.conf.default.log_martians = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.default.secure_redirects = 0
    net.ipv4.conf.default.send_redirects = 0
    net.ipv4.icmp_echo_ignore_broadcasts = 1
    net.ipv4.icmp_ignore_bogus_error_responses = 1
    net.netfilter.nf_conntrack_helper=0
    net.netfilter.nf_conntrack_max = 524288
    net.netfilter.nf_conntrack_tcp_timeout_established = 28800
    net.netfilter.nf_conntrack_generic_timeout = 60
    net.ipv4.tcp_challenge_ack_limit = 999999999
    net.ipv4.tcp_mtu_probing = 1
    net.ipv4.tcp_base_mss = 1024
    vm.overcommit_memory = 1
    net.unix.max_dgram_qlen = 4096
    Any ideas?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,080
    9,188
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,097
    Local Time:
    4:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    output for
    Code (Text):
    sysctl --system
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,405
    320
    83
    May 31, 2014
    Ratings:
    +608
    Local Time:
    9:07 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Code:
    sysctl --system
    * Applying /usr/lib/sysctl.d/00-system.conf ...
    * Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
    kernel.yama.ptrace_scope = 0
    * Applying /etc/sysctl.d/101-sysctl.conf ...
    sysctl: /etc/sysctl.d/101-sysctl.conf(1): invalid syntax, continuing...
    fs.nr_open = 12000000
    fs.file-max = 9000000
    net.core.wmem_max = 16777216
    net.core.rmem_max = 16777216
    net.ipv4.tcp_rmem = 8192 87380 16777216
    net.ipv4.tcp_wmem = 8192 65536 16777216
    net.core.netdev_max_backlog = 65536
    net.core.somaxconn = 65535
    net.core.optmem_max = 8192
    net.ipv4.tcp_fin_timeout = 10
    net.ipv4.tcp_keepalive_intvl = 30
    net.ipv4.tcp_keepalive_probes = 3
    net.ipv4.tcp_keepalive_time = 240
    net.ipv4.tcp_max_syn_backlog = 65536
    net.ipv4.tcp_sack = 1
    net.ipv4.tcp_syn_retries = 3
    net.ipv4.tcp_synack_retries = 2
    net.ipv4.tcp_tw_recycle = 0
    net.ipv4.tcp_tw_reuse = 0
    net.ipv4.tcp_max_tw_buckets = 1440000
    vm.swappiness = 10
    vm.min_free_kbytes = 65536
    net.ipv4.ip_local_port_range = 1024 65535
    net.ipv4.tcp_slow_start_after_idle = 0
    net.ipv4.tcp_limit_output_bytes = 65536
    net.ipv4.tcp_rfc1337 = 1
    net.ipv4.conf.all.accept_redirects = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.all.log_martians = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.conf.all.secure_redirects = 0
    net.ipv4.conf.all.send_redirects = 0
    net.ipv4.conf.default.accept_redirects = 0
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.conf.default.log_martians = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.default.secure_redirects = 0
    net.ipv4.conf.default.send_redirects = 0
    net.ipv4.icmp_echo_ignore_broadcasts = 1
    net.ipv4.icmp_ignore_bogus_error_responses = 1
    net.netfilter.nf_conntrack_helper = 0
    net.netfilter.nf_conntrack_max = 524288
    net.netfilter.nf_conntrack_tcp_timeout_established = 28800
    net.netfilter.nf_conntrack_generic_timeout = 60
    net.ipv4.tcp_challenge_ack_limit = 999999999
    net.ipv4.tcp_mtu_probing = 1
    net.ipv4.tcp_base_mss = 1024
    vm.overcommit_memory = 1
    net.unix.max_dgram_qlen = 4096
    * Applying /usr/lib/sysctl.d/50-default.conf ...
    kernel.sysrq = 16
    kernel.core_uses_pid = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.default.promote_secondaries = 1
    net.ipv4.conf.all.promote_secondaries = 1
    fs.protected_hardlinks = 1
    fs.protected_symlinks = 1
    * Applying /etc/sysctl.d/50-tcp_fastopen.conf ...
    net.ipv4.tcp_fastopen = 3
    * Applying /etc/sysctl.d/99-sysctl.conf ...
    net.ipv6.conf.all.autoconf = 0
    net.ipv6.conf.default.autoconf = 0
    net.ipv6.conf.eth0.autoconf = 0
    net.ipv6.conf.all.accept_ra = 0
    net.ipv6.conf.default.accept_ra = 0
    net.ipv6.conf.eth0.accept_ra = 0
    vm.nr_hugepages = 5564
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    * Applying /usr/lib/sysctl.d/elasticsearch.conf ...
    vm.max_map_count = 262144
    * Applying /etc/sysctl.conf ...
    net.ipv6.conf.all.autoconf = 0
    net.ipv6.conf.default.autoconf = 0
    net.ipv6.conf.eth0.autoconf = 0
    net.ipv6.conf.all.accept_ra = 0
    net.ipv6.conf.default.accept_ra = 0
    net.ipv6.conf.eth0.accept_ra = 0
    vm.nr_hugepages = 5564
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1

    Error:
    Code:
    sysctl: /etc/sysctl.d/101-sysctl.conf(1): invalid syntax, continuing...
    /etc/sysctl.d/101-sysctl.conf line one is:
    Code:
    # centminmod added
    If the commented line doesn't count then next line is:
    Code:
    fs.nr_open=12000000
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,405
    320
    83
    May 31, 2014
    Ratings:
    +608
    Local Time:
    9:07 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok i fix it....

    I don't know how but i had on line one the command:
    Code:
    nano /etc/sysctl.d/101-sysctl.conf
    So i remove that line and then it worked....
     
    • Informative Informative x 1
  5. eva2000

    eva2000 Administrator Staff Member

    41,080
    9,188
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,097
    Local Time:
    4:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    haha guess you copied and pasted :)