This discussion is archived
1 2 Previous Next 27 Replies Latest reply: Dec 14, 2012 3:30 AM by Akanksha Sheoran Kaler RSS

Agent Deployment(agent push) from Windows OMS to Linux Server

jstem1177 Explorer
Currently Being Moderated
Hello All,

I'm trying to do an agent push from my Grid Control on windows to linux server. I have the proper agent downloaded and everything runs correct.

But I'm running into problems with SSH and user Equivalence. I can't seem to wrap my head around how I should be setting it up. It always fails and asks me to provide a password.

Thanks for any assistance.

/Jan

Platform : Windows 2008
OMS Version: 11.1.1.1
DB: 11.2.0.1
Weblogic 10.3.2

Here si the output from Cygwin when trying to setup user equivalenece
$ ./sshUserSetupNT.sh -user oracle -asUser Administrator -asUserGrp SYSTEM -hos
ts "ferrari" -localPlatform win -sshLocalDir "C:\cygwin\.ssh" -homeDir $HOME
The output of this script is also logged into /tmp/sshUserSetup_2011-04-18-13-40
-52.log
Hosts are ferrari
user is oracle
Checking if the remote hosts are reachable

Pinging ferrari.dbsoft.local [172.16.1.3] with 32 bytes of data:
Reply from 172.16.1.3: bytes=32 time=1ms TTL=64
Reply from 172.16.1.3: bytes=32 time<1ms TTL=64
Reply from 172.16.1.3: bytes=32 time<1ms TTL=64
Reply from 172.16.1.3: bytes=32 time<1ms TTL=64
Reply from 172.16.1.3: bytes=32 time=1ms TTL=64

Ping statistics for 172.16.1.3:
    Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms
Remote host reachability check succeeded.
The following hosts are reachable: ferrari.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost ferrari
numhosts 1
The script will setup SSH connectivity from the host VM8ORALCOLABOR to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host VM8ORALCOLABOR
and the remote hosts without being prompted for passwords or confirmations.

NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.

NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
directories.

Do you want to continue and let the script make the above mentioned changes: yes
/no?
yes

The user chose yes
Please specify if you want to specify a passphrase for the private key this scri
pt will create for the local host. Passphrase is used to encrypt the private key
 and makes SSH much more secure. Type 'yes' or 'no' and then press enter. In cas
e you press 'yes', you would need to enter the passphrase whenever the script ex
ecutes ssh or scp.
The estimated number of times the user would be prompted for a passphrase is 2*1
. In addition, if the private-public files are also newly created, the user woul
d have to specify the passphrase on one additional occasion.
Enter 'yes' or 'no'.
yes

The user chose yes
The files containing the client public and private keys already exist on the loc
al host. The current private key may or may not have a passphrase associated wit
h it. In case you remember the passphrase and do not want to re-run ssh-keygen,
press 'no' and enter. If you press 'no', the script will not attempt to create a
ny new public/private key pairs. If you press 'yes', the script will remove the
old private/public key files existing and create new ones prompting the user to
enter the passphrase. If you enter 'yes', any previous SSH user setups would be
reset. If you press 'change', the script will associate a new passphrase with th
e old keys.
Press 'yes', 'no' or 'change'
yes
The user chose yes
Creating .ssh directory on local host, if not present already
Creating config file on local host
If a config file exists already at C:\Users\Administrator\.ssh\config, it would
be backed up to C:\Users\Administrator\.ssh\config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Generating public/private rsa key pair.
Your identification has been saved in C:\Users\Administrator\.ssh\identity.
Your public key has been saved in C:\Users\Administrator\.ssh\identity.pub.
The key fingerprint is:
4c:8a:08:c4:19:b9:de:91:3e:4b:6d:e4:0e:a7:4c:a0 Administrator@VM8ORALCOLABOR
The key's randomart image is:
+--[ RSA 1024]----+
|.o+              |
|.+               |
|. . .   .        |
| + + o +         |
|o = * . S        |
|E. B =           |
|  + O            |
|   + .           |
|                 |
+-----------------+
Creating .ssh directory and setting permissions on remote host ferrari
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE
HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host ferrari. If a co
nfig file exists already at ~oracle/.ssh/config, it would be backed up to ~oracl
e/.ssh/config.backup.
The user may be prompted for a password here since the script would be running S
SH on host ferrari.
Password:
Password:
Done with creating .ssh directory and setting permissions on remote host ferrari
.
Copying local host public key to the remote host ferrari
The user may be prompted for a password or passphrase here since the script woul
d be using SCP for host ferrari.
ssh: Could not resolve hostname C: hostname nor servname provided, or not known
Done copying local host public key to the remote host ferrari
The script will run SSH on the remote machine ferrari. The user may be prompted
for a passphrase here in case the private key has been encrypted with a passphra
se.
Password:
SSH setup is complete.

------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the 'date' command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.

------------------------------------------------------------------------
--ferrari:--
Running /usr/bin/ssh -x -l oracle ferrari date to verify SSH connectivity has be
en setup from local host to ferrari.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE
 PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Pleas
e note that being prompted for a passphrase may be OK but being prompted for a p
assword is ERROR.
The script will run SSH on the remote machine ferrari. The user may be prompted
for a passphrase here in case the private key has been encrypted with a passphra
se.
Password:
Mon Apr 18 16:51:12 EDT 2011
------------------------------------------------------------------------
SSH verification complete.
Setting up ssh euivalence for user Administrator
Copying files from C:\Users\Administrator\.ssh to C:\cygwin\.ssh
Done.

Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
sources/scripts
$ ssh -l Administrator ferrari
Password:
Password:


Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
sources/scripts
$ ssh -l oracle ferrari
Password:
Last login: Mon Apr 18 16:36:18 2011 from 172.16.1.64
[oracle@ferrari ~]$
  • 1. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    Rob Zoeteweij Oracle ACE
    Currently Being Moderated
    I think your linux server should contain an entry in /etc/sudoers

    Something like oracle ALL=(ALL) NOPASSWD: ALL

    regards
    Rob
    http://oemgc.wordpress.com
  • 2. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello,

    Thnaks for the reply. I added the user for no wpassowrd to sudoers and then I got an error for WRONG PATH (SUDO_PATH).

    So I added the entry SUDO_PATH=/usr/local/bin/sudo ssPaths_msplats.properties. Still recevied the error.

    --> This si only required in you check run Root.sh ( the optional things to do it to run it manually)

    But for the moment I'm having the problem with ssh setup between cygwin on my OMS server and a remote Linux server.

    I can't get the ssh to porperly setup for the agent push. Its goes through the entire process on shhUserSetupNT.sh and at the end it fails. Its asks for a passowrd. Which is INCORRECT.

    Has anybody setup OMS successfully on Windows and push an agent install onto a linux server?

    Thanks

    /Jan

    Here si the log from the sshUserSetupNT.sh (maybe some sees something that I'm not)
    INFO: Environment Variables: 
    
    INFO:      ORACLE_HOME = c:\oracle\product\11.2.0.2\db_1
    
    INFO:      PATH = c:\oracle\MIDDLE~1\patch_wls1032\profiles\default\native;c:\oracle\MIDDLE~1\patch_oepe1032\profiles\default\native;C:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\oracle\MIDDLE~1\WLSERV~1.3\server\bin;c:\oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;c:\oracle\MIDDLE~1\JDK160~1.5-3\jre\bin;c:\oracle\MIDDLE~1\JDK160~1.5-3\bin;C:\oracle\MIDDLE~1\WLSERV~1.3\common\emnodemanager\..\..\server\native\win\32;C:\oracle\MIDDLE~1\WLSERV~1.3\common\emnodemanager\..\..\server\bin;c:\oracle\MIDDLE~1\JROCKI~1.5-3\jrein;c:\oracle\MIDDLE~1\JROCKI~1.5-3\bin;C:\oracle\MIDDLE~1\WLSERV~1.3\common\emnodemanager\..\..\server\native\win\32\oci920_8;c:\oracle\product\11.2.0.2\db_1\bin;C:\product\11.2.0.2\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\oracle\middleware\oms11g\bin;c:\oracle\middleware\oms11g\opmn\bin;c:\oracle\middleware\oms11g\opmn\lib;c:\oracle\middleware\oms11g\perl\bin;c:\oracle\middleware\Oracle_WT\bin;c:\oracle\middleware\Oracle_WT\opmn\bin;c:\oracle\middleware\Oracle_WT\opmn\lib;c:\oracle\middleware\Oracle_WT\perl\bin;C:\Program Files\OpenSSH\bin;;C:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    
    INFO:      CLASSPATH = c:\oracle\MIDDLE~1\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\oracle\MIDDLE~1\patch_oepe1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\oracle\MIDDLE~1\JDK160~1.5-3\lib\tools.jar;c:\oracle\MIDDLE~1\utils\config\10.3\config-launch.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;c:\oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;c:\oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;c:\oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\oracle\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;c:\oracle\MIDDLE~1\modules\com.bea.core.apache.log4j_1.2.13.jar
    
    INFO: Username:VM8ORALCOLABOR$
    
    INFO: LIBRARY_LOC = c:\oracle\middleware\oms11g\oui\lib\win32
    INFO: m_PropertiesDir = c:\oracle\gc_inst\em\EMGC_OMS1\sysman\prov\resources\ r_PropertiesDir = c:\oracle\gc_inst\em\EMGC_OMS1\sysman\prov\resources\
    INFO: SSHSetup: Creating remotePaths using REMOTE_PATH_PROPERTIES_LOC_PROPERTY
    INFO: lock_count 1
    INFO: Lock Retry Count 1
    INFO: Lock Sleep Time 30000
    INFO: Home Dir C:\
    INFO: Lock Location : C:\\.ssh\lock
    INFO: Trying to get Lock ....
    INFO: Lock Acquired
    INFO: LIBRARY_LOC = c:\oracle\middleware\oms11g\oui\lib\win32
    INFO: remotenode 172.16.1.3: OpenSSH
    INFO: User selected : yes, generating new Keys
    INFO: Deleting C:\\.ssh\id_rsa.ri.bak
    INFO: Deleting C:\\.ssh\id_rsa.pub.ri.bak
    INFO: 
    INFO: Generating new keys
    INFO: Deleting C:\\.ssh\authorized_keys.ri.bak
    INFO: Deleting C:\\.ssh\config.ri.bak
    INFO: [172.16.1.3]
    INFO: echo $HOME
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: /home/oracle
    
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/mkdir -p "/home/oracle/.ssh"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/rm -f "/home/oracle/.ssh/id_rsa.pub172.16.1.3"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: Copy localfile: C:\\.ssh\id_rsa.pub to remotefile: "/home/oracle/.ssh/id_rsa.pub172.16.1.3"
    
    INFO: [172.16.1.3]
    INFO: /bin/cp -p "/home/oracle/.ssh/authorized_keys" "/home/oracle/.ssh/authorized_keys.ri.bak"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/cat "/home/oracle/.ssh/id_rsa.pub172.16.1.3" >> "/home/oracle/.ssh/authorized_keys"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/rm -f "/home/oracle/.ssh/id_rsa.pub172.16.1.3"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/chmod 644 "/home/oracle/.ssh/authorized_keys"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/chmod og-w "/home/oracle"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/chmod og-w "/home/oracle/.ssh"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: [172.16.1.3]
    INFO: /bin/mv -f "/home/oracle/.ssh/config" "/home/oracle/.ssh/config.ri.bak"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: 
    INFO: 
    INFO: Copy localfile: C:\\.ssh\config to remotefile: "/home/oracle/.ssh/config"
    
    INFO: Deleting C:\\.ssh\known_hosts.ri.bak
    INFO: [172.16.1.3]
    INFO: /bin/cat "/etc/ssh/ssh_host_rsa_key.pub"
    INFO: Exit-status: 0
    INFO: Error: 
    INFO: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA5PahMja14MaiUp/NtGEAnmqw17qKtFolAR72tDvmFyhUzJiaeJPEjZ7L5qgzScvw+Jb1G4vIEuzyvgtTpP5pRVQVd5FXNnOnj5nCZZ/jpW5LLq/7yNwXSIITfixA9OL1dKgh0wEIoos0KtgoQC9K66wkB/Wyh+4E92ICkFFG4AE= 
    
    INFO: 
    INFO: Hostname : mylinux_server
    INFO: FullHostname : mylinux_server
    INFO: IP address : 172.12.1.3
    
    INFO: Home Dir C:\
    INFO: Lock Location : C:\\.ssh\lock
    INFO: Releasing Lock...
    INFO: Lock Released
    Edited by: jstem1177 on Apr 19, 2011 8:47 AM
  • 3. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello,

    I'm I doing this correctly? Using sshUserSetupNT.sh to setup user equivalence NT onto Unix?

    From Cygwin
    =============
    $ ./sshUserSetupNT -user Administrator -asUser oracle -asGroup oinstall  -localPlatformGrp win  -sshLocalDir .\ssh -homeDir $HOME -hosts "ferrari"
    Thanks

    /Jan
  • 4. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Still trying to get this to work.

    Maybe my first question should be whether the folowing command is correct if my local user is Administrator and the remote host user(linux) is oracle
    $ ./sshUserSetupNT.sh -user oracle -asUser Administrator -asGroup oinstall  -localPlatformGrp win  -sshLocalDir ".\ssh" -homeDir $HOME -hosts "ferrari.local"
    Here si the verbose output I'm getting when testing the ssh
    $ ssh -l oracle -v ferrari.local
    OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
    debug1: Reading configuration data /home/Administrator/.ssh/config
    debug1: Applying options for *
    debug1: Reading configuration data /etc/ssh_config
    debug1: Connecting to ferrari.local [172.16.1.3] port 22.
    debug1: Connection established.
    debug1: identity file /home/Administrator/.ssh/id_rsa type -1
    debug1: identity file /home/Administrator/.ssh/id_rsa-cert type -1
    debug1: identity file /home/Administrator/.ssh/id_dsa type -1
    debug1: identity file /home/Administrator/.ssh/id_dsa-cert type -1
    debug1: identity file /home/Administrator/.ssh/id_ecdsa type -1
    debug1: identity file /home/Administrator/.ssh/id_ecdsa-cert type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
    debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_5.8
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA 14:21:71:b5:f4:0d:85:15:c3:af:8a:2d:35:2d:2a:3b
    debug1: Host 'ferrari.local' is known and matches the RSA host key.
    debug1: Found key in /home/Administrator/.ssh/known_hosts:6
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password,keyboard-interacti
    ve
    debug1: Next authentication method: publickey
    debug1: Trying private key: /home/Administrator/.ssh/id_rsa
    debug1: Trying private key: /home/Administrator/.ssh/id_dsa
    debug1: Trying private key: /home/Administrator/.ssh/id_ecdsa
    debug1: Next authentication method: keyboard-interactive
  • 5. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello,

    Anybody know of a straight up example of setting up the ssh equivalency for local win user Administrator, remote linux user oracle?

    Thanks

    /Jan
  • 6. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Can anybody provide any assistance. I'm a at a stand still. Did a completely fresh install of Cywin and I'm still faced with the same issues..

    Thanks ina dvance.

    /Jan
  • 7. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    EricvdS Expert
    Currently Being Moderated
    Jan,

    According to http://www.oracle.com/technetwork/oem/grid-control/10gr2-agent-deploy-bp-133037.pdf you should use sshConnectivity.sh and not sshUserSetupNT.sh. Maybe the note is of help to you.

    sshConnectivity.sh help will give you an overview of the usage and examples.
    Eric
  • 8. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello Eric,

    I found the same thing just a few minutes ago where they mention that sshUserSetupNT.sh should be used prior to OMS 10.2.0.2.

    But I'm running into problems with the script with the hosts. I've check C:\Windows\System32\etc\hosts and I have entries for this host in there.
    I can ping and ssh to it. But when I include it in the script I get the same error as below.

    Thanks

    /Jan
    $ ./sshConnectivity.sh -hosts "ferrari.local" -user oracle -asUser SYSTE
    M -asUserGrp root -sshLocalDir "C:\cygwin\.ssh" -localPlatformGrp win
    
    All paths should be windows style full path.
    
    This script will setup SSH Equivalence from the host 'VM8ORALCOLABOR' to specifi
    ed remote hosts.
    
    The following envrionment would be used
    ORACLE_HOME = c:\oracle\product\11.2.0.2\db_1
    JAR_LOC = c:\oracle\product\11.2.0.2\db_1\oui\jlib
    SSH_LOC = c:\oracle\product\11.2.0.2\db_1\sysman\prov\agentpush\jlib
    OUI_LOC = c:\oracle\product\11.2.0.2\db_1\oui
    PROP_LOC = c:\oracle\product\11.2.0.2\db_1\sysman\prov\resources
    JAVAHOME =
    JAVAHOME = c:\oracle\product\11.2.0.2\db_1\jdk
    ./sshConnectivity.sh: line 316: c:\oracle\product\11.2.0.2\db_1\jdk\bin\java: co
    mmand not found
    Remote host reachability check failed.
    Please ensure that all the hosts are up and re-run the script.
    Exiting now...
    Here is the failing line of code in sshConnectivity.sh
    #echo  | tee -a $LOGFILE 
    #Check if the nodes are reachable
             $CMD -areNodesAlive -hosts "$HOSTS" -logfile "$LOG_FILE"
    exitval=$?
    Let assume we want to just skipe this check so we comment out the entire check for -areNodesAlive it will still crash on.
      $CMD $ARGS -hosts "$HOSTS" -logfile "$LOG_FILE"
    Edited by: jstem1177 on Apr 20, 2011 2:46 PM
  • 9. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    EricvdS Expert
    Currently Being Moderated
    Jan,

    Try setting you oracle_home to the <OMS_home>
    Due to a Cygwin bug you may have to put the <OMS_home> between "".
    You may also have to add -remotePlatform <platform id> for the platform of your target server (I'm not sure if this is really needed, since the remote platform <> local platform) In your case this would be 226 or 46
    The platform id can be found here <OMS_HOME>/sysman/prov/resources/platforminfo.properties

    Eric

    Oh, btw if you are setting this up for just a few servers others methods (like agent cloning) are far more easy to use.
  • 10. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello Eric,

    Thanks for the help.

    So I've managed to move a step forward, or maybe back. I did what you suggested and now its planting on the same command at line 316 (-areNodesAlive) but with a C:/Program No such file.
    I think thsi is because of the JDK. With does not work when I set it up as requested.

    Thanks for your assistance

    /Jan
    Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
    sources/scripts
    $ ./sshConnectivity.sh -hosts ferrari -user oracle -asUser SYSTEM -asUserGrp ro
    ot -sshLocalDir "C:\cygwin\.ssh" -localPlatformGrp 226 -remotePlatform 46
    This script will setup SSH Equivalence from the host 'VM8ORALCOLABOR' to specifi
    ed remote hosts.
    
    The following envrionment would be used
    ORACLE_HOME = C:/oracle/middleware/oms11g
    JAR_LOC = C:/oracle/middleware/oms11g/oui/jlib
    SSH_LOC = C:/oracle/middleware/oms11g/sysman/prov/agentpush/jlib
    OUI_LOC = C:/oracle/middleware/oms11g/oui
    PROP_LOC = C:/oracle/middleware/oms11g/sysman/prov/resources
    JAVAHOME = jdk1.4.2
    Set JAVAHOME variable to jdk1.4.2 before invoking the script
    Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
    sources/scripts
    $ ./sshConnectivity.sh -hosts "ferrari" -user oracle -asUser SYSTEM -asUserGrp
    root -sshLocalDir "C:\cygwin\.ssh" -localPlatformGrp 226 -remotePlatform 46
    This script will setup SSH Equivalence from the host 'VM8ORALCOLABOR' to specifi
    ed remote hosts.
    
    The following envrionment would be used
    ORACLE_HOME = C:/oracle/middleware/oms11g
    JAR_LOC = C:/oracle/middleware/oms11g/oui/jlib
    SSH_LOC = C:/oracle/middleware/oms11g/sysman/prov/agentpush/jlib
    OUI_LOC = C:/oracle/middleware/oms11g/oui
    PROP_LOC = C:/oracle/middleware/oms11g/sysman/prov/resources
    JAVAHOME = C:/Program Files/Java/jdk1.6.0_24
    JAVAHOME = C:/Program Files/Java/jdk1.6.0_24
    ./sshConnectivity.sh: line 316: C:/Program: No such file or directory
    Remote host reachability check failed.
    Please ensure that all the hosts are up and re-run the script.
    Exiting now...
    So I decided to point it to the ORGINAL ORACLE_HOME JDK which throws another error for now class found. But the path is completely wrong and I have no clue where it is getting it as oracle/sysman/prov/ssh does not exist
    The following envrionment would be used
    ORACLE_HOME = C:/oracle/middleware/oms11g
    JAR_LOC = C:/oracle/middleware/oms11g/oui/jlib
    SSH_LOC = C:/oracle/middleware/oms11g/sysman/prov/agentpush/jlib
    OUI_LOC = C:/oracle/middleware/oms11g/oui
    PROP_LOC = C:/oracle/middleware/oms11g/sysman/prov/resources
    JAVAHOME = c:/oracle/product/11.2.0.2/db_1/jdk
    JAVAHOME = c:/oracle/product/11.2.0.2/db_1/jdk
    java.lang.NoClassDefFoundError: oracle/sysman/prov/ssh/SSHConnectivity
    Exception in thread "main" Remote host reachability check failed.
    Please ensure that all the hosts are up and re-run the script.
    Exiting now...
  • 11. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    EricvdS Expert
    Currently Being Moderated
    Jan,

    I think you have to check one option you entered.
    localPlatformGrp 226 This can only be unix or win. The default for this option is unix. Specify this option if the local OMS platform is Windows and use the argument win. So stick to win since OMS is on Windows.
    You did use the "" around ORACLE_HOME and also the JAVAHOME?
    For the host it is best to use the FQDN: ferrari.dbsoft.local

    Eric
  • 12. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    jstem1177 Explorer
    Currently Being Moderated
    Hello Eric,

    So I figured I'm doing something wrong. Deleted the entire cygwin and started from scratch. Maybe you or another PRO might see something I'm doping wrong. I've been stuck on this 3 DAYS !.
    Platform is Windows 2008 64. Either I missed something in the documentation or there is somethign terribly wrong with OMS.

    Thanks for any assistance.

    /Jan
    Administrator@VM8ORALCOLABOR ~
    $ bash
    
    Administrator@VM8ORALCOLABOR ~
    $ ssh-host-config
    *** Info: Generating /etc/ssh_host_key
    *** Info: Generating /etc/ssh_host_rsa_key
    *** Info: Generating /etc/ssh_host_dsa_key
    *** Info: Generating /etc/ssh_host_ecdsa_key
    *** Info: Creating default /etc/ssh_config file
    *** Info: Creating default /etc/sshd_config file
    *** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
    *** Info: However, this requires a non-privileged account called 'sshd'.
    *** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
    ME.privsep.
    *** Query: Should privilege separation be used? (yes/no) no
    *** Info: Updating /etc/sshd_config file
    
    
    *** Warning: The following functions require administrator privileges!
    
    *** Query: Do you want to install sshd as a service?
    *** Query: (Say "no" if it is already installed as a service) (yes/no) yes
    *** Query: Enter the value of CYGWIN for the daemon: [] CYGWIN="binmode tty ntse
    c"
    *** Info: On Windows Server 2003, Windows Vista, and above, the
    *** Info: SYSTEM account cannot setuid to other users -- a capability
    *** Info: sshd requires.  You need to have or to create a privileged
    *** Info: account.  This script will help you do so.
    
    *** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
    *** Info: or later.  On these systems, it's not possible to use the LocalSystem
    *** Info: account for services that can change the user id without an
    *** Info: explicit password (such as passwordless logins [e.g. public key
    *** Info: authentication] via sshd).
    
    *** Info: If you want to enable that functionality, it's required to create
    *** Info: a new account with special privileges (unless a similar account
    *** Info: already exists). This account is then used to run these special
    *** Info: servers.
    
    *** Info: Note that creating a new user requires that the current account
    *** Info: have Administrator privileges itself.
    
    *** Info: The following privileged accounts were found: 'cyg_server' .
    
    *** Info: This script plans to use 'cyg_server'.
    *** Info: 'cyg_server' will only be used by registered services.
    *** Query: Do you want to use a different name? (yes/no) no
    *** Query: Please enter the password for user 'cyg_server':
    *** Query: Reenter:
    
    
    *** Info: The sshd service has been installed under the 'cyg_server'
    *** Info: account.  To start the service now, call `net start sshd' or
    *** Info: `cygrunsrv -S sshd'.  Otherwise, it will start automatically
    *** Info: after the next reboot.
    
    *** Info: Host configuration finished. Have fun!
    
    Administrator@VM8ORALCOLABOR ~
    $ /bin/mkpasswd cyg_server >> /etc/passwd
    mkpasswd: non-option command line argument `cyg_server' is not allowed.
    Try `mkpasswd --help' for more information.
    
    Administrator@VM8ORALCOLABOR ~
    $ /bin/mkpasswd -l -u cyg_server >> /etc/passwd
    
    Administrator@VM8ORALCOLABOR ~
    $ /bin/mkpasswd -l -u oracle >> /etc/passwd
    
    Administrator@VM8ORALCOLABOR ~
    $ /bin/mkpasswd -l -u Administrator >> /etc/passwd
    
    Administrator@VM8ORALCOLABOR ~
    $ chmod 644 /etc/ssh*
    
    Administrator@VM8ORALCOLABOR ~
    $ chown cyg_server /var/empty
    
    Administrator@VM8ORALCOLABOR ~
    $ chmod 755 /var/empty
    
    Administrator@VM8ORALCOLABOR ~
    $ chmod 644 /var/log/sshd.log
    chmod: cannot access `/var/log/sshd.log': No such file or directory
    
    Administrator@VM8ORALCOLABOR ~
    $ /usr/sbin/sshd
    
    Administrator@VM8ORALCOLABOR ~
    $
    sshConnectivty launch
    ==================
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $ exprt ORACL_HME=":/racle/midlwar/om11g"
    gsysman/pr
    /cygdrive/c/cygwin/binOLABOR
    $  exprtJA_LOC="C:/racle/middleware/oms11g/oracle/oui/jlib"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export JAR_LOC="C:/oracle/middleware/oms11g/oracle/oui/jlib"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export SSH_LOC="C:/oracle/middleware/oms11gsysman/prov/agentpush/jlib"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export JAR_LOC="C:/oracle/middleware/oms11g/oui/jlib"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export OUI_LOC="C:/oracle/middleware/oms11g/oui"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export PROP_LOC="C:/oracle/middleware/oms11g/sysman/prov/resources"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $  export JAVAHOME="C:/oracle/middleware/oms11g/jdk"
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/cygwin/bin
    $ cd c:/
    
    Administrator@VM8ORALCOLABOR /cygdrive/c
    $ cd oracle/middleware/oms11g/sysman/prov/resources/scripts
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
    sources/scripts
    $ dos2unix sshConnectivity.sh
    sshConnectivity.sh: done.
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/re
    sources/scripts
    $ ./shConnectivity.sh -hosts "ferrari.dbsoft.local" -user oracle -asUser cyg_server -asUserGrp root -sshLocalDir "C:\cygwin\.ssh" -localPlatformGrp win -remotePlatform 46
    
    All paths should be windows style full path.
    
    This script will setup SSH Equivalence from the host 'VM8ORALCOLABOR' to specifi
    ed remote hosts.
    
    The following envrionment would be used
    ORACLE_HOME = C:/oracle/middleware/oms11g
    JAR_LOC = C:/oracle/middleware/oms11g/oui/jlib
    SSH_LOC = C:/oracle/middleware/oms11gsysman/prov/agentpush/jlib
    OUI_LOC = C:/oracle/middleware/oms11g/oui
    PROP_LOC = C:/oracle/middleware/oms11g/sysman/prov/resources
    JAVAHOME = C:/oracle/middleware/oms11g/jdk
    cygwin warning:
      MS-DOS style path detected: C:/oracle/middleware/oms11g/jdk\bin\java
      Preferred POSIX equivalent is: /cygdrive/c/oracle/middleware/oms11g/jdk/bin/ja
    va
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    JAVAHOME = C:/oracle/middleware/oms11g/jdk
    java.lang.NoClassDefFoundError: oracle/sysman/prov/ssh/SSHConnectivity
    Caused by: java.lang.ClassNotFoundException: oracle.sysman.prov.ssh.SSHConnectiv
    ity
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: oracle.sysman.prov.ssh.SSHConnectivity.  Program
    will exit.
    Exception in thread "main" Remote host reachability check failed.
    Please ensure that all the hosts are up and re-run the script.
    Exiting now...
    
    Administrator@VM8ORALCOLABOR /cygdrive/c/oracle/middleware/oms11g/sysman/prov/resources/scripts
    $
  • 13. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    741357 Newbie
    Currently Being Moderated
    Jan (or anyone)

    Did you ever get this to work? What's the secret?

    I am attempting to setup the agent for grid control / cygwin on 2008R2. I looked at both the old 11g and newer 12c documentation. I swear no one at Oracle ever used it to configure an agent, as it contains fundamental flaws.

    So I realized that for step 6 you need to open (as administator) the cygwin terminal and type:

    bash
    ssh-host-config

    (not bashssh-host-config (11g) or -bash -ssh-host-config)

    Then the setup starts. Cygwin asks for several things that don't match the documentation. This may be because it is a newer version - but you can't (easily at least) get an older version.

    Example: Instead of typing CYGWIN="binmode tty ntsec" you just type binmode tty ntsec at the "Enter the value of CYGWIN for the daemon:" prompt.

    So... Why isn't Cygwin bundled? Is Oracle saying to use this software but isn't paying the Cygwin maintainers anything to allow them to bundle it?

    So anywho - my basic questions (so far) are:

    1. Who should I be running setup/service this as?

    Although my databases are on servers that are on a domain, we only have local admin accounts (not domain). I don't have a cyg_server user and if I choose to use my admin account user - it says it does not have the necessary privileges. But if I ignore this it seems to make that user. So am I good?

    2. Related to #1 - we are instructed to use CYGWIN="binmode tty ntsec". << NTSEC I think is assuming domain accounts for machine to machine use right? This won't most likely work - even with the listener I have to use NONE since with NTS I cannot then connect from a normal user account to the database.

    Any assistance is gratefull - I can go though the pain of oracle support - but if someone has tips/better docs that will probably be faster (and help others that arive here via search with the same issues).

    Bryan
  • 14. Re: Agent Deployment(agent push) from Windows OMS to Linux Server
    741357 Newbie
    Currently Being Moderated
    Now... having muddled my way through (hopefully with the right choices) to step 8 and I am presented with:

    "If your user... is a domain user, do the following:"

    Nope, just a local user. Where is the ELSE?

    <soapbox on>
    Hello Oracle - there is NOTHING about what to do if it is not a domain user.

    Please fire your documentation and QA people for this product. Talk about user vicious software (and manual)... And we paid what for this pleasure?

    Sorry, but this is really pisspoor stuff. Oracle documentation is generally lacking, especially in examples, but this really takes the cake. What changes there are between 11 and 12 are still wrong, just different.
    </soapbox off>
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points