Topic
8 replies Latest Post - ‏2012-06-12T18:17:41Z by SystemAdmin
SystemAdmin
SystemAdmin
165 Posts
ACCEPTED ANSWER

Pinned topic Listener run as root

‏2012-06-12T18:17:41Z |
I received information from a Unica consultant if we comment few lines in the rc.unicaac script, the listener can run as another user.
We heard different view from others.
Please clarify
Updated on 2012-06-12T18:17:41Z at 2012-06-12T18:17:41Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    Other tech support staff have

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    Other tech support staff have mentioned that not running as root will cause problems. I could comment those lines in rc.unica_ac and run as the user that Campaign uses. Will it be a issue if I continue to run as the other user.
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    I'm glad to help you with

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    I'm glad to help you with this. It is definitely possible to bypass the root requirement for starting the rc.unica_ac (Unica Campaign listener) script. The listener script has a built in check to be sure that the script is being run as root.

    In order to start the Campaign listener as a user other than root, you must open up the rc.unica_ac script and comment out the section that requires starting as root, like so:

    #
    1. Make sure that we are running as root
    #
    #whoami=`whoami 2>/dev/null` || whoami=`/usr/bin/id | sed -e ' s/).*//; s/^.*(//'`
    #if
    #then
    #      echo "Error: Logged in as $whoami. Must be root to run this script!"
    #      echo ""
    #     exit 1
    #else
    #      echo "Logged in as root."
    #      echo Path is $PATH.
    #      echo ""
    #fi

    One caveat I would like to mention though is that the reason we run the listener as root is to take advantage of the unlimited ulimit settings in the script. The unlimited option is only available if the script is started as root.

    Many customers are successful configuring their listener to skip the root check, so this is just an FYI to consider.
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    So, to avoid the ulimit

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    So, to avoid the ulimit caveat, if I set the user ulimit settings to be the same as root, we should be good , correct ?
    Currently I have the settings below for the other user :

    {/dv/Affinium/Campaign/bin}: whoami
    campapp
    {/dv/Affinium/Campaign/bin}: ulimit -a
    address space limit (kbytes) (-M) unlimited
    core file size (blocks) (-c) 0
    cpu time (seconds) (-t) unlimited
    data size (kbytes) (-d) unlimited
    file size (blocks) (-f) unlimited
    locks (-L) unlimited
    locked address space (kbytes) (-l) unlimited
    nofile (-n) 1048576
    nproc (-u) 127910
    pipe buffer size (bytes) (-p) 4096
    resident set size (kbytes) (-m) unlimited
    socket buffer size (bytes) (-b) 4096
    stack size (kbytes) (-s) unlimited
    threads (-T) not supported
    process size (kbytes) (-v) unlimited
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    Looking at the ulimit output

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    Looking at the ulimit output I think you are good to go. You can use a user other than root (in your case campapp).

    But one option that concerns me is "threads (-T) not supported".
     
    Which OS ( Please specify Version and bitness) are you using and which Version of Campaign( and bitness) are you using?
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    Thanks Ashutosh and Ece. I am

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    Thanks Ashutosh and Ece. I am using Linux 64 bit OS for Listener and 32-bit for web part. Installing Campaign 7.5.3 release build 5. Manager is on 7.5.1.1.

    Linux 2.6.16.60-0.58.1-smp #1 SMP Wed Dec 2 12:27:56 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    I guess you are using RHEL5.

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    I guess you are using RHEL5. Corret me if I am wrong.

    Have you installed Campaign and started using this with the user campapp to start the listener?

    I am speificcally asking this question because my concern still is around the Thread's option. Can  you talk to your system administrator and enquire why is this not supported. We might need this to be supported as Campaign uses Threads. 

    If you are already using Campaign by starting the Listener using campapp and have not faced any issues, then I assume you are safe.

    Also just to cross verify can you login as root and send us the output of ulimit -a command please.
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    We are on Suse linux 64

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    We are on Suse linux 64 bit.
    we have always run as root. We are attempting to run as campapp now and are succesful in running a flowchart now, but not sure of thread behaviour with many.
    Here's the root output.
    root@crm023-10:~># ulimit -a

    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    pending signals (-i) 127910
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 1048576
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    stack size (kbytes, -s) unlimited
    cpu time (seconds, -t) unlimited
    max user processes (-u) 127910
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
  • SystemAdmin
    SystemAdmin
    165 Posts
    ACCEPTED ANSWER

    If you are already able to

    ‏2012-06-12T18:17:41Z  in response to SystemAdmin
    If you are already able to run a flowchart you are all safe and all set. Interesting the ulimit -a on root doesn't even show the option.