Emulex OneConnect initialization failed
I have a HP Proliant BL685C G7 and both network interfaces are missing.
Rebooted the server and it showed some messages from the network card
be2net 0000:05:00.0 Waiting for POST, 58s elapsed
be2net 0000:05:00.0 POST timeout; stage=0xb00
be2net 0000:05:00.0 PCI INT A disabled
be2net 0000:05:00.0 Emulex OneConnect initialization failed
be2net: probe of 0000:05:00.0 failed with error -1
ACPI: PCI Interrupt Link [I031] enabled at IRQ 29
According to this document HP Store All Storage – Interface ETH 4 and ETH 5 are Missing it is a physical hardware failure and you need to contact HP – even though that the affected equipment is a storage I believe it is the same case with the server.
There is also another document be2net Driver Fails to Initialize where it shows that the NIC fails to initiate and asks you to update to update to a newer kernel or upgrade the NIC firmware. In this case the server’s OS was upgraded recently and firmware updated.
be2net 0000:10:00.0: Emulex OneConnect 10Gbps NIC initialization failed
be2net: probe of 0000:10:00.0 failed with error -1
fsck in Linux: Superblock last write time is in the future. FIXED
When rebooting the server and it shows this message:
Superblock last write time is in the future. FIXED
Move the file /etc/adjtime and set the hardware clock using the command below:
root@linux:~ # mv /etc/adjtime /etc/adjtime.bak
root@linux:~ # hwclock
Fri 27 Jun 2014 11:27:05 AM BRT -0.574168 secondsroot@linux:~ # hwclock —systohc —localtime
root@linux:~ # hwclock -w
root@linux:~ # hwclock
Fri 27 Jun 2014 11:30:17 AM BRT -0.616638 seconds
Also check if your system is using /etc/localtime as a file or link
root@linux:~ # ls -l /etc/localtime
-rw-r–r– 1 root root 2001 Aug 19 2010 /etc/localtimeroot@linux:~ # ls -l /etc/localtime
lrwxrwxrwx 1 root root 31 Oct 13 2011 /etc/localtime -> /usr/share/zoneinfo/Brazil/East
The time will be different on boot if you use a separate /usr partition because /etc/localtime will point to an invalid file at startup
root@linux:~ # df -h /usr/share/zoneinfo/Brazil
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-usrlv
5.0G 2.5G 2.3G 52% /usr
Copy the file from /usr/share/zoneinfo to /etc/localtime
root@linux:~ # rm /etc/localtime
root@linux:~ # cp -p /usr/share/zoneinfo/Brazil/East /etc/localtime
Source: After reboot, the Linux system time is always wrong
Using the hwclock program
Error updating RHEL package: Cannot retrieve repository metadata for repository: rhel-x86_64-server-5
I made a local repository on my network to avoid updating the package through the internet. But my system was giving me the following error
root@linux:~ # yum update nscd
Loaded plugins: rhnplugin, security
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-server-5. Please verify its path and try again
To solve this problem, I disabled the rhnplugin
root@linux:~ # vi /etc/yum/pluginconf.d/rhnplugin.conf
[main]
enabled = 0
gpgcheck = 1# You can specify options per channel, e.g.:
#
#[rhel-i386-server-5]
#enabled = 1
#
#[some-unsigned-custom-channel]
#gpgcheck = 0
Install Java in Red Hat Enterprise Linux 5
To install Java in RHEL 5, you enable the RHEL Server Supplementary and then install the java-1.6.0-sun and java-1.6.0-sun-plugin packages
root@rhel5:/ # yum install java-1.6.0-sun-plugin
Logrotate configuration for nscd
I wrote a section for nscd log rotation
Edited /etc/logrotate.conf file and added:
# system-specific logs may be also be configured here.
/var/log/nscd.log {
missingok
size=100M
create 644 root root
rotate 4
postrotate
/bin/kill -HUP `cat /var/run/nscd/nscd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
I followed the HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples
rpm error: failed to stat /media: Input/output error
I had a system where the rpm command was very slow after I was trying to upgrade a package
root@rhel5:~ # rpm -Uvh /tmp/kexec-tools-1.102pre-154.el5.x86_64.rpm
error: failed to stat /media: Input/output error
Preparing… ########################################### [100%]
1:kexec-tools warning: /etc/kdump.conf created as /etc/kdump.conf.rpmnew
########################################### [100%]
The filesystem /media is a NFS share. The server that was hosting the NFS was down and the rpm command was slow because it tried to stat the filesystem.
Which package contains rstatd for Red Hat Enterprise Linux 5.5
The service rstatd is in package rusers-server
https://access.redhat.com/kb/docs/DOC-51169
After installing the package, set the service to start at boot
root@linux:~ # chkconfig rstatd on
root@linux:~ # chkconfig —list | grep rstat
rstatd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root@linux:~ # chkconfig rusersd on
root@linux:~ # chkconfig —list | grep rusers
rusersd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Start the services
root@linux:~ # service rstatd start
Starting rstat services: [ OK ]
root@linux:~ # service rusersd start
Starting rusers services: [ OK ]
Check the status
root@linux:~ # service rstatd status
rpc.rstatd (pid 2269) is running…
root@linux:~ # service rusersd status
rpc.rusersd (pid 8147 6266 3464) is running…
Linux denying user access after reseting password
Depending of how you configured your Linux server, the Pluggable Authentication Module (PAM) won’t let you login.
To check the login attempts to see if it needs to be reset type faillog -u <username>
root@linux:~ # faillog -u username
Username Failures Maximum Latest
<username> 15 0
Reset the counter with the -r flag
root@linux:~ # /usr/bin/faillog -r username
Username Failures Maximum Latest
<username> 0 0
If you’re root but is not managing to become a user with su, you also need to reset the login counter
root@linuxserver ~ # su – username
su: incorrect passwordroot@linux:~ # /sbin/pam_tally —-user username —-reset
User <username> (685) had 36root@linux:~ # su – username
username@linux:~ $
For RHEL 6, it uses pam_tally2
root@rhel64:~ # /sbin/pam_tally2 —-user username —-reset
Login Failures Latest failure From
username 9 02/13/14 09:22:10 /dev/pts/1root@rhel64:~ # /sbin/pam_tally2 —-user username —-reset
Login Failures Latest failure From
username 0