Deploying Oracle OEM agents 13c on windows targets (2008 R2) while OMS is on Linux oem architecture

Deploying Oracle OEM agents 13c on windows targets (2008 R2) while OMS is on Linux

Situation at customer’s site: OMS 13.2 on Oracle Linux, targets are Windows machines, and a bit ancient: Windows 2008 R2. How to deploy agents on those targets? Several methods are possible in theory. In this blog I’ll describe my efforts to determine what is really possible and what is efficient.

When using Linux targets, there’s no question how to deploy agents, there’s a wunderfull mechanism to push agents to the targets. No pain (mostly). Even to targets in the Oracle Cloud.

Using the same mechanism for Windows, we need cywin to emulate a Linux connection. That’s my first attempt, but there are other possilities to explore:

1. The above named cygwin option. Install cygwin on every Windows target host. When that’s done (automated perhaps), it should be easy to push agents.

2. Using a Windows staging server to push agents to a Windows target, from a Windows machine. Should be easier, and less labour at the target-site.

3. A silent install at every Windows target of the agent.

 

1. Cygwin option.

There is quite a bit documentation to be found and blogposts about this subject, mentioned in the resources below this post. Most striking details of the configurartion:

– you need to edit the file \oui\prov\resources\ssPaths_msplats.properties on the OMS server. Change properties like SCP_PATH, SH_PATH, CHMOD_PATH, LS_PATH, SSH_PATH, MKDIR_PATH. Small but minor detail, not mentioned in the documentation: use forward slashes instead of backslash !! D:/ instead of D:\.

– put the user of the target and password in the password file on the target:

$ /bin/mkpasswd -l -u oracle >> /etc/passwd

When Cygwin has been installed, push the agents through Setup —> add target –> manually.

image

And installling:

image

And in my case it fails unfortunately:

Execution of command d:/oracle/agent13c/ADATMP_2018-01-19_15-17-49-PM/agentDeploy.bat -ignorePrereqs ORACLE_HOSTNAME=<hostname> AGENT_BASE_DIR=d:/oracle/agent13c OMS_HOST=<hostname> EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=d:/oracle/agent13c/agent_inst b_doDiscovery=false START_AGENT=false b_forceInstCheck=true -force AGENT_PORT=3872 on host <hostname> Failed

At this time I did not know what went wrong, thought I ran into bug 23499235 : 13c Cloud Control Agent not Deploying on Microsoft Windows x64 2008 R2.  To investigate what went wrong, it’s best to to run the command manual at the target. But that’s what I’m basically doing in the third option, so I stopped this action of pushing the agents for the moment.

2. Using a Windows staging server

This should be the most promising option, a centralised staging server, pushing the agents to the targets. Oracle has documented this by an example:

Example Deployment of an Enterprise Manager 12.1.0.5/13c Cloud Control Agent on an MS Windows Host with the PsExec Method from an MS Windows Staging Server when the OMS is on Unix (Doc ID 2304834.1)

But there are several exellent blogs about this configuration, like here.

In general:

Choose and configure a Windows server to act as a ‘pushing’ agents server. Copy the agent software, install psexec tools, test connection to the target host, create a property file and push the agent.

  • How to obtain the agent has been excellent described by dbakevlar in this blog.
  • How to install psexec tools and test the connection has been described here.
  • The property file I used:

HOST_NAMES=<hostname>
USER_NAME=<windows domain>\oracle
PASSWORD=<password>
AGENT_IMAGE_PATH=D:\tools\staging\13.2.0.0.0_AgentCore_233.zip
AGENT_BASE_DIR=D:\oracle\agent13c
OMS_HOST=<Linux-OMS>
EM_UPLOAD_PORT=4903
AGENT_REGISTRATION_PASSWORD=<agent_passw>
PSEXEC_DIR=D:\tools\pstools
REMOTE_SYS_DIR=C:\Windows

And off we go, pushing the agent to a Windows target:

agentDeployPSExec.bat PROPERTIES_FILE=d:\tools\staging\<property_file>

But then, the following error:

Error copying D:\tools\staging\\unzip_tmp.exe to remote system:

D:\tools\pstools\psexec.exe \\<targethostname> -u <windows-domainname>\oracletab -p ****** cmd.exe /c move C:\Windows\unzip_tmp.exe D:\oracle\agent13c\ADATMP_–_–

PsExec v2.2 – Execute processes remotely

Copyright (C) 2001-2016 Mark Russinovich

Sysinternals – www.sysinternals.com

Access is denied.

And.. there’s a note for this:

EM 13c: PsExec.exe Access Is Denied When Attempting To Move C:\Windows\unzip_tmp.exe On Target Host (Doc ID 2201143.1)

Solution: Turn off UAC at the target Windows server. This is not an option for the organization , so I’ll skip this alternative….

3. A silent install at every Windows target of the agent

At first, this seemed not to be the fastest way, but after the experiences of the other options, it could be the best option.

There’s a good description how to do this  at DBAkevlar’s site, won’t repeat this in this blog.

After some struggle with missing dll’s (Windows 2008 R2), read a lot of notes about this (see below this post), got the job done.

The trick for me: add the following dll’s to a directory which is in the PATH variable:

  • perl58.dll
  • msvcp71.dll
  • msvcr71.dll
  • msvr100.dll

Conclusion: first do a silent install to ensure the installation works. After that you may decide to choose one of the other options. I decided to go for the silent install by the way.

 

Resources:

Install cygwin on Windows servers: https://docs.oracle.com/cd/E73210_01/EMBSC/GUID-B8ED3864-2CCC-4508-9E98-73E79E0E852D.htm#EMBSC152

Download cygwin: https://cygwin.com/install.html

Cygwin installation blogpost: http://www.carajandb.com/en/blogs/blog-swinkler-en/190-oem-12c-agent-deploy-on-windows-no-problem-with-cygwin

Another cygwin installation blogpost: http://www.carajandb.com/en/blogs/blog-swinkler-en/190-oem-12c-agent-deploy-on-windows-no-problem-with-cygwin

Doc ID 2304834.1: Example Deployment of an Enterprise Manager 12.1.0.5/13c Cloud Control Agent on an MS Windows Host with the PsExec Method from an MS Windows Staging Server when the OMS is on Unix

Toadword about staging server:

https://www.toadworld.com/platforms/oracle/b/weblog/archive/2014/07/04/enterprise-manager-agent-deployment-gets-better-on-windows

Download psexec tool: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

dbakevlar, deploying standalone agents: http://dbakevlar.com/2013/10/em12c-agent-deployment-on-windows/

Access denied with psexec: EM 13c: PsExec.exe Access Is Denied When Attempting To Move C:\Windows\unzip_tmp.exe On Target Host (Doc ID 2201143.1)

One Response

  1. Iuliana April 10, 2019