Reply
New Contributor
Posts: 5
Registered: ‎08-09-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

supervisord, <enter>
New Contributor
Posts: 11
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

bash: supervisord: command not found...

 

I think the supervisord didn't install 

New Contributor
Posts: 11
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

or dir is ?

Explorer
Posts: 9
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

You don't need to install superviserd it is integrated in cloudera-scm-agent source code.
You can't run it from command line by yourself
New Contributor
Posts: 5
Registered: ‎08-09-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

Try this http://supervisord.org/installing.html then it should run.
Explorer
Posts: 9
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

I have done it before but it is not working as properly because cloudera-scm-agent doesn't control it and can't kill and restart with proper configurations. In the fact cloudera-scm-agent contain source code of aforementioned supervisord and it run supervisor by itself with proper configurations which generated by cloudera-scm-agent
New Contributor
Posts: 11
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

Vigensahakyan, do you have fixed it now?

Explorer
Posts: 9
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

[ Edited ]

It seems I found a bug in cloudera-agent code.
In which version of OS you are running ? Is it Desktop or Sever ?
If I will find that it is really a bug I will write a briefly how you can
overcame that.

Explorer
Posts: 9
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

[ Edited ]

Hi all, I think it is bug in cloudera-scm-agent. 
My problem is that I'm running desktop version of Ubuntu, because of that Gnome creates and mounts /run/user/$uid/gvfs directory, which created by driver process hence that even the root user can't access that directory in any way.
When cloudera-scm-agent trying to find mounted `/run/cloudera-scm-agent/process/` directory, it lists all partitions of file system and compare them to see if it equal to /run/cloudera-scm-agent/process/ and check if it mounted as tmpfs.


During disk_partition iteration cloudera-scm-agent access /run/user/$uid/gvfs directory and crashes becase it doen't has permission to access that directory. You don't see any errors of permision denied as because cloudera-scm-agent are runned by linux services and it doesn't show any output from the scripts. (code which crashes is below) 

file: /usr/lib/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.0-py2.7.egg/cmf/tmpfs.py
for p in psutil.disk_partitions(all=True):       if os.path.samefile(p.mountpoint, path) and p.fstype == "tmpfs" and "noexec" not in p.opts:         if clean_existing:
           if not _mount_tmpfs(path, False, sudo=sudo):
             # Failed to unmount, reuse.
             reuse = True
         else:
           # Existing tmpfs without noexec, reuse.
           reuse = True
         break


Solution:
First you have to find user in which gvfs directory are mounted. For that reason you can use script below. And be sure that you have psutil installed
 

import psutil
import os

path = '/run/cloudera-scm-agent/process'

for p in psutil.disk_partitions(all=True):
    if os.path.samefile(p.mountpoint, path) and p.fstype == "tmpfs" and "noexec" not in p.opts:
        pass

This will print an error with your gvfs direcotory like this

 

Traceback (most recent call last):
  File "cloud.py", line 7, in <module>
    if os.path.samefile(p.mountpoint, path) and p.fstype == "tmpfs" and "noexec" not in p.opts:
  File "/usr/lib/python2.7/posixpath.py", line 155, in samefile
    s1 = os.stat(f1)
OSError: [Errno 13] Permission denied: '/run/user/1001/gvfs'

At this moment you know the that right gvfs directory is '/run/user/1001/gvfs' (in my case of course, it mainly depends on user id which run Gnome )

Second open tmpfs.py file and add if condition to skip this folder.
Open file: 
sudo vim /usr/lib/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.0-py2.7.egg/cmf/tmpfs.py
add if condition in mount_tmpfs function like I have done below.

for p in psutil.disk_partitions(all=True):
    if p.mountpoint != '/run/user/1001/gvfs':       if os.path.samefile(p.mountpoint, path) and p.fstype == "tmpfs" and "noexec" not in p.opts:
         if clean_existing:
           if not _mount_tmpfs(path, False, sudo=sudo):
             # Failed to unmount, reuse.
             reuse = True
         else:
           # Existing tmpfs without noexec, reuse.
           reuse = True
         break

And third restart your cloudera-scm-agent
sudo service cloudera-scm-agent restart

 

then check if 19001 port is listen or not.

New Contributor
Posts: 11
Registered: ‎08-07-2017

Re: Missing supervisord.conf in /run/cloudera-scm-agent/supervisor/ directory

centos7 and gonme installed

Announcements