Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hello,

      I am new to Keystone and I am using the Fiware guide to install Keystone and Horizon. However, during the Keystone installation, I am getting an error at step 3 command:

      sudo python tools/install_venv.py

      The log is as below:

      .

      .

      .

      Installing collected packages: pbr, WebOb, greenlet, eventlet, netaddr, PasteDeploy, Paste, repoze.lru, Routes, six, SQLAlchemy, decorator, Tempita, sqlalchemy-migrate, passlib, iso8601, argparse, pytz, Babel, stevedore, oslo.config, oslo.i18n, netifaces, oslo.utils, oslo.serialization, prettytable, requests, python-keystoneclient, Unidecode, python-slugify, posix-ipc, pycadf, keystonemiddleware, python-mimeparse, extras, linecache2, traceback2, unittest2, testtools, fixtures, retrying, oslo.concurrency, PyYAML, anyjson, amqp, kombu, oslo.messaging, MarkupSafe, Mako, python-editor, alembic, oslo.db, pyotp, oauthlib, dogpile.core, dogpile.cache, functools32, jsonschema, MySQL-python, pep8, pyflakes, mccabe, flake8, hacking, bashate, pysqlite, python-memcached, pymongo, python-ldap, pyldap, ldappool, future, zope.interface, repoze.who, pycryptodomex, idna, pyasn1, enum34, ipaddress, pycparser, cffi, cryptography, pyOpenSSL, python-dateutil, pysaml2, coverage, lxml, funcsigs, mock, mox3, python-subunit, discover, testrepository, testscenarios, oslotest, Pygments, docutils, Jinja2, sphinx, waitress, beautifulsoup4, WebTest, oslosphinx, lockfile
      Found existing installation: pbr 1.10.0
      Uninstalling pbr-1.10.0:
      Successfully uninstalled pbr-1.10.0
      Running setup.py install for WebOb ... done
      Running setup.py install for greenlet ... done
      Running setup.py install for Paste ... done
      Running setup.py install for repoze.lru ... done
      Running setup.py install for Routes ... done
      Found existing installation: six 1.10.0
      Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
      Running setup.py install for SQLAlchemy ... error
      Complete output from command /keystone/.venv/bin/python2 -u -c "import setuptools, tokenize;_file='/tmp/pip-build-JC6HQz/SQLAlchemy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file_, 'exec'))" install --record /tmp/pip-ff_MYs-record/install-record.txt --single-version-externally-managed --compile --install-headers /keystone/.venv/include/site/python2.7/SQLAlchemy:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-JC6HQz/SQLAlchemy/setup.py", line 170, in <module>
      run_setup(True)
      File "/tmp/pip-build-JC6HQz/SQLAlchemy/setup.py", line 150, in run_setup
      **kwargs
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
      _setup_distribution = dist = klass(attrs)
      File "/keystone/.venv/local/lib/python2.7/site-packages/setuptools/dist.py", line 320, in _init_
      Distribution.init_(self, attrs)
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in _init_
      self.finalize_options()
      File "/keystone/.venv/local/lib/python2.7/site-packages/setuptools/dist.py", line 386, in finalize_options
      ep.require(installer=self.fetch_build_egg)
      File "/keystone/.venv/local/lib/python2.7/site-packages/pkg_resources/_init_.py", line 2245, in require
      items = working_set.resolve(reqs, env, installer)
      File "/keystone/.venv/local/lib/python2.7/site-packages/pkg_resources/_init_.py", line 834, in resolve
      raise VersionConflict(dist, req).with_context(dependent_req)
      pkg_resources.VersionConflict: (six 1.9.0 (/keystone/.venv/lib/python2.7/site-packages), Requirement.parse('six>=1.10.0'))

      ----------------------------------------
      Command "/keystone/.venv/bin/python2 -u -c "import setuptools, tokenize;_file='/tmp/pip-build-JC6HQz/SQLAlchemy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file_, 'exec'))" install --record /tmp/pip-ff_MYs-record/install-record.txt --single-version-externally-managed --compile --install-headers /keystone/.venv/include/site/python2.7/SQLAlchemy" failed with error code 1 in /tmp/pip-build-JC6HQz/SQLAlchemy/
      Command "tools/with_venv.sh pip install --upgrade -r /keystone/requirements.txt -r /keystone/test-requirements.txt" failed.
      None

      Since I am new to Keystone, I do not understand why is this error occuring. I am using Ubuntu 16.04.1 and it is updated.

      The guide that I am using: http://fiware-idm.readthedocs.io/en/latest/admin_guide.html#installing-keystone

      Installation and Administration Guide - KeyRock 5.4.0 ...<http://fiware-idm.readthedocs.io/en/latest/admin_guide.html#installing-keystone>
      fiware-idm.readthedocs.io
      Introduction ΒΆ Welcome to the Installation and Administration Guide for the Identity Management - KeyRock Generic Enabler. This section will cover how to install ...

      [Created via e-mail received from: Umair Nadeem <umair2357@hotmail.com>]

        Activity

        Hide
        aalonsog Alvaro Alonso added a comment -

        Hello,

        Have you tried to install KeyRock in Ubuntu 14 instead of Ubuntu 16? We don't currently support this latest version.

        You shouldn't find any trouble with Ubuntu 14, so please write back if you run into any error.

        Kind regards

        Show
        aalonsog Alvaro Alonso added a comment - Hello, Have you tried to install KeyRock in Ubuntu 14 instead of Ubuntu 16? We don't currently support this latest version. You shouldn't find any trouble with Ubuntu 14, so please write back if you run into any error. Kind regards
        Hide
        fw.ext.user FW External User added a comment -

        Comment by umair2357@hotmail.com :

        Thank you very much for your suggestion. Yes the Keystone installation has worked on a Ubuntu 14 VM. I haven't installed Horizon yet. Though I am facing another problem now.

        I have tried requesting a domain-scoped token for the admin account but I get this:

        "error":

        { "code": 400, "message": "object of type 'NoneType' has no len()", "title": "Bad Request" }

        The user is assigned an admin role in the default domain. I can request an un-scoped token and is working fine. But the domain-scoped token is not working. On the Keystone server, I get this error:

        2017-01-30 15:16:11.313 13831 ERROR keystone.common.wsgi [-] object of type 'NoneType' has no len()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi Traceback (most recent call last):
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/common/wsgi.py", line 224, in _call_
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi result = method(context, **params)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/auth/controllers.py", line 407, in authenticate_for_token
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi is_cloud_token = self.assignment_api.get_project(project_id).get('is_cloud_project')
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 1040, in decorate
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi should_cache_fn)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 651, in get_or_create
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi async_creator) as value:
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 158, in _enter_
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self._enter()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 98, in _enter
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi generated = self._enter_create(createdtime)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 149, in _enter_create
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi created = self.creator()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 619, in gen_value
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi created_value = creator()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 1036, in creator
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return fn(*arg, **kw)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/core.py", line 484, in get_project
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self.driver.get_project(project_id)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/backends/sql.py", line 47, in get_project
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self._get_project(session, tenant_id).to_dict()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/backends/sql.py", line 40, in _get_project
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi project_ref = session.query(Project).get(project_id)
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 802, in get
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi if len(ident) != len(mapper.primary_key):
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi TypeError: object of type 'NoneType' has no len()
        2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi
        2017-01-30 15:16:11.315 13831 INFO eventlet.wsgi.server [-] 134.61.84.16 - - [30/Jan/2017 15:16:11] "POST /v3/auth/tokens HTTP/1.1" 400 239 0.099070

        I don't understand this problem. Is the admin user not supposed to request domain scoped token?

        Show
        fw.ext.user FW External User added a comment - Comment by umair2357@hotmail.com : Thank you very much for your suggestion. Yes the Keystone installation has worked on a Ubuntu 14 VM. I haven't installed Horizon yet. Though I am facing another problem now. I have tried requesting a domain-scoped token for the admin account but I get this: "error": { "code": 400, "message": "object of type 'NoneType' has no len()", "title": "Bad Request" } The user is assigned an admin role in the default domain. I can request an un-scoped token and is working fine. But the domain-scoped token is not working. On the Keystone server, I get this error: 2017-01-30 15:16:11.313 13831 ERROR keystone.common.wsgi [-] object of type 'NoneType' has no len() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi Traceback (most recent call last): 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/common/wsgi.py", line 224, in _ call _ 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi result = method(context, **params) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/auth/controllers.py", line 407, in authenticate_for_token 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi is_cloud_token = self.assignment_api.get_project(project_id).get('is_cloud_project') 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 1040, in decorate 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi should_cache_fn) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 651, in get_or_create 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi async_creator) as value: 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 158, in _ enter _ 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self._enter() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 98, in _enter 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi generated = self._enter_create(createdtime) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 149, in _enter_create 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi created = self.creator() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 619, in gen_value 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi created_value = creator() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 1036, in creator 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return fn(*arg, **kw) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/core.py", line 484, in get_project 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self.driver.get_project(project_id) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/backends/sql.py", line 47, in get_project 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi return self._get_project(session, tenant_id).to_dict() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/keystone/assignment/backends/sql.py", line 40, in _get_project 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi project_ref = session.query(Project).get(project_id) 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi File "/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 802, in get 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi if len(ident) != len(mapper.primary_key): 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi TypeError: object of type 'NoneType' has no len() 2017-01-30 15:16:11.313 13831 TRACE keystone.common.wsgi 2017-01-30 15:16:11.315 13831 INFO eventlet.wsgi.server [-] 134.61.84.16 - - [30/Jan/2017 15:16:11] "POST /v3/auth/tokens HTTP/1.1" 400 239 0.099070 I don't understand this problem. Is the admin user not supposed to request domain scoped token?
        Hide
        aalonsog Alvaro Alonso added a comment -

        Hello again,

        There is a bug in the latest commits of Keystone we are still working on, and it may be causing the error you are running into. In the meantime, please use the code from the latest release (5.4.0, available in https://github.com/ging/keystone/tree/keyrock-5.4.0). You should have no problem with that version, so feel free to write back if the problem persists.

        Kind regards

        Show
        aalonsog Alvaro Alonso added a comment - Hello again, There is a bug in the latest commits of Keystone we are still working on, and it may be causing the error you are running into. In the meantime, please use the code from the latest release (5.4.0, available in https://github.com/ging/keystone/tree/keyrock-5.4.0 ). You should have no problem with that version, so feel free to write back if the problem persists. Kind regards
        Hide
        fw.ext.user FW External User added a comment -

        Comment by umair2357@hotmail.com :

        Yes, using the latest version has solved the problem. Now, I can request a scoped token. Thank you for the solution.

        -

        Show
        fw.ext.user FW External User added a comment - Comment by umair2357@hotmail.com : Yes, using the latest version has solved the problem. Now, I can request a scoped token. Thank you for the solution. -

          People

          • Assignee:
            aalonsog Alvaro Alonso
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: