padmin登录vios失败告警-"INIT: failed write of utmp entry"-HMC viosvrcmd fails with HSCL2970
padmin login fails with "INIT: failed write of utmp entry"
Troubleshooting
Problem
Symptom
Cause
Environment
Diagnosing The Problem(诊断问题)
常见原因包括(但不限于)以下任何一种:
- Permissions issue for /etc/utmp or /var/adm/wtmp #权限问题
- Full rootvg file systems. #完成rootvg文件系统
- Hardware failure related to VIOS rootvg, such as disk or adapter failure. #VIOS rootvg相关的硬件故障,例如磁盘或适配器故障。
- rootvg file systems are in read-only mode #Rootvg文件系统处于只读模式
In the navigation pane:
In the work pane:
At HMC command line, type vtmenu
If the console window is nonresponsive, you might see something similar to the following: (如果控制台窗口没有响应,您可能会看到类似以下内容:)
Open in progress
Open Completed.
IBM Virtual I/O Server
login: padmin
/dev/vty0: You must "exec" login from the lowest login shell.
INIT: failed write of utmp entry: " cons"
INIT: failed write of utmp entry: " cons"
INIT: failed write of utmp entry: " cons"
INIT: Command is respawning too rapidly. Check for possible errors.
如果收到这些错误,请检查是否可以使用HMC命令viosvrcmd远程运行VIOS命令。有几种方法可以做到这一点。
Note: For HMC V8.8.5 or later, refer to HMC viosvrcmd fails with HSCL2970
下面的HMC命令在HMC V7R7.8和V7R7.9上进行了测试。它们不适用于HMC V8。
Method #1 - Run padmin command
hscroot@hmchost:~> command=`printf "ioslevel"`; viosvrcmd -m VIRT-9117-MMB-SN10F6B1R -p p7virtvios1 -c "$command"
where ioslevel is the padmin command VIRT-9117-MMB-SN10F6B1R is your managed system name and p7virtvios is the VIOS partition name in question
2.2.4.10 <-- This is the command output where ls -l /etc/utmp is the VIOS command to be ran
-rw-r--r-- 1 root system 35640 Jun 20 15:55 /etc/utmp <-- This is the output
hscroot@hmchost:~> command=`printf "oem_setup_env\nls -l /var/adm/wtmp"`; viosvrcmd -m VIRT-9117-MMB-SN10F6B1R -p p7virtvios1 -c "$command"
-rw-rw-r-- 1 adm adm 3906792 Jun 20 15:55 /var/adm/wtmpResolving The Problem
在采取任何纠正措施之前,请完整阅读余下的文件。
HSCL2970 The IOServer command has failed because of the following reason:
Unable to open file: /home/ios/logs/ioscli_global.trace for append
Error from cliCheckFile:-1
Unable to open file: /home/ios/logs/ioscli_global.trace for append
Error from cliCheckFile:-1
...
Unable to open file: /home/ios/logs/ioscli_global.trace for append
Error from cliCheckFile:-1
cp: test123.out: Read-only file system <-------
rc=1
... node mounted mounted over vfs date options
------ ----------- -------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Mar 15 09:47 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Mar 15 09:47 rw,log=/dev/hd8 ...
OR
node mounted mounted over vfs date options
------ ----------- -------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Mar 03 01:25 ro,degraded
/dev/hd2 /usr jfs2 Mar 03 09:47 ro,degradedHMC viosvrcmd fails with HSCL2970
Troubleshooting
Problem
尝试使用viosvrcmd在VIOS oem_setup_env shell中运行命令时,从HMC 8.8.5及更高版本发出时,将失败,错误为HSCL2970。
Symptom
hscroot@<HMC_hostname>:~> viosvrcmd -m <Managed_Server_Name> -p <VIOS_Name> -c "$command"
HSCL2970 The IOServer command has failed because of the following reason: ioscli printf "oem_setup_env\nls -l /etc/utmp" contains illegal data: printf .
hscroot@<HMC_hostname>:~> viosvrcmd -m <Managed_Server_Name> -p <VIOS_Name> -c "$command"
HSCL2970 The IOServer command has failed because of the following reason:
Not a valid command: ls -l /etc/utmp
Cause
虽然在早期版本中可以有效地运行路由到oem_setup_env shell的命令,但这被视为安全暴露,并施加了限制。
——admin标志是从HMC 8.5.0及更高版本引入的,它允许(某些)命令直接以根用户身份在VIOS上运行。
Environment
Diagnosing The Problem
Check HMC version with "lshmc -V"
Resolving The Problem
:~> command=`printf "oem_setup_env\nls -l /etc/utmp"`
becomes:
:~> command="ls -l /etc/utmp"
... but the viosvrcmd part requires "--admin" adding.
Example:
hscroot@<HMC_hostname>:~> viosvrcmd -m <Managed_Server_Name> -p <VIOS_Name> -c "$command"
becomes:
viosadminuser@<HMC_hostname>:~> viosvrcmd -m <Managed_Server_Name> -p <VIOS_Name> -c "$command" --admin
To create the new HMC "viosadminuser" user with a password="vios-admin" set to expire in 3 days:
hscroot@<HMC_hostname>:~>mkhmcusr -u viosadminuser -a VIOS_Admin --passwd vios-admin -M 3
$ ssh -e T viosadminuser@<HMC_hostname>
viosadminuser@<HMC_hostname>'s password:
Warning: your password will expire in 3 days
Then, create and run commands with "root" authority:
viosadminuser@<HMC_hostname>:~> command="ls -l /etc/utmp"
viosadminuser@<HMC_hostname>:~> viosvrcmd -m <Managed_Server_Name> -p <VIOS_Name> -c "$command" --admin
viosadminuser@<HMC_hostname>:~> viosvrcmd -m Server-8406-70Y-SN06BFF6A -p PS700_VIOS_Epic -c "$command" --admin
-rw-r--r-- 1 root system 34992 May 11 16:25 /etc/utmp
Related Information
| Product | Component | Platform | Version |
|---|---|---|---|
| Hardware Management Console V10 | Hardware Management Console | Platform Independent | All Versions |
| Hardware Management Console V9 | Hardware Management Console, Howto | Platform Independent | All Versions |
| PowerVM | Platform Independent | Version Independent |
本文来自博客园,作者:xiaoming zhang,转载请注明原文链接:https://www.cnblogs.com/xmzhang

浙公网安备 33010602011771号