安装了 xinetd,启动了它,但在几个服务上显示“正在删除”,包括我在 /etc/xinetd.d/ 中配置的服务

安装了 xinetd,启动了它,但在几个服务上显示“正在删除”,包括我在 /etc/xinetd.d/ 中配置的服务

我是 xinetd 的新手,但想模仿现场使用它的旧机器。所以我复制了那台机器上的配置(在适当的情况下更改名称),然后尝试启动 xinetd。然后意识到,它没有安装在我新安装的 centos7 上。所以我用 yum 安装了。然后 systemctl enable xinetd 然后我执行了 systemctl start xinetd 然后执行了 systtem status xinetd 这让我很头疼,它显示它正在删除我的服务(kcamera)但我不知道为什么或为什么。然后 sudo lsof -i -P -n | grep LISTEN 显示根本没有 xinetd 在运行。

好奇我错过了什么。(如果这有区别的话,我没有碰过防火墙)。

[root@dhcp-093 etc]# systemctl status xinetd
● xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-02-15 15:19:37 EST; 45min ago
  Process: 12125 ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid $EXTRAOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 12126 (xinetd)
   CGroup: /system.slice/xinetd.service
           └─12126 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid

Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing discard
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing discard
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing echo
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing echo
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing kcamera
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing tcpmux
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing time
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: removing time
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking options compiled in.
Feb 15 15:19:37 dhcp-093.apo.nmsu.edu xinetd[12126]: Started working: 0 available services

我可能错误地认为,只要将我的 kcamera 添加到 /etc/xinetd.d 就足以在 xinetd 启动后让一切顺利进行。虽然该文件夹中的 LS 显示了许多文件,例如 tcpmux-server(它是上面的文件之一),但它表示正在“删除”。

不确定还要尝试、寻找或配置什么。

xinetd.conf

#
# This is the master xinetd configuration file. Settings in the
# default section will be inherited by all service configurations
# unless explicitly overridden in the service configuration. See
# xinetd.conf in the man pages for a more detailed explanation of
# these attributes.

defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
#       enabled         =
#       disabled        =
# Define general logging characteristics.
        log_type        = SYSLOG daemon info
        log_on_failure  = HOST
        log_on_success  = PID HOST DURATION EXIT

# Define access restriction defaults
#
#       no_access       =
#       only_from       =
#       max_load        = 0
        cps             = 50 10
        instances       = 50
        per_source      = 10

# Address and networking defaults
#
#       bind            =
#       mdns            = yes
        v6only          = no

# setup environmental attributes
# setup environmental attributes
#
#       passenv         =
        groups          = yes
        umask           = 002

# Generally, banners are not used. This sets up their global defaults
#
#       banner          =
#       banner_fail     =
#       banner_success  =
}

includedir /etc/xinetd.d

/etc/xinetd.d/kcamera

service kcamera
{
    disable     = no
    socket_type = stream
    protocol    = tcp
    wait        = no
    user        = arc
    group       = datawrite
    server      = /home/workers/kosmosICC/kcamera/kcamerad
    groups      = yes
    flags       = REUSE
    passenv     =
    umask       = 0002
    log_on_failure  += USERID
    log_on_success  += PID HOST EXIT
}

/etc/services 中的一行:

kcamera         30001/tcp   # kosmos camera

答案1

我没有看到 xinetd 服务中定义的端口号。如果没有这个端口号,它怎么知道要监听哪个端口?将正确的端口号重新添加到配置中。

相关内容