7 Replies Latest reply on Sep 18, 2018 3:54 AM by Varun Das

    CONTROLM environment variable is not defined

    Varun Das

      Hello!

       

      Can anyone suggest as to how should I troubleshoot the aforementioned issue? I get this prompt on a UNIX agent when I try to start it. I have tried the steps mentioned under KA379527, but that did not solve it. Please let me know of other alternatives (if any).

        • 1. Re: CONTROLM environment variable is not defined
          Jesse Richardson

          Successfully moved to Control-M community so product experts can help

          • 2. Re: CONTROLM environment variable is not defined
            MunKeong Lee

            Hi Varun

            My guess is that login script for your agent's OS account has been changed. It's .bash_profile, .cshrc etc depending on the login shell that you use.

            The CONTROLM environment variable should be set to the ctm directory of your agent's home directory e.g

                   CONTROLM=/home/ctmagent/ctm

            To set it in C shell, use

              setenv CONTROLM /home/ctmagent/ctm

            For other shells, use

            export CONTROLM=/home/ctmagent/ctm

             

            Regards,

            MK

            1 of 1 people found this helpful
            • 3. Re: CONTROLM environment variable is not defined
              Varun Das

              Hi MunKeong

               

              Thanks for your time on this. Unfortunately, the steps did not work and the issue persists. The system throws me the same error as before. I am sharing the environment variables details, please let me know if it looks like it should.

               

              HOSTNAME=lin35004296

              SHELL=/bin/bash

              TERM=xterm

              HISTSIZE=1000

              CONTROLM=/home/ctmagent/ctm

              QTDIR=/usr/lib64/qt-3.3

              OLDPWD=/home/ctmagent/ctm

              QTINC=/usr/lib64/qt-3.3/include

              USER=root

              LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:

              MAIL=/var/spool/mail/root

              PATH=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/home/ctmagent/ctm

              PWD=/home/ctmagent/ctm/scripts

              LANG=en_US.UTF-8

              HISTCONTROL=ignoredups

              SHLVL=1

              HOME=/root

              LOGNAME=root

              QTLIB=/usr/lib64/qt-3.3/lib

              CVS_RSH=ssh

              LESSOPEN=||/usr/bin/lesspipe.sh %s

              G_BROKEN_FILENAMES=1

              _=/bin/env

               

              Regards,

              Varun

              • 4. Re: CONTROLM environment variable is not defined
                MunKeong Lee

                Hi Varun

                You are setting the CONTROLM environment variable in the root account. This will not work. Even though you are using the root account to start up the agent, the CONTROLM variable still has to be set for the agent account. You can verify this by logging into your agent account and run env. If CONTROLM variable does not show up, you have to fix the login script

                Regards,

                MK

                1 of 1 people found this helpful
                • 5. Re: CONTROLM environment variable is not defined
                  Varun Das

                  Hi MK,

                   

                  I tried setting up the variable in the agent account (ctmagent), but it did not work either. Is there any other miss that might be causing this issue?

                   

                  [ctmagent@ps12lodb045 ctm]$ env

                  HOSTNAME=ps12lodb045

                  SHELL=/bin/bash

                  TERM=xterm

                  HISTSIZE=1000

                  CONTROLM=/home/ctmagent/ctm

                  QTDIR=/usr/lib64/qt-3.3

                  OLDPWD=/home/ctmagent

                  QTINC=/usr/lib64/qt-3.3/include

                  USER=ctmagent

                  LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:

                  MAIL=/var/spool/mail/ctmagent

                  PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ctmagent/bin

                  PWD=/home/ctmagent/ctm

                  LANG=en_US.UTF-8

                  HISTCONTROL=ignoredups

                  SHLVL=1

                  HOME=/home/ctmagent

                  LOGNAME=ctmagent

                  QTLIB=/usr/lib64/qt-3.3/lib

                  CVS_RSH=ssh

                  LESSOPEN=||/usr/bin/lesspipe.sh %s

                  G_BROKEN_FILENAMES=1

                  _=/bin/env

                   

                  Also, when I run the basic check command, I am encountering the following error. Has it got something to do with the env variable issue?

                   

                  CONTROL-M/Agent Communication Diagnostic Report

                  -----------------------------------------------

                   

                  Agent User Name                : ctmagent

                  Agent Directory                : /home/ctmagent/ctm

                  Agent Platform Architecture    : Linux

                  Agent Version                  : 6.4.01.503

                  Agent Host Name                : ps12lodb045

                  Logical Agent Name             : ppmde2lindbx001

                  Listen to Network Interface    : *ANY

                  Server Host Name               : pvdclctm002.baf.ikano

                  Authorized Servers Host Names  : pvdclctm002.baf.ikano

                  Server-to-Agent Port Number    : 7006

                  Agent-to-Server Port Number    : 7005

                  Server-Agent Protocol Version  : 08

                  Server-Agent Comm. Protocol    : TCP

                  Server-Agent Connection mode   : Transient

                  Unix Ping to Server Platform   : Succeeded

                  Agent Ping to Control-M/Server : /home/ctmagent/ctm/exe/ag_ping: error while loading shared libraries: libBMCOS.so: cannot open shared object file: No such file or directory

                  Succeeded

                   

                   

                  Agent processes status

                  ======================

                  ./ag_diag_comm: line 170: shagent: command not found

                  Agent Router                   : Not running

                  ./ag_diag_comm: line 176: shagent: command not found

                  Agent Listener                 : Not running

                  ./ag_diag_comm: line 182: shagent: command not found

                  Agent Tracker                  : Not running

                   

                  Regards,

                  Varun

                  • 6. Re: CONTROLM environment variable is not defined
                    MunKeong Lee

                    Hi Varun

                    Did you perform a proper installation? Seems like that's a few issues in the login script. You are also missing the following environment variables:

                     

                    LD_LIBRARY_PATH=:/home/ctmagent/ctm/exe

                    PATH=..........:/home/ctmagent/ctm/scripts:/home/ctmagent/ctm/exe

                     

                    These are the issues that I can spot. Not sure whether there are others. My recommendation to resolve your problem is to reinstall the Control-M agent if setting up the above environment variables still does not work. It only takes a few minutes and everything will be set up nicely.

                    Regards,

                    MK

                    2 of 2 people found this helpful
                    • 7. Re: CONTROLM environment variable is not defined
                      Varun Das

                      Thanks a lot MK!

                       

                      I added all the variables permanently under root and it worked!