Project

General

Profile

Actions

Bug #35089

closed

Starting or Restarting foreman.socket will raise a harmless "TCP_NODELAY failed: Operation not supported" error in Red Hat Satellite 6.9/6.10/6.11

Added by Evgeni Golov almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2099620

Description of problem:

When we try to start the foreman.service, It triggers the startup of foreman.socket at the backend.

During this startup, we get to see "TCP_NODELAY failed: Operation not supported" printed in the system logs which is harmless in nature but unexpected to see.

Version-Release number of selected component (if applicable):

Red Hat Satellite 6.9
Red Hat Satellite 6.10
Red Hat Satellite 6.11

How reproducible:

Always

Steps to Reproduce:

1. Install a Satellite 6.9\6.10\6.11

2. Try;

  1. for i in stop start; do systemctl $i foreman.socket; sleep 5; done
or simply # systemctl restart foreman.socket
or
  1. foreman-maintain service stop
  2. foreman-maintain service start

3. Monitor /var/log/messages or check the status of foreman.socket using systemctl

Actual results:

Jun 21 16:17:37 satellite.example.com systemd1: TCP_NODELAY failed: Operation not supported
Jun 21 16:17:37 satellite.example.com systemd1: Starting Foreman HTTP Server Accept Sockets.
Jun 21 16:17:37 satellite.example.com systemd1: Listening on Foreman HTTP Server Accept Sockets.

Expected results:

No "TCP_NODELAY failed: Operation not supported" message

Additional info:

The foreman.socket is actually a UNIX socket but it includes a TCP option in it i.e. "NoDelay=true" which is a TCP only option

  1. grep NoDelay /usr/share/foreman/extras/systemd/foreman.socket /usr/lib/systemd/system/foreman.socket
    /usr/share/foreman/extras/systemd/foreman.socket:NoDelay=true
    /usr/lib/systemd/system/foreman.socket:NoDelay=true
  1. man 7 tcp | grep TCP_NODELAY A4 | tail -6
    -

    TCP_NODELAY
    If set, disable the Nagle algorithm. This means that segments are always sent as soon as possible, even if there is only a small amount of data.
    When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets, which results
    in poor utilization of the network. This option is overridden by TCP_CORK; however, setting this option forces an explicit flush of pending output,
    even if TCP_CORK is currently set.

But since we explicily mention "NoDelay" to "True" , When the unix socket starts, It tries to honor that option but fails because TCP_NODELAY is tcp only option.

Workaround:

  • Edit /etc/systemd/system/foreman.socket.d/installer.conf and add "NoDelay=false" at the end of the file
  1. cat /etc/systemd/system/foreman.socket.d/installer.conf
    [Socket]
    ListenStream=
    ListenStream=/run/foreman.sock
    SocketUser=apache
    SocketMode=0600
    NoDelay=false
  • systemctl daemon-reload
  • systemctl restart foreman.socket

Unless, my explanation is wrong or missing some important part and due to some reason, NoDelay should always be set to true in the case of foreman.socket, I will suggest having this properly handled by satellite-installer and set "NoDelay=false" in /etc/systemd/system/foreman.socket.d/installer.conf .

Actions #1

Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Evgeni Golov
  • Pull request https://github.com/theforeman/puppet-foreman/pull/1062 added
Actions #2

Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases 3.4.0 added
Actions #3

Updated by Evgeni Golov almost 2 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF