Adventures in Setting up OEM Agents

So I’ve been working to push out OEM Agents from our Grid Control OMS on Windows XP to a couple of Linux servers running OEL 5.  It’s been a lot of fun, and I thought I’d share of the obstacles I overcame:

1. SSH User Equivalence. 

You need to get this working before anything else will work.  Fortunately there’s a pretty good script in oracle/oms10g/sysman/prov/resources/scripts that will do the hard work for you.  However, my first run of this resulted in (BTW, this is all run from a Cygwin bash shell since all of the scripts are Unix-based):

./sshUserSetupNT.sh.org: line 17: $’\r’: command not found
./sshUserSetupNT.sh.org: line 20: $’\r’: command not found
./sshUserSetupNT.sh.org: line 27: $’\r’: command not found
./sshUserSetupNT.sh.org: line 231: syntax error near unexpected token `elif’
./sshUserSetupNT.sh.org: line 231: `   elif ! test -f “$CLUSTER_CONFIGURATION_FI’E”

Couldn’t find much info in Metalink on this — turns out I needed to dos2unix the file before running it.

Also, the documentation on running this script is pretty good — especially this section.

2. You have to be careful with your Cygwin installation — I usually have Cygwin running anyway, and I install the net tools like telnet, ssh, ping, etc. 

However, I got errors saying that the following command in the .sh script was failing:

ping $host -n 5 -w 5

With the following message:

Usage:  ping [-dfqrv] host [packetsize [count [preload]]]

Turns out the Cygwin ping command doesn’t implement the -n and -w options.

Solution was to replace the ping command in the script with /cygdrive/c/windows/system32/ping.exe

3. Also turns out I didn’t actually have a Linux agent staged, even though I had a /oms10g/sysman/agent_download/10.2.0.2.0/linux directory, I didn’t have an oui/oui_linux.jar file.  Once I downloaded that and unzipped it cleanly, I still got some odd errors.

Searching Metalink, you’ll see some references to an oddly named file: OC4J~OC4J_EMPROV~default_island~1.  It’s a log file kept in /oms10g/opmn/logs and it has a lot of detail about the attempt to deploy the agent.  I was getting the following error:

error:  cannot open zipfile [ /app/oracle/product/agent/tmp/oui/oui_linux.jar ]
unzip:  cannot find /app/oracle/product/agent/tmp/oui/oui_linux.jar, /app/oracle/product/agent/tmp/oui/oui_linux.jar.zip or /app/oracle/product/agent/tmp/oui/oui_linux.jar.ZIP.
chmod: cannot access `/app/oracle/product/agent/tmp/oui/Disk1/’: No such file or directory
chmod: cannot access `/app/oracle/product/agent/tmp/oui/Disk1/install/unzip’: No such file or directory

This even though I had the oui_linux.jar file and it clearly transferred to the target machine, I could see it:

$ ls -l
total 42884
———-+ 1 oracle oinstall 43909460 May  5  2006 oui_linux.jar

Odd, why are the permissions 000 instead of 755?

Turns out the permissions on the Windows side were 000 and the script uses scp -p to transfer the file (and retain permissions), so the unjar command on the remote host couldn’t see the file.  I didn’t know you could create a file with 000 permissions on it, although I guess it makes sense — you’d have to chmod it to 000 after creating it though.  A quick chmod command on the Windows side fixed this.

4. Finally I ran into something I haven’t solved yet — I’m running OEL 5 (redhat-5) and the Installer doesn’t recognize that as a supported O/S (it’s looking for redhat-3 and redhat-4).  I’m trying different ways around that but haven’t quite gotten it.

2 Responses to “Adventures in Setting up OEM Agents”

  1. Tyler Says:

    Based on info from this PDF:
    http://www.oracle.com/technologies/linux/el4cert-ds.pdf

    You could add the following to the /etc/redhat-release file:
    Red Hat Enterprise Linux AS release 4 (Nahant Update 4)

  2. arjun Says:

    The list of Supported operating systems are stored in the oraparam.ini file in your install directory. if you Vi the file you see it just checks with the uname command . you can either comment that section or add oel 5 to that :) . or you can force the installer to bypass checking the prereqs using this command (runInstaller -ignoreSysPrereqs). But again OEL 5 should support enterprise manager . It need not be certified but atleast it should support .

Leave a Reply

Posting code can be a pain. To make sure your code doesn't get eaten, you may want to pre-format it first by using HTML Encoder