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.

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:

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:

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:

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.

7 Responses to “EMCLI “session expired” Error and FQDN”

  1. Hakan Kılıç says:

    Gökhan Hocam
    12c Cloud Control Ankara için yeni bir ürün ve bu tip hata çözümlemeleri için pek kaynak bulunmuyor.
    Değerli paylaşımınız için Teşekkürler
    Hakan KILIÇ (OCA)

    • Gokhan Atil says:

      Selam Hakan, vakit buldukça ve yazmaya değer birşeyler karşıma çıktıkça bunları blogumda anlatmaya çalışıyorum, destek verici mesajın için teşekkürler.

  2. Amandeep goyal says:

    hi Gokhan

    i tried with both ways, but m still facing the same issue. its again showing me session expired.

  3. Hello Gokham,

    Like Amandeep, I also still have the EMCLI ‘“session expired”’ error. Even after reconfiguring using the FQDN.

    Regards, Airell.

    • Hi Gokhan,

      If you want to set autologin to true, you must specify it with the ‘-autologin’ option when setting up.

      Cheers, Airell.

  4. Gokhan Atil says:

    Amandeep and Airell,

    I do not get any session expired error when I try to use emcli on OMS server. I have re-tested today:

    [oracle@cloudcontrol12 ~]$ /oracle/Middleware/oms/bin/emcli version
    Oracle Enterprise Manager 12c EMCLI Version 12.1.0.2.0

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>