AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-272326

lobi's questions

Martin Hope
lobi
Asked: 2019-10-03 06:01:13 +0800 CST

Crontab - 该月的第一个星期三,然后是该月的第一个星期一

  • 4

希望在每月的第一个星期一执行脚本,然后在每月的第一个星期三执行不同的脚本。

问题是,例如,如果新的月份从星期二开始,那么“本月的第一个星期三”动作将首先出现。我想对此进行配置,以便“本月的第一个星期三”操作仅在该月的星期一之后发生。

逻辑可以用来从脚本的角度来解决这个问题,但问题是我需要在 cron 表达式中使用它,因为这是我可以在我正在使用的系统中安排它的唯一方法(它需要一个 cron 表达式来进行高级调度,并且这个系统的细节与这个问题无关)。

编辑: cron 执行的上述脚本之间没有依赖关系或关系。为了问题的简单起见,它们只是同一个 crontab 中的两个单独的 cronjobs。

linux
  • 1 个回答
  • 5191 Views
Martin Hope
lobi
Asked: 2016-08-10 12:09:34 +0800 CST

将流量镜像到 tcpdump 服务器并自动保存 pcaps

  • 0

希望端口镜像网络防火墙接口,将该接口连接到 Linux 服务器,并让该 Linux 服务器不断运行 tcpdump 并将输出存储在文件中。

具体来说,我的要求是当文件的大小达到特定数量时,一遍又一遍地保存 pcap 文件。

例如:

瞻博网络防火墙端口 2 镜像端口 1 上的所有流量。端口 2 连接到 Linux 服务器上的 eth0。Linux 服务器有一个 tcpdump 进程在 eth0 上不断运行。Linux 服务器配置为将流量保存到名为“tcpdump.pcap”的文件中,但是当 pcap 文件超过特定大小时,它会压缩并重命名为“tcpdump.pcap.0.gz”。当第二个文件超过特定大小时,它将被重命名为“tcpdump.pcap.1.gz”等。

这将允许我查看过去 X 时间内的网络流量(目前,我希望在过去 72 小时内获得可见性)。

这里的问题是我不知道如何完成上述操作。具体来说,如何让 tcpdump 连续运行,并自动保存 pcaps,并按时间顺序自动压缩和重命名?

linux tcpdump pcap
  • 1 个回答
  • 2388 Views
Martin Hope
lobi
Asked: 2015-11-14 14:56:47 +0800 CST

OpenVPN 客户端到客户端

  • 26

当使用client-to-client禁用的 TUN(第 3 层)OpenVPN 服务器时,我的客户端仍然可以相互交谈。

根据文档,客户端到客户端的配置应该防止这种情况发生:

如果您希望连接客户端能够通过 VPN 相互联系,请取消注释客户端到客户端指令。默认情况下,客户端只能访问服务器。

为什么禁用此选项时客户端可以继续相互通信?

这是我的服务器配置:

port 443
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh4096.pem
topology subnet
server 10.10.201.0 255.255.255.128
ifconfig-pool-persist ipp.txt
crl-verify /etc/openvpn/keys/crl.pem
push "route [omitted]"
push "dhcp-option DNS [omitted]"
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so login
cipher AES-256-CBC
tls-auth /etc/openvpn/keys/pfs.key 0
verb 4
linux
  • 3 个回答
  • 70323 Views
Martin Hope
lobi
Asked: 2015-10-27 10:07:23 +0800 CST

无法使用 grep 正则表达式搜索包含句点的文件名

  • 0

Ubuntu 14.x。使用 grep 搜索所有文件linuxtest-client2。这包括多个文件扩展名(csr、crt、key)。当我 grep 查找文件名的中间部分“2.”时,它还会返回除“2”之外还包含“2”的行。使用 ls -l 时。这会导致返回的结果在文件大小、日期和时间中具有“2”。

当文件大小之后没有句点时,为什么文件大小会被这个 grep 触发?:

root@ip-10-198-0-205:/etc/easy-rsa# ls -ltr keys/ | grep -E '*2.*'
total 228
-rw------- 1 root root 3272 Oct 15 18:28 ca.key
-rw-r--r-- 1 root root 2451 Oct 15 18:28 ca.crt
-rw------- 1 root root 3268 Oct 15 18:31 server.key
-rw-r--r-- 1 root root  769 Oct 15 18:42 dh4096.pem
-rw-r--r-- 1 root root 8244 Oct 19 15:36 02.pem
-rw-r--r-- 1 root root 8250 Oct 19 19:21 03.pem
-rw------- 1 root root 3394 Oct 23 19:48 removemetest.key
-rw-r--r-- 1 root root 1785 Oct 23 19:48 removemetest.csr
-rw-r--r-- 1 root root 8264 Oct 23 19:48 removemetest.crt
-rw-r--r-- 1 root root 8264 Oct 23 19:48 04.pem
-rw------- 1 root root 3394 Oct 23 20:50 revoketest449.key
-rw-r--r-- 1 root root 1789 Oct 23 20:50 revoketest449.csr
-rw-r--r-- 1 root root 8270 Oct 23 20:50 revoketest449.crt
-rw-r--r-- 1 root root 8270 Oct 23 20:50 05.pem
-rw-r--r-- 1 root root 3633 Oct 23 20:50 revoke-test.pem
-rw-r--r-- 1 root root 1182 Oct 23 20:50 crl.pem
-rw------- 1 root root 3394 Oct 23 20:54 linuxtest-client1.key
-rw-r--r-- 1 root root 1793 Oct 23 20:54 linuxtest-client1.csr
-rw-r--r-- 1 root root    3 Oct 23 20:54 serial.old
-rw-r--r-- 1 root root 8287 Oct 23 20:54 linuxtest-client1.crt
-rw-r--r-- 1 root root  909 Oct 23 20:54 index.txt.old
-rw-r--r-- 1 root root   21 Oct 23 20:54 index.txt.attr.old
-rw-r--r-- 1 root root 8287 Oct 23 20:54 06.pem
-rw------- 1 root root 3394 Oct 26 17:57 linuxtest-client2.key
-rw-r--r-- 1 root root 1793 Oct 26 17:57 linuxtest-client2.csr
-rw-r--r-- 1 root root    3 Oct 26 17:57 serial
-rw-r--r-- 1 root root 8287 Oct 26 17:57 linuxtest-client2.crt
-rw-r--r-- 1 root root   21 Oct 26 17:57 index.txt.attr
-rw-r--r-- 1 root root 1058 Oct 26 17:57 index.txt
-rw-r--r-- 1 root root 8287 Oct 26 17:57 07.pem

但是如果我不在 ls 上使用 -l,那么它会返回我正在寻找的正确结果,所以很明显我的正则表达式是正确的:

root@ip-10-198-0-205:/etc/easy-rsa# ls keys/ | grep -E '*2.*'
02.pem
linuxtest-client2.crt
linuxtest-client2.csr
linuxtest-client2.key
regex
  • 1 个回答
  • 1116 Views
Martin Hope
lobi
Asked: 2015-10-10 10:51:01 +0800 CST

在 OpenVPN 社区(免费)版本中使用物理加密令牌

  • 1

我目前正在设置 OpenVPN 以提供对多个客户的公司访问权限。我们的要求是使用证书、密码保护客户端密钥,以及对每个客户端使用双因素 (MFA) 身份验证。

我有一堆我想使用的 Fortinet FortiToken 200 令牌,但我找不到任何信息来说明如何将这些令牌与 OpenVPN 之类的东西一起使用。在环顾四周之后,我也找不到任何信息来说明如何将物理令牌与 OpenVPN 一起使用。

所以我的问题是,如何在 OpenVPN 中使用物理令牌?我不能使用 Google Authenticator 之类的东西,因为我们还计划通过他们的智能手机让客户端 VPN 进入。OpenVPN PKCS#11 how-to 文档写得很糟糕。

我开始相信,如果 MFA 是一项要求,那么 OpenVPN 目前根本不是一个可行的选择。

谢谢你的帮助。

openvpn
  • 1 个回答
  • 685 Views
Martin Hope
lobi
Asked: 2015-08-19 12:46:04 +0800 CST

在 OSI 模型的每一层建立连接的最佳方法

  • -3

我们都知道 ping 是建立第 3 层连接最常用的方法。第 1 层连接由链路灯建立。第 2 层连接是通过检查链路协议是否显示为启动(或者您看到 MAC 地址)来建立的,但是非以太网第 2 层连接如何?第 4、5、6 和 7 层怎么样?

所以,问题是:在第 2、4、5、6 和 7 层明确建立连接的常用方法是什么?

一些想法突然出现在我的脑海中:

1) telnet 到端口 80/443 用于第 7 层连接

2)使用netcat(如何?)

connection
  • 2 个回答
  • 1701 Views
Martin Hope
lobi
Asked: 2015-06-18 10:04:30 +0800 CST

两个 AWS 实例之间的 Strongswan VPN 隧道无法连接

  • 11

我正在尝试在两个运行 Ubuntu 14.04.2 LTS 的 Amazon AWS EC2 实例之间使用 StrongSwan 5.1.2 设置 VPN 隧道。在使用 StrongSwan 之前,我在 Amazon RedHat AMI 上使用了 open(libre)swan,效果很好。出于某种原因,我什至无法让 IKE 在这里为 StrongSwan 工作。我三次检查了我的 AWS 配置,一切看起来都不错,所以肯定是 StrongSwan 配置有问题。

正如您将在下面看到的,我得到的错误是"Error writing to socket: Invalid argument"。我在网上看了,真的找不到解决办法。我确信我的 strongswan ipsec.conf 配置不正确。

这是我正在使用的内容:

Instance #1: N.Virginia - 10.198.0.164 with public EIP 54.X.X.X
Instance #2: Oregon - 10.194.0.176 with public EIP 52.Y.Y.Y

(简单)拓扑如下:

[ Instance #1 within N.Virginia VPC <-> Public internet <-> Instance #2 within Oregon VPC ]

我验证了以下 AWS 配置是正确的:

Security groups permit all
IP information is correct
Src/Dest disabled on both instances
ACLs permit all
routes are present and correct (route to 10.x will point to that local instance in order to be routed out to the VPN tunnel)

下面是/etc/ipsec.conf (这是来自俄勒冈州,但在 N.Virginia 实例上是相同的,除了左|右值颠倒了):

config setup
        charondebug="dmn 2, mgr 2, ike 2, chd 2, job 2, cfg 2, knl 2, net 2, enc 2, lib 2"
conn aws1oexternal-aws1nvexternal
        left=52.Y.Y.Y (EIP)
        leftsubnet=10.194.0.0/16
        right=54.X.X.X (EIP)
        rightsubnet=10.198.0.0/16
        auto=start
        authby=secret
        type=tunnel
        mobike=no
        dpdaction=restart

下面是 /etc/ipsec.secrets *(显然,对于其他实例相反):

54.X.X.X 52.Y.Y.Y : PSK "Key_inserted_here"

下面是 /etc/strongswan.conf:

charon {
        load_modular = yes
        plugins {
                include strongswan.d/charon/*.conf
        }
}

下面是/etc/sysctl.conf:

net.ipv4.ip_forward=1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0

这是 /var/log/syslog 的调试输出这里的问题似乎是“错误写入套接字:无效参数;在我尝试了一切之后,我继续得到同样的错误:

Jun 17 17:34:48 ip-10-198-0-164 charon: 13[IKE] retransmit 5 of request with message ID 0
Jun 17 17:34:48 ip-10-198-0-164 charon: 13[NET] sending packet: from 54.X.X.X[500] to 52.Y.Y.Y[500] (1212 bytes)
Jun 17 17:34:48 ip-10-198-0-164 charon: 03[JOB] next event in 75s 581ms, waiting]
Jun 17 17:34:48 ip-10-198-0-164 charon: 16[NET] sending packet: from 54.X.X.X[500] to 52.Y.Y.Y[500]
Jun 17 17:34:48 ip-10-198-0-164 charon: 13[MGR] checkin IKE_SA aws1vexternal-aws1oexternal[1]
Jun 17 17:34:48 ip-10-198-0-164 charon: 13[MGR] check-in of IKE_SA successful.
Jun 17 17:34:48 ip-10-198-0-164 charon: 16[NET] error writing to socket: Invalid argument
Jun 17 17:36:04 ip-10-198-0-164 charon: 03[JOB] got event, queuing job for execution
Jun 17 17:36:04 ip-10-198-0-164 charon: 03[JOB] no events, waiting
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[MGR] checkout IKE_SA
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[MGR] IKE_SA aws1vexternal-aws1oexternal[1] successfully checked out
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[IKE] giving up after 5 retransmits
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[IKE] establishing IKE_SA failed, peer not responding
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[MGR] checkin and destroy IKE_SA aws1vexternal-aws1oexternal[1]
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[IKE] IKE_SA aws1vexternal-aws1oexternal[1] state change: CONNECTING => DESTROYING
Jun 17 17:36:04 ip-10-198-0-164 charon: 08[MGR] check-in and destroy of IKE_SA successful

以下是我迄今为止尝试过的:

1) 已验证的第 3 层

2)重新启动的机器

3) 尝试添加 leftid=

4) 尝试进行 ipsec update 然后 ipsec restart

5) 尝试在 confif 设置下添加 nat_traversal=yes(请注意,这无关紧要,因为 ipsec statusall 使用 IKEv2 验证,根据文档自动使用 nat_traversal)

6) 尝试省略 virtual_private <-- 根据 AWS openswan 文档使用,因此我将其包含在 strongswan 配置中。

7) 尝试在 /etc/sysctl.conf 中禁用 net.ipv4.conf.all.send_redirects = 0 和 net.ipv4.conf.all.accept_redirects = 0

8) 尝试使用私有 IP 而不是 EIP。我不再收到套接字错误,但是显然这两个 IP 无法相互通信以对等...

9) 尝试将此添加到 strongswan.conf: load = aes des sha1 sha2 md5 gmp random nonce hmac stroke kernel-netlink socket-default updown

10) 尝试使用leftfirewall=yes,没用

请帮忙!谢谢!

编辑#1:

迈克尔的回复清除了原来的问题,但是我有一个与路由相关的新问题。两个 VPN 实例都无法相互 ping 通。此外,当我尝试从任一子网中的随机实例 ping 到另一个随机实例或远端 VPN 实例时,我得到以下 ping 响应:

root@ip-10-194-0-80:~# ping 10.198.0.164
PING 10.198.0.164 (10.198.0.164) 56(84) bytes of data.
From 10.194.0.176: icmp_seq=1 Redirect Host(New nexthop: 10.194.0.176)
From 10.194.0.176: icmp_seq=2 Redirect Host(New nexthop: 10.194.0.176)
From 10.194.0.176: icmp_seq=3 Redirect Host(New nexthop: 10.194.0.176)
From 10.194.0.176: icmp_seq=4 Redirect Host(New nexthop: 10.194.0.176)

显然,这一定是两个 VPN 实例之间的路由问题(很可能是由于 strongswan 配置或实例路由表),因为俄勒冈子网中的 10.194.0.80 主机能够接收来自俄勒冈 VPN 实例的响应。路由表 + 实例上的跟踪路由:

root@ip-10-194-0-80:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.194.0.1      0.0.0.0         UG        0 0          0 eth0
10.194.0.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0

root@ip-10-194-0-80:~# traceroute 10.198.0.164
traceroute to 10.198.0.164 (10.198.0.164), 30 hops max, 60 byte packets
 1  10.194.0.176 (10.194.0.176)  0.441 ms  0.425 ms  0.409 ms^C

当我使用 openswan 时,它不需要我对每个实例的路由表进行任何手动修改。

这是 Oregon VPN 实例的路由表:

root@ip-10-194-0-176:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.194.0.1      0.0.0.0         UG        0 0          0 eth0
10.194.0.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0

我有点难过。

编辑#2:

看起来 VPN 实例之间的路由可能不是问题:/var/log/syslog 显示从一个 VPN 实例公共 IP 接收到另一个 VPN 实例的数据包

Jun 23 19:57:49 ip-10-194-0-176 charon: 10[NET] received packet: from 54.X.X.X[4500] to 10.194.0.176[4500] (76 bytes)

看起来这是与儿童安全协会有关的问题:

aws1oexternal-aws1nvexternal:   child:  10.194.0.0/16 === 10.198.0.0/16 TUNNEL, dpdaction=restart
Security Associations (1 up, 0 **connecting**):

/var/log/系统日志:

Jun 23 19:52:19 ip-10-194-0-176 charon: 02[IKE] failed to establish CHILD_SA, keeping IKE_SA
Jun 23 19:52:48 ip-10-194-0-176 charon: 11[IKE] queueing CHILD_CREATE task
Jun 23 19:52:48 ip-10-194-0-176 charon: 11[IKE]   activating CHILD_CREATE task
Jun 23 19:52:48 ip-10-194-0-176 charon: 06[IKE] establishing CHILD_SA aws1oexternal-aws1nvexternal
Jun 23 19:52:48 ip-10-194-0-176 charon: 10[IKE] received FAILED_CP_REQUIRED notify, no CHILD_SA built
Jun 23 19:52:48 ip-10-194-0-176 charon: 10[IKE] failed to establish CHILD_SA, keeping IKE_SA
Jun 23 19:52:49 ip-10-194-0-176 charon: 14[CFG] looking for a child config for 10.194.0.0/16 === 10.198.0.0/16 
Jun 23 19:52:49 ip-10-194-0-176 charon: 14[CFG] found matching child config "aws1oexternal-aws1nvexternal" with prio 10
Jun 23 19:52:49 ip-10-194-0-176 charon: 14[IKE] configuration payload negotiation failed, no CHILD_SA built
Jun 23 19:52:49 ip-10-194-0-176 charon: 14[IKE] failed to establish CHILD_SA, keeping IKE_SA

***编辑#3:问题已解决(嗯,实际上请参见下面的编辑#4...)****

问题已解决。

1) 我没有正确遵循 Michael 的配置说明。我还一起配置了 rightsourceip 和 leftsourceip,从而使两个实例都认为它们都是发起者。我确保一个是发起者,一个是请求者;这解决了 IKE 问题。

2)我发现我还必须明确设置 esp 参数。即使已经有默认值(aes128-sha1,3des-sha1),仍然必须设置 esp 参数,以便实例知道使用 esp OR ah(但不能同时使用两者)。我最终使用了 aes128-sha1-modp2048。

希望这篇文章能帮助下一个 linux 新手设置它!

干杯!

编辑#4:问题(不是真的)解决了

在对与 strongswan 相关的单独问题进行故障排除时,我更改了“leftfirewall”参数,经过测试,没有解决我的单独问题,然后预先恢复到 orig 配置(注释掉 leftfirewall)。然后我注意到我现在无法ping通隧道。在疯狂了几个小时试图弄清楚发生了什么之后,我注释掉了 esp 参数以查看会发生什么:我现在可以再次 PING Across the TUNNEL!<- 所以,有可能有一些 ipsec 鬼在我身上跑来跑去,并且 esp 参数并不是真正修复 TS_UNACCEPTABLE 错误的方法(尽管其他在线资源表明 esp 参数是修复...)

编辑#5:问题完全解决

我最终将所有内容都转移到了测试环境中,并从头开始。我使用最新版本(5.3.2)而不是Ubuntu repo(5.1.2)中的旧版本从源代码安装。这解决了我上面遇到的问题,并使用 netcat(很棒的工具!!)在 VPN 隧道上的多个子网之间验证了第 7 层连接。

另外:不需要为 VPC 启用 DNS 主机名(因为我被亚马逊错误地误导),仅供参考>

希望这一切都有帮助!!!!!!!

附加编辑 2017 年 2 月 11 日:

根据 JustEngland 的要求,复制下面的工作配置(省略某些细节以防止以任何方式识别):

A面:

# ipsec.conf - strongSwan IPsec configuration file

# basic configuration
config setup
# Add connections here.
conn %default
 ikelifetime= You choose; must match other side
 keylife= You choose; must match other side
 rekeymargin= You choose; must match other side
 keyingtries=1
 keyexchange= You choose; must match other side
 authby=secret
 mobike=no

conn side-a
 left=10.198.0.124
 leftsubnet=10.198.0.0/16
 leftid=54.y.y.y
 leftsourceip=10.198.0.124
 right=52.x.x.x
 rightsubnet=10.194.0.0/16
 auto=start
 type=tunnel
# Add connections here.


root@x:~# cat /etc/ipsec.secrets 
A.A.A.A B.B.B.B : PSK "Your Password"

B面:

# ipsec.conf - strongSwan IPsec configuration file

# basic configuration
config setup

conn %default
 ikelifetime= You choose; must match other side
 keylife= You choose; must match other side
 rekeymargin= You choose; must match other side
 keyingtries=1
 keyexchange= You choose; must match other side
 authby=secret
 mobike=no

conn side-b
 left=10.194.0.129
 leftsubnet=10.194.0.0/16
 leftid=52.x.x.x
 right=54.y.y.y
 rightsubnet=10.198.0.0/16
 rightsourceip=10.198.0.124
 auto=start
 type=tunnel

root@x:~# cat /etc/ipsec.secrets 
B.B.B.B A.A.A.A : PSK "Your Password"
vpn
  • 2 个回答
  • 15109 Views
Martin Hope
lobi
Asked: 2015-03-26 08:26:04 +0800 CST

ipmi_si 模块丢失且无法找到

  • 2

看了遍谷歌和stackoverflow;找不到这个“简单”问题的答案。

背景:我有一台运行 centos 6.5 内核 2.6.32-431.29.2.el6.x86_64 的 Supermicro 服务器。我一直在尝试配置 IPMI,经过多次故障排除后,我意识到问题可能是由于 ipmi_si(和 ipmi_msghandler)模块不存在。我相信获得这些模块的唯一方法是升级内核:

[blah@localhost]$ yum provides "*/ipmi_msg*.ko"
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: ftp.osuosl.org
 * extras: linux.cc.lehigh.edu
 * updates: mirror.metrocast.net
kernel-debug-2.6.32-504.el6.x86_64 : The Linux kernel compiled with extra debugging enabled
Repo        : base
Matched from:
Filename    : /lib/modules/2.6.32-    504.el6.x86_64.debug/kernel/drivers/char/ipmi/ipmi_msghandler.ko

kernel-2.6.32-504.el6.x86_64 : The Linux kernel
Repo        : base
Matched from:
Filename    : /lib/modules/2.6.32-       504.el6.x86_64/kernel/drivers/char/ipmi/ipmi_msghandler.ko

...etc

同意?我宁愿在不升级内核的情况下获得这些模块。此外,假设我必须升级内核,有人可以确认这样做的原因仅仅是这些模块与当前内核不“兼容”吗?

谢谢。

centos
  • 1 个回答
  • 8475 Views
Martin Hope
lobi
Asked: 2015-02-27 09:16:05 +0800 CST

Supermicro 上的 IPMI Web 管理无法正常工作:“无法在 /dev/ipmi0 或 /dev/ipmi/0 或 /dev/ipmidev/0:...打开设备”和“无效通道 255”

  • 1

对 centos 6.5 服务器上的 IPMI 问题进行故障排除。具体来说,由于尝试使用 IPMI LAN 设置时出现错误,我无法设置 IPMI Web 管理。

输入 ipmitool lan print 时出现以下错误:

[root@]# ipmitool lan print
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Channel Info command failed
Invalid Channel 255

几乎所有 google/stackexchange 对这些问题的回答都会在此处找到答案ipmitool - 找不到 /dev/ipmi0 或 /dev/ipmidev/0,但是这个 supermicro 服务器与我的其他 supermicro 服务器加载的 ipmi 内核模块完全相同如下所示:

[root@SERVER_WITHOUT_WORKING_IPMI]# modprobe --showconfig | grep ipmi
alias platform:ipmi_si ipmi_devintf
[root@SERVER_WITH_WORKING_IPMI]# modprobe --showconfig | grep ipmi
alias platform:ipmi_si ipmi_devintf

因此,我怀疑这不是与内核模块相关的问题......

非常感谢您对此的任何帮助。请注意,此设备正在生产中,因此我必须小心“尝试”。另请注意,我对 linux 比较陌生(这里是网络工程师)。

谢谢大家...(这是我的第一篇文章!)

ipmi
  • 1 个回答
  • 5208 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve