Wednesday, July 24, 2013

VNC HP-UX Cannot establish any listening sockets

Error while starting the VNC

#vncserver :1


XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running


Solution:

Check in  /var/spool/sockets/X11 any old unused sockets ( above case socket number will be 1 ) and remove that one.


Thursday, June 20, 2013

Find tape drive serial number HP-UX


To find out the serial number of tape drive connected to HP_UX server.

1. use devbra 

#/opt/omni/lbin/devbra -dev

2. use cstm

#echo "map; wait; selall; wait; info; wait; infolog; view; done" | cstm > /tmp/cstm.txt

Read through the output  you will get  details of tape drive like this.

Hardware path: 0/3/0/0/0/0.3.10.255.0.0.0


Device Qualifier:    HPUltrium
Product ID:          Ultrium 4-SCSI     Hardware Path:
0/3/0/0/0/0.2.10.255.0.0.0
Device Type:         SCSI Tape          Logical Unit Number:    0
Vendor:              HP                 Product Rev Level:      H58W
Firmware Revision:   012.847            Tape Load Count:        0
Correctable Errors:  0                  Uncorrectable Errors:   0
Mfg Date Code:       N/A                Servo Revision:         H/W.REV
Serial Number:       HU18283HG1
Compression Status:  Enabled            Compression Ratio:
                                                  [instant]     N/A
                                                  [average]     1.0 : 1
Capacity [M Byte]:   0
Drive Status:        Good


3.  use fcmsutil

fcmsutil   HBA_PATH get remote all.

This will show the serail no of tape driver on the port where it connected.


Thursday, June 6, 2013

ssh: connect to host [server] port 22: Connection refused HP-Ux


  
1.  Verify how many  "/opt/ssh/sbin/sshd" process  running in the server. If more than once process is running kill  all the "/opt/ssh/sbin/sshd" process and start ssh using /sbin/init.d/secsh start.

2. Verify that "/opt/ssh/sbin/sshd"  process is running. if not start sshd process using "/sbin/init.d/secsh start"

3. If you can connect to sshd using localhost in the server, then check for any firewall blocking access to sshd port in outside network.

Monday, May 20, 2013

Rescue Mode suse linux - Reset root password , repair file systems.




   Boot server from the installation CD.

Then select any installation method or Rescue System.

At the first installation screen when selecting language, press ctrl-alt-f2 to open a virtual console. 
Note: If you selected Rescue System, select your keyboard language and then a Rescue Login prompt should appear. Login as root.

Enter below to list the partitions. Locate the Linux root partition.

fdisk -l

Enter
mount /dev/sda3 /mnt
(replace sda3 with the device name for the Linux root partition identified in the previous step).

If  its lvm then use appropriate device  
Example: mount /dev/vg00/lvol1 /mnt

Then Run below to make the device files available

mount -o bind /dev  /mnt/dev 

 (this is needed for access to the urandom device which may be used by the passwd command below).
Enter
chroot /mnt
Now enter
passwd root
and reset the root password.

If you want mount all file sytem,
mount -av
Type
exit
to leave the chroot environment.
Reboot the system 

If  lvm disks  not visible run below.

# lvm
# pvscan
# vgscan
# lvscan
# vgchange -ay
# exit
# e2fsck -f /dev/vg00/lvol1

If  keystrokes getting repeated in remote  ILO console below is the solution

DESCRIPTION
When using HP Integrated Lights-Out 3 (iLO 3) Integrated Remote Console (IRC) over a slow or congested network, the keystrokes may repeat several times even though the key is not pressed. For example, typing "ahs.bat" may result in "ahs.bbbbbbbbat."
When the network connectivity is slow or lagging, the "key up" command may not be delivered to iLO 3 in a timely manner after the "key down" command is sent. This can cause the host server to believe that the key is still pressed down even though the key has been released.
SCOPE
Any HP ProLiant server with Integrated Lights-Out 3 (iLO 3) while using Integrated Remote Console (IRC) over a slow or congested network.
RESOLUTION
To prevent this from occurring, improve the bandwidth and reduce latency between the Integrated Remote Console (IRC) client system and the host operating system. Some common sources of latency are running over a Virtual Private Network (VPN) or running over a wireless network connection.
As a workaround, adjust the key repeat rate within the server operating system. For example, on a Windows Server, performing the following steps:
Open Control Panel.
Open Keyboard.
In the Character Repeat section, lower the Repeat Rate until repeat keys are no longer sent. Slower networks will require a slower repeat rate.

 
 

Wednesday, April 24, 2013

CDE: desktop messaging system could not be started & VNC grey screen HP-UX

             
              While running vnc you will get an error "CDE: desktop messaging system could not be started" when you click ok vnc will only show grey screen. [host : uxmemoir01.unixmemoirs.com]

As per different google search results  DNS issue is main culprit. we should have nsswitch.conf like below.
Then only CDE will work properly.

hosts:          files [NOTFOUND=continue] dns

as part of initial trouble shooting in  nsswitch.conf  above line was commented out. I uncommented it out and then  CDE  in vnc client is showing blue screen. hmm.. some progress.

Then I checked /etc/hosts and found that uxmemoir01.unixmemoirs.com is  having proper IP, 192.168.1.1

Then I checked name  servers mentioned in /etc/resolv.conf and found that these name servers are giving another IP for host uxmemoir01.unixmemoirs.com- 192.168.2.19

Issue is that CDE is checking  /etc/hosts and nameservers for hostname look up. It gots wrong IP from name server. So CDE hangs at blue screen.

moral : CDE is extremely sensitive to DNS

Work around :

Comment out the name server entries before starting VNC server and uncomment after starting vnc.

Different places to look for CDE issues.

When CDE is initialized, it must be able to resolve its hostname, ensure that it has access to all hosts, and resolve those hosts defined for the system.
  • Who is affected? If all users are not affected, first check the following list.
    • Filespace in /home and /var
    • Permissions on /dev/null (666)
    • Permissions on /dev/lft0 (666)
    • Permissions on /dev/tty (666)
    • Permissions on /dev/console (622)
    • Permissions on /etc/resolv.conf (644)
    • Permissions on /usr/dt/bin files
  • Check the bold commands and filenames on the left side of the list below and compare the output on your machine with the corresponding information on the right.
    • df    -     Check for full filesystems.
    • hostname    -    Should return hostname of machine.
    • host <hostname>    -    Should return fully qualified machine name and IP address.
    • host <IP address>    -    Should return fully qualified machine name and IP address.
    • uname -n    -    Should return hostname.
    • ping <hostname>    -    Should be pingable, check for packet loss.
    • ping <IP address>    -    Should be pingable, check for packet loss.
    • host loopback    -    Should return localhost is 127.0.0.1.
    • host 127.0.0.1    -    Should return localhost is 127.0.0.1.
    • ping loopback    -    Should be able to ping - check for packet loss.
    • ping 127.0.0.1    -    Should be able to ping - check for packet loss.
    • /etc/hosts    -    Check for duplicate/erroneous entries and permissions.
    • /etc/resolv.conf    -    Nameserver should be pingable.
    • /etc/netsvc.conf - This file may or may not be present, check for typing errors. In this file, nsorder should be hosts=local,bind
    • /etc/X0.hosts - This file may or may not be present, if it is move it to X0.hosts.old.
    • netstat -in - Check to ensure no interfaces have an "*" (asterisk).
    • lssrc -s inetd - Should be active.
    • lssrc -s portmap - Should be active.
    • lssrc -g tcpip - Check to see what TCP/IP deamons are running.
  • If checking the preceding commands or files does not resolve the problem, look for errors in the following files:
    • /var/dt/Xerrors
    • $HOME/.dt/startlog
    • $HOME/.dt/errorlog
  • If no errors exist in the preceding files, your system may have an environmental setting that is prohibiting the login. Check the following files:
    • /etc/environment
    • /etc/profile
    • $HOME/.dtprofile
    • $HOME/.kshrc
    • $HOME/.login
    • $HOME/.cshrc
    • echo $LIBPATH - Should report nothing.
    • echo $MANPATH - Should report nothing.
Source: http://bio.gsi.de/DOCS/www.coredumps.de/doc/ibm/aix/aix_hints_and_tips/6820474.htm