My Oracle Support Banner

EM 12c: Running any Enterprise Manager 12c Cloud Control emcli Action after Login Fails with Message: Error: Session expired. Run emcli login to establish a session. (Doc ID 1300112.1)

Last updated on NOVEMBER 04, 2015

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.1.0 to 12.1.0.2.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

emcli (enterprise manager command line interface) setup is successful:

./emcli setup -noautologin -username=sysman -url=https://<OMS_HOSTNAME>:7799/em/
Emcli setup successful

For example:

./emcli setup -noautologin -username=sysman -url=https://machine1:7799/em/
Emcli setup successful


Subsequent emcli commands fail:

./emcli get_groups
Error: Session expired. Run emcli login to establish a session.

 

The emcli.log shows:

May 23, 2012 9:59:07 AM oracle.sysman.emSDK.emCLI.verb.RemoteVerb execute
SEVERE:
oracle.sysman.emCLI.omsbrowser.OMSBrowserException
    at oracle.sysman.emCLI.omsbrowser.LoginSystem.establishSession(LoginSystem.java:218)
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPageInternal(OMSBrowser.java:653)
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPage(OMSBrowser.java:595)
    at oracle.sysman.emSDK.emCLI.verb.RemoteVerb.execute(RemoteVerb.java:107)
    at oracle.sysman.emSDK.emCLI.CLIController.execute(CLIController.java:540)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at oracle.sysman.emSDK.emCLI.CLIController.go(CLIController.java:343)
    at oracle.sysman.emSDK.emCLI.CLIController.main(CLIController.java:157)

 

Locate the emcli.log file:

Windows:

C:\Documents and Settings\<username>\.emcli\.emcli.log

Unix:

$HOME/oracle/.emcli/.emcli.log

 

Note that it is possible to log in using:

emcli login -username=sysman

but running any command, including "emcli sync", will still result in the message: Error: Session expired. Run emcli login to establish a session.

 

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.