Friday, February 26, 2010

How to configure DNS in Solaris and AIX?

It is very simple.
Solaris
1) Create /etc/resolv.conf file with your DNS server entries
    Ex:
    bash-2.05$ cat /etc/resolv.conf
                      nameserver 10.999.9.999      #First preference server to look
                      nameserver 10.999.9.999      #Second preference server to look
                      search=domain.comp.net

2) Modify the file /etc/nsswitch.conf
    Look for
      "hosts: files"
    in this file and replace it with
     "hosts: files dns"

Thats it. DNS will be enabled


AIX
1) In /etc/netsvc.conf check for
hosts = local, bind


where the entry "bind" is for dns


2) Modify /etc/resolv.conf file with your DNS server entries
    Ex:
    bash-2.05$ cat /etc/resolv.conf
                      nameserver 10.999.9.999      #First preference server to look
                      nameserver 10.999.9.999      #Second preference server to look
                      search=domain.comp.net

Note: You can use smitty to configure this

Tuesday, February 23, 2010

sysck: 3001-022 The file was not found (EPM issue)

I got this error, while installing a package on IBM AIX (5.1 & 5.3) machine. Though the error looks straight forward as given here "sysck: 3001-022 The file  /usr/axm/server-61/bin/aserver.sh  was not found."

it was actually not able to find files, which are supposed to be generated at the time of installation.

We use EPM (ESP Package manager) to create AIX installer (installp). I created AIX package using EPM version 3.7.0. At the time of package creation, everything went fine. It didn't gave not even a single error. But the package which we built was getting screwed up at the time of installation.

After thorough debugging, I found using EPM version 3.7.1 or 4.0 or 4.1 to create installer solved the issue.

Thursday, February 18, 2010

Unable to resolve target system name - a DNS problem

I was not able to ping to any machines from my Windows 2003 server. I did following steps to debug & resolve the issue, which was related to a DNS problem.

1) Ping some-server
    Unknown host vm-cervino 

    2) Ping localhost
      Reply from 127.0.0.1: bytes=32 time<10ms TTL=48 (This is working)

      3) tracert some-server
      Unable to resolve target system name p4server.na.rsa.net. (This gave me a clue that it may be a DNS problem)
        4) ping 192.777.77.77 (IP address of some-server)                                                                         
        Reply from 192.777.77.77: bytes=32 time=4ms TTL=64 (This confirmed, it is a DNS issue.)
          5) I had another Linux machine, where DNS is working fine. I took the working DNS server IP address In Linux machine, DNS configuration is mentioned in /etc/resolv.conf file
            6) I configured my Windows Server to working DNS server IP address On Windows server, DNS configuration is mentioned in Start -> Control Panel -> Network Connections -> Local Area Connection -> Properties -> Internet Protocol (TCP/IP) -> Properties -> General tab -> Use the following DNS server addresses -> Preferred DNS server.

              After changing Preferred DNS server entry, I was able to connect to machines normally using Domain name.

              Wednesday, February 17, 2010

              fatal error C1033: cannot open program database vc60.pdb

              We encountered this error while doing debug build on some C programs. Our environment consists of Cygwin installed on Windows 2003 server, Visual Studio (VC98), Gmake.

              This problem got resolved for us by killing some hung process on our Windows Server. Actually make clean, which in turn, trying to remove vc60.pdb file, was not able to delete this file. When I try to remove it manually, it was complaining that, this file was shared by some resources, so it can't delete.
              Finally the culprit process was found out using Windows process explorer. After killing the culprit process, our build went fine. Even reboot of Windows server will resolve this problem.

              Tuesday, February 16, 2010

              Can't create transcript file No space left on device

              Build was failing with this absurd error. By thorough inspection of log, I found out some command is trying to write inside a directory /var. I found out disk usage in /var is 100% full, so I thought problem is simple and I truncated some Unix system logs in /var/log and rerun the build. But again it failed with the same error.
              At last, I found out that, another issue causing this problem is that inode usage in /var is 100%.

              We can find the inode usage status using the command "df -i"

              Finally after removing some files in /var/tmp, inode usage got reduced less than 100% and my build went fine afterward.

              Monday, February 15, 2010

              Linux system logs management using logrotate

              You can rotate log file using logrotate software and monitor logs files using logwatch software.

              Working on it, will update soon


              How to truncate all the log files under /var/log? (I don't want to delete them)
              bash# for x in `ls -l /var/log|grep "^-r"|awk '{print $9}'`; do >$x; done