In my previous post, I demonstrated how to use emcli to download new agent software and import them to Enterprise Manager Cloud Control. One of my readers told me that emcli gives “session expired” error when he tries to import catalog file. First I thought he does not run the commands in time so emcli session expires but I get the same error in one of my test servers.
1 2 3 |
./emcli login -username=SYSMAN ./emcli list_active_sessions Error: Session expired. Run emcli login to establish a session. |
I checked the logs and found the bug 10625373 in My Oracle Support. According to the bug, you get this error if you do not use a fully qualified domain name (FQDN) of the OMS server for emcli setup (or while installing Enterprise Manager Cloud Control). You need to re-setup emcli and use a FQDN or you can use “auto-login” to fix this problem.
Run the following command if you prefer to setup emcli with autologin:
1 |
./emcli setup -url="https://cloudcontrolserver:port/em" -username=sysman -trustall |
After this command, you do not need “emcli login” before you run any emcli command. If you do not want to use auto-login, you should use a FQDN, so run the following command:
1 2 |
./emcli setup -url="https://cloudcontrolserver.domainname.com:port/em" \ -username=sysman -trustall -noautologin |
If your server does not have a FQDN (not in a domain), you can add an unused FQDN to your /etc/hosts and use that fake FQDN with emcli setup:
1 2 |
vi /etc/hosts X.X.X.X cloudcontrol.myfakedomainname.com |
By the way, the slash (/) is used to split long lines into two lines, so they can fit in my web page. You can remove the slash and combine two lines into one line.
Hakan Kılıç
Gokhan Atil
Amandeep goyal
Gokhan Atil
Airell
Airell
Gokhan Atil
Rishabh
djeday84
Alaa
Halina