Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] esmond issues?

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] esmond issues?


Chronological Thread 
  • From: Andrew Lake <>
  • To: "Cas D'Angelo" <>, Daniel Doyle <>
  • Cc:
  • Subject: Re: [perfsonar-user] esmond issues?
  • Date: Thu, 28 Jul 2016 09:08:51 -0400

Hi,

Is SECRET_KEY filled-in under /usr/lib/esmond/esmond/settings.py? If not maybe just run "python util/gen_django_secret_key.py” and copy the result to the file by hand?

Thanks,
Andy


On July 27, 2016 at 12:01:09 PM, Cas D'Angelo () wrote:

Thanks Andy.  Tried this also, but still ends up with an error:

(esmond)[root@perfsonar-160 esmond]# cd /usr/lib/esmond
(esmond)[root@perfsonar-160 esmond]# unlink bin/python2
(esmond)[root@perfsonar-160 esmond]# source /opt/rh/python27/enable
(esmond)[root@perfsonar-160 esmond]# /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
New python executable in ./bin/python2
Not overwriting existing python script ./bin/python (you must use ./bin/python2)
Installing setuptools, pip, wheel...done.
(esmond)[root@perfsonar-160 esmond]# . bin/activate
(esmond)[root@perfsonar-160 esmond]# ./configure_esmond
Traceback (most recent call last):
  File "/usr/lib/esmond/bin/django-admin", line 9, in <module>
    load_entry_point('Django==1.8.5', 'console_scripts', 'django-admin')()
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/core/management/__init__.py", line 343, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/core/management/__init__.py", line 182, in fetch_command
    settings.INSTALLED_APPS
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/esmond/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
(esmond)[root@perfsonar-160 esmond]#


On 07/27/2016 09:20 AM, Andrew Lake wrote:
Hi,

It’s caused by a recent update in the SCL repo, so if you are using the python27 from SCL and not the Internet2 yum repo you hit that. There is an issue here: https://github.com/esnet/esmond/issues/54 . I’m still not entirely sure what causes it either. You can fix with the following commands:

cd /usr/lib/esmond
unlink bin/python2
source /opt/rh/python27/enable
/opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
. bin/activate
./configure_esmond

Hope that helps,
Andy


On July 27, 2016 at 9:14:30 AM, Daniel Doyle () wrote:

Cas,

Hm, strange. I set my instance up to look like yours and got the same error message. It -seems- like if from /usr/lib/esmond you remove bin/python, bin/python2, and bin/python2.7 it will recreate them with in a working fashion. Before doing that I would copy them to another location as backups just in case. The symlinks created this way appear to be backwards from the install (python -> python2 instead of other way around) but it’s the same version and file size and appears to work.

Do you have any idea what may have happened to get into this state? I double checked a couple of recently installed / upgraded boxes of my own and they seem to be in working order.

Dan Doyle
GlobalNOC Software Developer
1-812-856-3892

On Jul 27, 2016, at 8:29 AM, Cas D'Angelo <> wrote:

I have tried as root and as sudo -u perfsonar.  Same result.  One issue is with the symlinks that point at one another in the 'ls -la' below.

I have copied the /usr/lib/esmond/bin/python script from a working node onto the node with the issue.  When I execute:
(esmond)[root@perfsonar-160 esmond]# /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .

...it creates a new symlink for /usr/lib/esmond/bin/python that points to python2 which points to python which points to python2....

Thanks.

Cas



On 07/26/2016 05:00 PM, Daniel Doyle wrote:
Are you running those commands as root? I can’t recall offhand if the documentation states that but you need to run as root iirc.

Dan Doyle
GlobalNOC Software Developer
1-812-856-3892

On Jul 26, 2016, at 4:58 PM, Cas D'Angelo <> wrote:

Thanks for the quick replies Dan and Andy.

When staring the virtualenv I get the following error:
# /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .
New python executable in ./bin/python2
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==13.1.0', 'console_scripts', 'virtualenv')()
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/virtualenv.py", line 832, in main
    symlink=options.symlink)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/virtualenv.py", line 994, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/virtualenv.py", line 1288, in install_python
    shutil.copyfile(executable, py_executable)
  File "/opt/rh/python27/root/usr/lib64/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: './bin/python2'

# cd /usr/lib/esmond/bin
# ls -la
...
lrwxrwxrwx.  1 root   root       7 Jul 22 09:31 python -> python2
lrwxrwxrwx.  1 esmond esmond     6 Jul 15 14:13 python2 -> python
lrwxrwxrwx.  1 esmond esmond     6 Jul 15 14:13 python2.7 -> python
...

Maybe python got written over?  I can copy from another working machine...

Cas





On 07/26/2016 04:41 PM, Daniel Doyle wrote:
Using esmond requires python2.7, which isn’t the default on CentOS6.

If you need to generate an API key (or whitelist an API address), see here: http://docs.perfsonar.net/multi_ma_install.html#authenticating-by-username-and-api-key

Note the steps involving “enable” and “virtualenv” - that is why you’re getting that error message.

Dan Doyle
GlobalNOC Software Developer
1-812-856-3892

On Jul 26, 2016, at 4:32 PM, Cas D'Angelo <> wrote:

I have a RHEL 6.8 x86_64 box which is the only perfSONAR node I have which is not a Toolkit install.  The sysadmin installed many perfSONAR packages standalone, but I was having trouble getting any results from it on the maddash server. I installed the toolkit rpms on top of the other installation.

I think the issue is with esmond. I tried to manually add an api key and it gives me the following error:

$ python esmond/manage.py add_api_key_user perfsonar
Traceback (most recent call last):
  File "esmond/manage.py", line 2, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

In any case, I think I need an api key to place into regulartesting.conf.

Thanks for your advice.

Cas










Archive powered by MHonArc 2.6.19.

Top of Page