About these ads

netcat on Suse Linux and Red Hat Enterprise Linux

There are two netcat application around.

Suse Linux uses netcat

root@suselinux10sp4:~ # cat /etc/*release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 4
LSB_VERSION=”core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64″

This is the package

root@suselinux10sp4:~ # rpm -qa | grep netcat
netcat-1.10-883.2

Test port this way

root@suselinux10sp4:~ # netcat -vz 172.16.4.198 21
solaris10 [172.16.4.198] 21 (ftp) open

This is the package information

root@suselinux10sp4:~ # rpm -qi netcat
Name : netcat Relocations: (not relocatable)
Version : 1.10 Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 883.2 Build Date: Fri Jun 16 11:04:19 2006
Install Date: Mon Jun 2 11:38:15 2008 Build Host: bassani.suse.de
Group : Productivity/Networking/Other Source RPM: netcat-1.10-883.2.src.rpm
Size : 130566 License: Other License(s), see package, distributable
Signature : DSA/SHA1, Fri Jun 16 11:07:49 2006, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
Summary : A Simple But Powerful Network Tool
Description :
Netcat is a simple Unix utility that reads and writes data across
network connections using TCP or UDP protocols. It is designed to be a
reliable back-end tool that can be used directly or easily driven by
other programs and scripts. At the same time, it is a feature-rich
network debugging and exploration tool, because it can create almost
any kind of connection you may need and has several interesting
built-in capabilities.

Find the documentation in /usr/share/doc/packages/netcat/README.

Authors:
——–
hobbit@avian.org
Distribution: SUSE Linux Enterprise 10 (X86-64)

For Red Hat Linux

root@redhatenterpriselinux58:~ # cat /etc/*release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)

This is the package

root@redhatenterpriselinux58:~ # rpm -qf /usr/bin/nc
nc-1.84-10.fc6

This is the package information

root@redhatenterpriselinux58:~ # rpm -qi nc
Name : nc Relocations: (not relocatable)
Version : 1.84 Vendor: Red Hat, Inc.
Release : 10.fc6 Build Date: Sun 01 Oct 2006 06:51:17 PM BRT
Install Date: Sat 16 Jul 2011 06:57:04 AM BRT Build Host: hs20-bc1-7.build.redhat.com
Group : Applications/Internet Source RPM: nc-1.84-10.fc6.src.rpm
Size : 111823 License: GPL
Signature : DSA/SHA1, Thu 18 Jan 2007 02:10:50 PM BRST, Key ID 5326810137017186
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla&gt;
URL : http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
Summary : Reads and writes data across network connections using TCP or UDP.
Description :
The nc package contains Netcat (the program is actually nc), a simple
utility for reading and writing data across network connections, using
the TCP or UDP protocols. Netcat is intended to be a reliable back-end
tool which can be used directly or easily driven by other programs and
scripts. Netcat is also a feature-rich network debugging and
exploration tool, since it can create many different connections and
has many built-in capabilities.

You may want to install the netcat package if you are administering a
network and you’d like to use its debugging and network exploration
capabilities.

This is how to test a port

root@redhatenterpriselinux58:~ # nc -vz 172.16.4.198 21
Connection to 172.16.4.198 21 port [tcp/ftp] succeeded!

About these ads

error: error reading top line of /var/lib/logrotate.status

root@sles8:~ # cat /etc/*release
SuSE SLES-8 (i386)
VERSION = 8.1
UnitedLinux 1.0 (i586)
VERSION = 1.0
LSB_VERSION=”1.2″
DISTRIB_ID=”UnitedLinux”
DISTRIB_RELEASE=”1.0″
DISTRIB_DESCRIPTION=”UnitedLinux 1.0 (i586)”

I tried to start logrotate for syslog but I got an error

root@sles8:~ # logrotate -f /etc/logrotate.d/syslog
error: error reading top line of /var/lib/logrotate.status

Move the file with the error

root@sles8:~ # mv /var/lib/logrotate.status /var/lib/logrotate.status.bak

And run logrotate to verify the configuration

root@sles8:~ # logrotate -fv /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file mon
reading config info for /var/log/downtime.log
reading config info for /var/log/mon_history.log
reading config file acct
reading config info for /var/account/pacct
reading config file uucp
reading config info for /var/log/uucp/Log /var/log/uucp/Stats
reading config info for /var/log/uucp/Debug
reading config file radiusd
reading config info for /var/log/radius/radius.log
reading config info for /var/log/radius/radwatch.log
reading config info for /var/log/radius/radwtmp
reading config file aaa_base
reading config info for /var/log/mgetty.*
reading config info for /var/log/vgetty.*
reading config info for /var/log/vbox.tty*
reading config info for /var/adm/isdn.log
reading config info for /var/lib/xdm/xdm-errors
reading config info for /var/log/debug
reading config info for /var/log/isdn
reading config info for /var/log/isdn.log
reading config info for /var/log/isdncalls
reading config info for /var/log/log.ceptd
reading config info for /var/log/samba/log.nmbd
reading config info for /var/log/samba/log.smbd
reading config info for /var/log/samba/log.winbindd
reading config info for /var/log/maillog
reading config info for /var/log/ntp
reading config info for /var/log/pop3svr.log
reading config info for /var/log/pvf.log
reading config info for /var/log/rinetd.log
reading config info for /var/log/rsyncd.log
reading config info for /var/log/wtmp
reading config info for /var/log/xdm.errors
reading config info for /var/log/xferlog
reading config info for /var/log/radius.log
reading config info for /var/log/radwatch.log
reading config info for /var/log/radwtmp
reading config file ldirectord
reading config info for /var/log/ldirectord.log
reading config file mysql
reading config info for /var/lib/mysql/mysqld.log
reading config file squid
reading config info for /var/log/squid/cache.log
reading config info for /var/log/squid/access.log
reading config info for /var/log/squid/store.log
reading config file heartbeat
reading config info for /var/log/ha-debug
reading config info for /var/log/ha-log
reading config file apache
reading config info for /var/log/httpd/access_log
reading config info for /var/log/httpd/error_log
reading config info for /var/log/httpd/suexec.log
reading config info for /var/log/httpd/ssl_request_log
reading config info for /var/log/httpd/ssl_engine_log
reading config file syslog
reading config info for /var/log/mail /var/log/warn /var/log/messages /var/log/allmessages /var /log/localmessages /var/log/firewall
reading config file fetchmail
reading config info for /var/log/fetchmail
reading config file sddsrv_log.d
reading config info for /var/log/sddsrv_bak.log
reading config info for /var/log/sdd_bak.log
reading config file postgresql
reading config info for /var/log/postgresql
Handling 50 logs
rotating pattern: /var/log/downtime.log forced from command line (4 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/downtime.log
log needs rotating
renaming /var/log/downtime.log.4 to /var/log/downtime.log.5
old log /var/log/downtime.log.4 does not exist
renaming /var/log/downtime.log.3 to /var/log/downtime.log.4
old log /var/log/downtime.log.3 does not exist
renaming /var/log/downtime.log.2 to /var/log/downtime.log.3
old log /var/log/downtime.log.2 does not exist
renaming /var/log/downtime.log.1 to /var/log/downtime.log.2
file /var/log/downtime.log.5 doesn’t exist — won’t try dispose of it
renaming /var/log/downtime.log to /var/log/downtime.log.1
creating new log mode = 0644 uid = 0 gid = 0
rotating pattern: /var/log/mon_history.log forced from command line (4 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/mon_history.log
log does not need rotating
rotating pattern: /var/account/pacct forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/account/pacct
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/account/pacct to /var/account/pacct-20140205
creating new log mode = 0640 uid = 0 gid = 0
running postrotate script
Reload process accountingShutting down process accounting done
Starting process accounting done
compressing new log with: /bin/gzip -9 ‘/var/account/pacct-20140205′
rotating pattern: /var/log/uucp/Log /var/log/uucp/Stats forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/uucp/Log
file /var/log/uucp/Log does not exist — skipping
rotating file /var/log/uucp/Stats
file /var/log/uucp/Stats does not exist — skipping
rotating pattern: /var/log/uucp/Debug forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/uucp/Debug
file /var/log/uucp/Debug does not exist — skipping
rotating pattern: /var/log/radius/radius.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radius/radius.log
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/radius/radius.log to /var/log/radius/radius.log-20140205
creating new log mode = 0640 uid = 0 gid = 0
running postrotate script
Reload service radiusd failed
error running postrotate script
rotating pattern: /var/log/radius/radwatch.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radius/radwatch.log
file /var/log/radius/radwatch.log does not exist — skipping
rotating pattern: /var/log/radius/radwtmp forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radius/radwtmp
file /var/log/radius/radwtmp does not exist — skipping
rotating pattern: /var/log/mgetty.* forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/mgetty.*
file /var/log/mgetty.* does not exist — skipping
rotating pattern: /var/log/vgetty.* forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/vgetty.*
file /var/log/vgetty.* does not exist — skipping
rotating pattern: /var/log/vbox.tty* forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/vbox.tty*
file /var/log/vbox.tty* does not exist — skipping
rotating pattern: /var/adm/isdn.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/adm/isdn.log
file /var/adm/isdn.log does not exist — skipping
rotating pattern: /var/lib/xdm/xdm-errors forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/lib/xdm/xdm-errors
file /var/lib/xdm/xdm-errors does not exist — skipping
rotating pattern: /var/log/debug forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/debug
file /var/log/debug does not exist — skipping
rotating pattern: /var/log/isdn forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/isdn
file /var/log/isdn does not exist — skipping
rotating pattern: /var/log/isdn.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/isdn.log
file /var/log/isdn.log does not exist — skipping
rotating pattern: /var/log/isdncalls forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/isdncalls
file /var/log/isdncalls does not exist — skipping
rotating pattern: /var/log/log.ceptd forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/log.ceptd
file /var/log/log.ceptd does not exist — skipping
rotating pattern: /var/log/samba/log.nmbd forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/samba/log.nmbd
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/samba/log.nmbd to /var/log/samba/log.nmbd-20140205
truncating /var/log/samba/log.nmbd
compressing new log with: /bin/gzip -9 ‘/var/log/samba/log.nmbd-20140205′
rotating pattern: /var/log/samba/log.smbd forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/samba/log.smbd
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/samba/log.smbd to /var/log/samba/log.smbd-20140205
truncating /var/log/samba/log.smbd
compressing new log with: /bin/gzip -9 ‘/var/log/samba/log.smbd-20140205′
rotating pattern: /var/log/samba/log.winbindd forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/samba/log.winbindd
file /var/log/samba/log.winbindd does not exist — skipping
rotating pattern: /var/log/maillog forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/maillog
file /var/log/maillog does not exist — skipping
rotating pattern: /var/log/ntp forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/ntp
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/ntp to /var/log/ntp-20140205
truncating /var/log/ntp
compressing new log with: /bin/gzip -9 ‘/var/log/ntp-20140205′
rotating pattern: /var/log/pop3svr.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/pop3svr.log
file /var/log/pop3svr.log does not exist — skipping
rotating pattern: /var/log/pvf.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/pvf.log
file /var/log/pvf.log does not exist — skipping
rotating pattern: /var/log/rinetd.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/rinetd.log
file /var/log/rinetd.log does not exist — skipping
rotating pattern: /var/log/rsyncd.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/rsyncd.log
file /var/log/rsyncd.log does not exist — skipping
rotating pattern: /var/log/wtmp forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/wtmp
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/wtmp to /var/log/wtmp-20140205
truncating /var/log/wtmp
compressing new log with: /bin/gzip -9 ‘/var/log/wtmp-20140205′
rotating pattern: /var/log/xdm.errors forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/xdm.errors
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/xdm.errors to /var/log/xdm.errors-20140205
truncating /var/log/xdm.errors
compressing new log with: /bin/gzip -9 ‘/var/log/xdm.errors-20140205′
rotating pattern: /var/log/xferlog forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/xferlog
file /var/log/xferlog does not exist — skipping
rotating pattern: /var/log/radius.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radius.log
file /var/log/radius.log does not exist — skipping
rotating pattern: /var/log/radwatch.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radwatch.log
file /var/log/radwatch.log does not exist — skipping
rotating pattern: /var/log/radwtmp forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/radwtmp
file /var/log/radwtmp does not exist — skipping
rotating pattern: /var/log/ldirectord.log forced from command line (4 rotations)
empty log files are rotated old logs are removed
rotating file /var/log/ldirectord.log
log needs rotating
renaming /var/log/ldirectord.log.4 to /var/log/ldirectord.log.5
renaming /var/log/ldirectord.log.3 to /var/log/ldirectord.log.4
renaming /var/log/ldirectord.log.2 to /var/log/ldirectord.log.3
renaming /var/log/ldirectord.log.1 to /var/log/ldirectord.log.2
renaming /var/log/ldirectord.log to /var/log/ldirectord.log.1
creating new log mode = 0644 uid = 0 gid = 0
removing old log /var/log/ldirectord.log.5
rotating pattern: /var/lib/mysql/mysqld.log forced from command line (3 rotations)
empty log files are not rotated old logs are removed
rotating file /var/lib/mysql/mysqld.log
log needs rotating
file (null) doesn’t exist — won’t try dispose of it
renaming /var/lib/mysql/mysqld.log to /var/lib/mysql/mysqld.log-20140205
creating new log mode = 0644 uid = 60 gid = 0
running postrotate script
compressing new log with: /bin/gzip -9 ‘/var/lib/mysql/mysqld.log-20140205′
rotating pattern: /var/log/squid/cache.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/squid/cache.log
file /var/log/squid/cache.log does not exist — skipping
rotating pattern: /var/log/squid/access.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/squid/access.log
file /var/log/squid/access.log does not exist — skipping
rotating pattern: /var/log/squid/store.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/squid/store.log
file /var/log/squid/store.log does not exist — skipping
rotating pattern: /var/log/ha-debug forced from command line (4 rotations)
empty log files are rotated old logs are removed
rotating file /var/log/ha-debug
file /var/log/ha-debug does not exist — skipping
rotating pattern: /var/log/ha-log forced from command line (4 rotations)
empty log files are rotated old logs are removed
rotating file /var/log/ha-log
file /var/log/ha-log does not exist — skipping
rotating pattern: /var/log/httpd/access_log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/httpd/access_log
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/httpd/access_log to /var/log/httpd/access_log-20140205
creating new log mode = 0644 uid = 0 gid = 0
running postrotate script
Mailman PERL PHP4 Python Reload httpd done
compressing new log with: /bin/gzip -9 ‘/var/log/httpd/access_log-20140205′
rotating pattern: /var/log/httpd/error_log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/httpd/error_log
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/httpd/error_log to /var/log/httpd/error_log-20140205
creating new log mode = 0644 uid = 0 gid = 0
running postrotate script
Mailman PERL PHP4 Python Reload httpd done
compressing new log with: /bin/gzip -9 ‘/var/log/httpd/error_log-20140205′
rotating pattern: /var/log/httpd/suexec.log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/httpd/suexec.log
file /var/log/httpd/suexec.log does not exist — skipping
rotating pattern: /var/log/httpd/ssl_request_log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/httpd/ssl_request_log
file /var/log/httpd/ssl_request_log does not exist — skipping
rotating pattern: /var/log/httpd/ssl_engine_log forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/httpd/ssl_engine_log
file /var/log/httpd/ssl_engine_log does not exist — skipping
rotating pattern: /var/log/mail /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/mail
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/mail to /var/log/mail-20140205
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/mail-20140205′
rotating file /var/log/warn
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/warn to /var/log/warn-20140205
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/warn-20140205′
rotating file /var/log/messages
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/messages to /var/log/messages-20140205
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/messages-20140205′
rotating file /var/log/allmessages
file /var/log/allmessages does not exist — skipping
rotating file /var/log/localmessages
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
renaming /var/log/localmessages to /var/log/localmessages-20140205
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/localmessages-20140205′
rotating file /var/log/firewall
file /var/log/firewall does not exist — skipping
running shared postrotate script
Reload syslog service done
rotating pattern: /var/log/fetchmail forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/fetchmail
file /var/log/fetchmail does not exist — skipping
rotating pattern: /var/log/sddsrv_bak.log forced from command line (6 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/sddsrv_bak.log
log needs rotating
renaming /var/log/sddsrv_bak.log.6.gz to /var/log/sddsrv_bak.log.7.gz
old log /var/log/sddsrv_bak.log.6.gz does not exist
renaming /var/log/sddsrv_bak.log.5.gz to /var/log/sddsrv_bak.log.6.gz
old log /var/log/sddsrv_bak.log.5.gz does not exist
renaming /var/log/sddsrv_bak.log.4.gz to /var/log/sddsrv_bak.log.5.gz
old log /var/log/sddsrv_bak.log.4.gz does not exist
renaming /var/log/sddsrv_bak.log.3.gz to /var/log/sddsrv_bak.log.4.gz
old log /var/log/sddsrv_bak.log.3.gz does not exist
renaming /var/log/sddsrv_bak.log.2.gz to /var/log/sddsrv_bak.log.3.gz
old log /var/log/sddsrv_bak.log.2.gz does not exist
renaming /var/log/sddsrv_bak.log.1.gz to /var/log/sddsrv_bak.log.2.gz
old log /var/log/sddsrv_bak.log.1.gz does not exist
file /var/log/sddsrv_bak.log.7.gz doesn’t exist — won’t try dispose of it
renaming /var/log/sddsrv_bak.log to /var/log/sddsrv_bak.log.1
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/sddsrv_bak.log.1′
rotating pattern: /var/log/sdd_bak.log forced from command line (6 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/sdd_bak.log
log needs rotating
renaming /var/log/sdd_bak.log.6.gz to /var/log/sdd_bak.log.7.gz
old log /var/log/sdd_bak.log.6.gz does not exist
renaming /var/log/sdd_bak.log.5.gz to /var/log/sdd_bak.log.6.gz
old log /var/log/sdd_bak.log.5.gz does not exist
renaming /var/log/sdd_bak.log.4.gz to /var/log/sdd_bak.log.5.gz
old log /var/log/sdd_bak.log.4.gz does not exist
renaming /var/log/sdd_bak.log.3.gz to /var/log/sdd_bak.log.4.gz
old log /var/log/sdd_bak.log.3.gz does not exist
renaming /var/log/sdd_bak.log.2.gz to /var/log/sdd_bak.log.3.gz
old log /var/log/sdd_bak.log.2.gz does not exist
renaming /var/log/sdd_bak.log.1.gz to /var/log/sdd_bak.log.2.gz
old log /var/log/sdd_bak.log.1.gz does not exist
file /var/log/sdd_bak.log.7.gz doesn’t exist — won’t try dispose of it
renaming /var/log/sdd_bak.log to /var/log/sdd_bak.log.1
creating new log mode = 0644 uid = 0 gid = 0
compressing new log with: /bin/gzip -9 ‘/var/log/sdd_bak.log.1′
rotating pattern: /var/log/postgresql forced from command line (99 rotations)
empty log files are not rotated old logs are removed
rotating file /var/log/postgresql
log needs rotating
glob finding old rotated logs failed
file (null) doesn’t exist — won’t try dispose of it
copying /var/log/postgresql to /var/log/postgresql-20140205
truncating /var/log/postgresql
compressing new log with: /bin/gzip -9 ‘/var/log/postgresql-20140205′

Postfix starting in Suse Linux but never really starts

Starting Postfix

root@suse11sp2:~ # /etc/init.d/postfix start
Starting mail service (Postfix) done

But checking with ps I see that no processes are running. I check /var/log/mail and see that a file is with the wrong permission

root@suse11sp2:~ # tail /var/log/mail
Jan 31 17:56:35 suse11sp2 postfix/postqueue[22058]: warning: Mail system is down — accessing queue directly
Jan 31 17:58:10 suse11sp2 postfix/postqueue[22556]: warning: Mail system is down — accessing queue directly
Jan 31 17:58:12 suse11sp2 postfix/postqueue[22567]: warning: Mail system is down — accessing queue directly
Jan 31 17:59:47 suse11sp2 postfix/postqueue[22941]: warning: Mail system is down — accessing queue directly
Jan 31 18:00:12 suse11sp2 postfix/postqueue[23245]: warning: Mail system is down — accessing queue directly
Jan 31 18:00:15 suse11sp2 postfix/postqueue[23257]: warning: Mail system is down — accessing queue directly
Jan 31 16:00:32 suse11sp2 postfix/postfix-script[23399]: warning: not owned by postfix: /var/lib/postfix/./master.lock
Jan 31 16:00:32 suse11sp2 postfix/postfix-script[23415]: starting the Postfix mail system
Jan 31 16:00:32 suse11sp2 postfix/master[23419]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
Jan 31 18:01:35 suse11sp2 postfix/postqueue[23847]: fatal: Cannot flush mail queue – mail system is down

Change the permission

root@suse11sp2:~ # ls -lR /var/lib/postfix
/var/lib/postfix:
total 4
-rw——- 1 root admin 33 Feb 28 2013 master.lock

root@suse11sp2:~ # chown postfix:postfix /var/lib/postfix/master.lock

And start Postfix

root@suse11sp2:~ # /etc/init.d/postfix start
Starting mail service (Postfix) done

Postfix not starting in Suse Linux

Postfix wasn’t starting

root@suse11sp2:~ # /etc/init.d/postfix start
Starting mail service (Postfix) failed

I ran in debug mode and found out which is the line to start postfix manually. I ran and it gave me the following error

root@suse11sp2:~ # /usr/sbin/postfix start
postsuper: fatal: scan_dir_push: open directory defer: Permission denied
postfix/postfix-script: fatal: Postfix integrity check failed!

To fix this error, run the following command

root@suse11sp2:~ # postfix -c /etc/postfix set-permissions
chown: cannot access `/usr/share/doc/packages/postfix-doc/README_FILES’: No such file or directory

I’m running Suse Linux 11 SP2 on this server

root@suse11sp2:~ # cat /etc/*release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2
LSB_VERSION=”core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64″

It was not installed the package postfix-doc so I installed

root@suse11sp2:~ # rpm -Uvh postfix-doc-2.5.13-0.17.4.x86_64.rpm
Preparing… ########################################### [100%]
1:postfix-doc ########################################### [100%]

With the package installed, it didn’t give any error messages

root@suse11sp2:~ # postfix -c /etc/postfix set-permissions

And started successfully

root@suse11sp2:~ # /etc/init.d/postfix start
Starting mail service (Postfix) done

HP Proliant BL680C G5 and G7 – Change serial number back to old one

HP Proliant BL680C G5
Select User guide (27)
And then ProLiant BL680c Generation 5 Server Blade User Guide page 53

HP Proliant BL680C G7
Select User guide (22)
And then ProLiant BL680c Generation 7 Server Blade User Guide page 84 / 85

Re-entering the server serial number and product ID
After you replace the system board, you must re-enter the server serial number and the product ID.
1. During the server startup sequence, press the F9 key to access RBSU.
2. Select the System Options menu.
3. Select Serial Number. The following warning is displayed:
WARNING! WARNING! WARNING! The serial number is loaded into the system
during the manufacturing process and should NOT be modified. This option
should only be used by qualified service personnel. This value should
always match the serial number sticker located on the chassis.
4. Press the Enter key to clear the warning.
5. Enter the serial number and press the Enter key.
6. Select Product ID.
7. Enter the product ID and press the Enter key.
8. Press the Esc key to close the menu.
9. Press the Esc key to exit RBSU.
10. Press the F10 key to confirm exiting RBSU. The server will automatically reboot.

This is the official instructions in the manual. I applied the following steps:

1 – Advanced Options

RBSU 1 Serial Number

2 – Serial Number

RBSU 2 Serial Number

3 – Inserting the new one and then exiting

RBSU 3 Serial Number

HPOM – UXMON: There were no valid peers!

I was receiving this incident from HPOM

Node : linuxnode.setaoffice.com
Node Type : Intel/AMD x64(HTTPS)
Severity : minor
OM Server Time: 2014-01-21 12:20:43
Message : UXMON: There were no valid peers!
Msg Group : OS
Application : ntpmon
Object : ntpq
Event Type :
not_found

Instance Name :
not_found

Instruction : This message shows athe ntpq has problems to contact
with the NTPD daemon. Is posible the NTP Daemon is down

Please, contact with your UX expert

Took a look at the log file and it was showing that is a problem with NTP

root@linuxnode:/ # tail /var/opt/OV/log/OpC/ntp_mon.log
Tue Jan 21 15:34:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 16:08:16 2014 : working peer “172.16.4.198″, offset(255.81) greater than NTP_OFFSET_WARNING(230), please check!
Tue Jan 21 16:59:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 17:16:17 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 17:33:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 18:41:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 19:49:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 20:06:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 21:14:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 21:31:16 2014 : NTP Problems. There were no valid peers!

Apparently it is not synchronizing with more than one peer

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
172.23.72.50 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.23.72.51 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.23.72.52 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.16.4.198 172.23.72.51 4 u 16 16 3 52.630 5.543 4.069

Edit /etc/ntp.conf and insert new NTP servers

root@linuxnode:~ #vi /etc/ntp.conf
#
#server 172.23.72.50 version 3 minpoll 4 maxpoll 4
server 142.40.238.18 version 3 minpoll 4 maxpoll 4
#server 172.23.72.51 version 3 minpoll 4 maxpoll 4
server 142.40.238.19 version 3 minpoll 4 maxpoll 4
#server 172.23.72.52 version 3 minpoll 4 maxpoll 4
server 142.40.236.20 version 3 minpoll 4 maxpoll 4
server 172.16.4.198 version 3 minpoll 4 maxpoll 4

Restart NTP

root@linuxnode:~ # /etc/init.d/ntp restart
Shutting down network time protocol daemon (NTPD) done
Try to get initial date and time via NTP from ntp.setaoffice.com done
Starting network time protocol daemon (NTPD) done

Then checking again the results

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
142.40.238.18 142.40.234.152 3 u 2 16 1 0.476 51.879 0.001
142.40.238.19 142.40.238.18 4 u 1 16 1 0.406 50.896 0.001
142.40.236.20 .INIT. 16 u – 16 0 0.000 0.000 0.001
172.16.4.198 .INIT. 16 u – 16 0 0.000 0.000 0.001

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
142.40.238.18 142.40.234.152 3 u 14 16 1 0.476 51.879 0.001
142.40.238.19 142.40.238.18 4 u 13 16 1 0.406 50.896 0.001
142.40.236.20 172.22.248.13 5 u 12 16 1 0.173 49.724 0.001
172.16.4.198 172.23.72.51 4 u 11 16 1 52.181 53.676 0.001

Java application: Your security settings have blocked a self-signed application from running

The new Java update is much more secure when running a self-signed application.

When shown this message
java1
Go to the Windows Control Panel and open the Java Control Panel
java2
Go to the Security tab and set it to Medium
java3
Close the browser and go to the website again

Trying to run ipmitool and receive an error where it can’t find the ipmi device

Running ipmitool was giving the following error

root@linux:~ # 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

After loading the following kernel modules, the problem was solved

root@linux:~ # modprobe ipmi_msghandler
root@linux:~ # modprobe ipmi_devintf
root@linux:~ # modprobe ipmi_si

Running again ipmitool

root@linux:~ # ipmitool lan print
Set in Progress : Set Complete
Auth Type Support :
Auth Type Enable : Callback :
: User :
: Operator :
: Admin : MD2 PASSWORD OEM
: OEM : NONE MD2 PASSWORD
IP Address Source : Static Address
IP Address : 172.23.204.25
Subnet Mask : 255.255.255.0
MAC Address : 00:1e:0b:cb:77:5c
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 0.0 seconds
Default Gateway IP : 172.23.204.1
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
Cipher Suite Priv Max : Not Available

I was receiving this error message when trying to find the iLO IP address for a server:

root@linux:~ # modprobe ipmi_si
FATAL: Error inserting ipmi_si (/lib/modules/2.6.5-7.308-bigsmp/kernel/drivers/char/ipmi/ipmi_si.ko): No such device

And in /var/log/messages it shows that is unable to find any system interface.

root@linux:~ # tail -f /var/log/messages
May 8 11:13:26 linux kernel: IPMI System Interface driver.
May 8 11:13:26 linux kernel: IPMI System Interface driver.
May 8 11:13:26 linux kernel: ipmi_si: Trying “kcs” at I/O port 0xca2
May 8 11:13:26 linux kernel: ipmi_si: Trying “kcs” at I/O port 0xca2
May 8 11:13:26 linux kernel: ipmi_si: Trying “smic” at I/O port 0xca9
May 8 11:13:26 linux kernel: ipmi_si: Trying “smic” at I/O port 0xca9
May 8 11:13:26 linux kernel: ipmi_si: Trying “bt” at I/O port 0xe4
May 8 11:13:26 linux kernel: ipmi_si: Trying “bt” at I/O port 0xe4
May 8 11:13:26 linux kernel: ipmi_si: Unable to find any System Interface(s)
May 8 11:13:26 linux kernel: ipmi_si: Unable to find any System Interface(s)

root@linux:~ # cat /etc/*release
SUSE LINUX Enterprise Server 9 (i586)
VERSION = 9
PATCHLEVEL = 4
LSB_VERSION=”core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32″

This is a HP PROLIANT DL580 G3 and has a iLO v.1 so Linux says that is unable to find any System Interface. Since I’m unable to load IPMI, I was told to use an alternative method described here – Discover HP iLO IP address in Linux

Reset the password for the user Administrator in HP iLO 2

Create an XML file with the following contents

root@linux:~ # vi passwd_reset_ilo.xml
<ribcl VERSION=”2.0″>
<login USER_LOGIN=”Administrator” PASSWORD=”boguspassword”>
<user_INFO MODE=”write”>
<mod_USER USER_LOGIN=”Administrator”>
<password value=”newpassword”/>
</mod_USER>
</user_INFO>
</login>
</ribcl>

This file will reset the user Administrator with the password newpassword

Download hponcfg going here - http://www.hp.com/support/ilo2

Select the appropriate Linux operating system.
Select Software – Lights-Out Management category.
Select the HP Lights-Out Online Configuration Utility for Linux .
Select the appropriate version of the HP Lights-Out Online Configuration Utility and click the “download” button.

After installing, run as shown below.

root@linux:~ # hponcfg -f passwd_reset_ilo.xml -l log.txt
HP Lights-Out Online Configuration utility
Version 4.0.1 Date 09/24/2012 (c) Hewlett-Packard Company, 2012
Firmware Revision = 2.01 Device type = iLO 2 Driver name = hpilo
Script succeeded

Source – http://amal.net/?p=1675

Discover HP iLO IP address in Linux

Here we have a Proliant DL785 G6

root@linux:~ # dmidecode | grep -i Proliant
Product Name: ProLiant DL785 G6
Family: ProLiant

To discover the iLO IP address, check it with ipmitool

root@linux:~ # ipmitool lan print
Set in Progress : Set Complete
Auth Type Support :
Auth Type Enable : Callback :
: User :
: Operator :
: Admin : MD2 PASSWORD OEM
: OEM : NONE MD2 PASSWORD
IP Address Source : Static Address
IP Address : 172.22.29.40
Subnet Mask : 255.255.255.0
MAC Address : 00:21:5a:de:db:02
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 0.0 seconds
Default Gateway IP : 172.22.29.1
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
Cipher Suite Priv Max : Not Available

Or you can view using hponcfg and outputting the configuration to a file

root@linux:~ # hponcfg -w iLO_ouput.out
root@linux:~ # cat ILO_ouput.out
<!– HPONCFG VERSION = “3.0″ –>
<!– Generated 5/8/2014 12:6:50 –>
<DIR_INFO MODE=”write”>
<MOD_DIR_CONFIG>
<DIR_AUTHENTICATION_ENABLED VALUE = “N”/>
<DIR_LOCAL_USER_ACCT VALUE = “Y”/>
<DIR_SERVER_ADDRESS VALUE = “”/>
<DIR_SERVER_PORT VALUE = “636″/>
<DIR_OBJECT_DN VALUE = “”/>
<DIR_OBJECT_PASSWORD VALUE = “”/>
<DIR_USER_CONTEXT_1 VALUE = “”/>
<DIR_USER_CONTEXT_2 VALUE = “”/>
<DIR_USER_CONTEXT_3 VALUE = “”/>
<RIB_INFO MODE=”write”>
<MOD_NETWORK_SETTINGS>
<SPEED_AUTOSELECT VALUE = “Y”/>
<NIC_SPEED VALUE = “10″/>
<FULL_DUPLEX VALUE = “N”/>
<IP_ADDRESS VALUE = “0.0.0.0″/>
<SUBNET_MASK VALUE = “0.0.0.0″/>
<GATEWAY_IP_ADDRESS VALUE = “0.0.0.0″/>
<DNS_NAME VALUE = “ILO—z”/>
<PRIM_DNS_SERVER value = “0.0.0.0″/>
<DHCP_ENABLE VALUE = “Y”/>
<DOMAIN_NAME VALUE = “”/>
<DHCP_GATEWAY VALUE = “Y”/>
<DHCP_DNS_SERVER VALUE = “Y”/>
<DHCP_STATIC_ROUTE VALUE = “Y”/>
<DHCP_WINS_SERVER VALUE = “Y”/>
<REG_WINS_SERVER VALUE = “Y”/>
<PRIM_WINS_SERVER value = “0.0.0.0″/>
<STATIC_ROUTE_1 DEST = “0.0.0.0″ GATEWAY = “0.0.0.0″/>
<STATIC_ROUTE_2 DEST = “0.0.0.0″ GATEWAY = “0.0.0.0″/>
<STATIC_ROUTE_3 DEST = “0.0.0.0″ GATEWAY = “0.0.0.0″/>
</MOD_NETWORK_SETTINGS>
</RIB_INFO>
<USER_INFO MODE=”write”>
</USER_INFO>
</LOGIN>
</RIBCL>

Follow

Get every new post delivered to your Inbox.

Join 304 other followers

%d bloggers like this: