首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >系统-网络.套接字失败。对该怎么办有什么想法吗?

系统-网络.套接字失败。对该怎么办有什么想法吗?
EN

Ask Ubuntu用户
提问于 2019-01-20 17:15:55
回答 2查看 3K关注 0票数 2

我的服务器上的Internet连接有问题。我不能使用Filezilla或Webmin,因为我的systemd-networkd.套接字似乎是错误的或者什么的。你能帮帮我吗?这是我的输出:

$ systemctl system d-networkd.套接字加载失败$ systemctl状态系统d-networkd.套接字加载:加载(/lib/systemd/system/systemd-networkd.套接字;已启用;供应商预置:已启用) Active: failed (结果:service-start-limt-命中)

同时,我也收到了这样的信息:

1月20日16:34:21示例服务器系统d:systemd-networkd.套接字:套接字服务系统d-networkd.service已经激活,拒绝。网络服务网络链接套接字未能侦听

EN

回答 2

Ask Ubuntu用户

发布于 2020-12-21 13:18:14

在ubuntu20.04上,您可以打开应用程序系统-管理器。然后单击顶部栏中的“服务”按钮,就会打开一个下拉菜单.您需要选择“套接字”选项。左面板将显示套接字服务列表,在那里您可以找到服务名称为'systemd-networkd‘。对这项服务,必须有两个绿色的滴答标记。如果没有,则选择该服务并单击顶部栏中的“启用”按钮,然后单击“开始”按钮(绿色按钮)启动服务。这将使两个绿色滴答与该服务在左面板。

票数 1
EN

Ask Ubuntu用户

发布于 2021-10-29 19:33:53

当我输入命令sudo systemctl status systemd-networkd.socket时,我有一个错误:

代码语言:javascript
复制
systemd-networkd.socket: Socket service systemd-networkd.service already active, refusing.
systemd[1]: Failed to listen on Network Service Netlink Socket.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

我们需要找到解决办法,以避免使用ioctl, ifconfig, route,而是选择netlink/rtnetlink在用户空间和Linux内核之间进行通信。Netlink允许您测试大量内核子系统--接口、路由、网络数据包筛选器。

  • 如果您处于死胡同,并且不知道有哪些错误,那么首先修复您需要了解的问题:您使用的是network-manager还是systemd-networkd
  • Rtnetlink在使用根目录时遇到了一些困难,因此,它目前是如何使用的。它更容易使用在附近的汽车,这样你就不会再次绊倒它,你没有问题。
  • 在Linux2.2中,一个接口可以有多个IP地址;它们是可选的设备别名。
  • Rtnetlink除了标准netlink消息RTM_ (返回NETLINK_ )之外,还包含消息类型。

For使用rtnetlink安装

sudo apt install socket

将套接字与rtnetlink一起使用,命令for示例

  • sudo socket -p RTM_GETTCLASS -p network-manager -s | host localhost

产出:

代码语言:javascript
复制
localhost has address 127.0.0.1
localhost has IPv6 address ::1
  • sudo socket -p RTM_GETTCLASS -p network-manager -s | host -aCdilrTvVw | /

产出:

代码语言:javascript
复制
host 9.11.3-1ubuntu1.15-Ubuntu

手册:

https://man7.org/linux/man-pages/man7/rtnetlink.7.html

https://man7.org/linux/man-pages/man7/netlink.7.html

代码语言:javascript
复制
rtnetlink, NETLINK_ROUTE - Linux IPv4 routing socket.

RTM_NEWLINK, RTM_DELLINK, RTM_GETLINK - create, delete or get information about specific network interface.
RTM_NEWADDR, RTM_DELADDR, RTM_GETADDR - add, remove or get address information, the IP associated with the interface.
RTM_NEWROUTE, RTM_DELROUTE, RTM_GETROUTE - create, delete, or get information about a network route.
RTM_NEWNEIGH, RTM_DELNEIGH, RTM_GETNEIGH - add, remove or get information about a record, made by a neighboring machine (for example, an ARP entry).
RTM_NEWRULE, RTM_DELRULE, RTM_GETRULE - add, remove or get a rule routing.
RTM_NEWQDISC, RTM_DELQDISC, RTM_GETQDISC - add, remove or get a shipping method package to the queue.
RTM_NEWTCLASS, RTM_DELTCLASS, RTM_GETTCLASS - add, remove or get traffic class. 
RTM_NEWTFILTER, RTM_DELTFILTER, RTM_GETTFILTER - add, remove or get information about a filter traffic.
RTMGRP_LINK - this group receives notifications about changes in network interfaces (interface was removed, added, down, up)
RTMGRP_IPV4_IFADDR - this group receives notifications about changes in IPv4 interface addresses (the address has been added or removed)
RTMGRP_IPV6_IFADDR - this group receives notifications about changes in IPv6 interface addresses (the address has been added or removed)
RTMGRP_IPV4_ROUTE - this group receives notification of changes in the routing table for IPv4 addresses
RTMGRP_IPV6_ROUTE - this group receives notification of changes in the routing table for IPv6 addresses 
NETLINK_ROUTE - receive notifications about changes to the routing table and network interfaces, can also be used to change all the parameters of the above objects.
NETLINK_USERSOCK - reserved for defining custom protocols.
NETLINK_FIREWALL - used to transfer IPv4 packets from the network filter to the user level
NETLINK_INET_DIAG - monitoring inet sockets
NETLINK_NFLOG - network/packet filter ULOG
NETLINK_SELINUX - receive notifications from the Selinux system
NETLINK_NETFILTER - working with the network filter subsystem
NETLINK_KOBJECT_UEVENT - receive kernel messages
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1111422

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档