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 to [Release 12.1]
Information in this document applies to any platform.


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
    at oracle.sysman.emCLI.omsbrowser.LoginSystem.establishSession(
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPageInternal(
    at oracle.sysman.emCLI.omsbrowser.OMSBrowser.getPage(
    at oracle.sysman.emSDK.emCLI.verb.RemoteVerb.execute(
    at oracle.sysman.emSDK.emCLI.CLIController.execute(
    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(
    at oracle.sysman.emSDK.emCLI.CLIController.main(


Locate the emcli.log file:


C:\Documents and Settings\<username>\.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.




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

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