Unable to create new test users on Ubuntu 14.04
  • I succesfully completed installing superdesk. I fired up docker
    instances and it is working. But when i tried to login, they raised
    username and password error. then i tried populating dummy admin user
    with docker-local-ceate-user.py and the following error got occured.

    equirement
    already satisfied (use --upgrade to upgrade):
    backports.ssl-match-hostname in
    ./scripts/env/lib/python2.7/site-packages (from
    websocket-client>=0.32.0,<1.0->docker-compose==1.5.1->-r
    ~/superdesk/scripts/../docker/requirements.txt (line 1))
    Cleaning up...
    All services are started :3
    INFO:superdesk.websockets_comms:Connecting to broker redis://redis:6379/1
    INFO:superdesk.websockets_comms:Connected to broker redis://redis:6379/1
    INFO:ldap3:ldap3
    library initialized - logging emitted with loglevel set to DEBUG -
    available detail levels are: OFF, ERROR, BASIC, PROTOCOL, NETWORK,
    EXTENDED
    INFO:superdesk:got lock task=elastic host=hostid:448fa2c1d237 pid:43
    INFO:elasticsearch:HEAD http://elastic:9200/contentapi [status:200 request:0.002s]
    INFO:elasticsearch:PUT http://elastic:9200/contentapi/_mapping/items?ignore_conflicts=true [status:200 request:0.009s]
    INFO:superdesk:releasing lock task=elastic host=hostid:448fa2c1d237 pid:43
    Traceback (most recent call last):
      File "manage.py", line 18, in <module>
        app = get_app(init_elastic=True)
      File "/opt/superdesk/app.py", line 41, in get_app
        app = superdesk_app(config, init_elastic=init_elastic)
      File "/usr/local/lib/python3.4/dist-packages/superdesk/factory/app.py", line 126, in get_app
        app.data.init_elastic(app)
      File "/usr/local/lib/python3.4/dist-packages/superdesk/datalayer.py", line 49, in init_elastic
        self.elastic.init_index(app)
      File "/usr/local/lib/python3.4/dist-packages/eve_elastic/elastic.py", line 205, in init_index
        if not es.indices.exists(index):
      File "/usr/local/lib/python3.4/dist-packages/elasticsearch/client/utils.py", line 69, in _wrapped
        return func(*args, params=params, **kwargs)
      File "/usr/local/lib/python3.4/dist-packages/elasticsearch/client/indices.py", line 221, in exists
        raise ValueError("Empty value passed for a required argument 'index'.")
    ValueError: Empty value passed for a required argument 'index'.
    +++ sample data was prepopulated
    INFO:superdesk.websockets_comms:Connecting to broker redis://redis:6379/1
    INFO:superdesk.websockets_comms:Connected to broker redis://redis:6379/1
    INFO:ldap3:ldap3
    library initialized - logging emitted with loglevel set to DEBUG -
    available detail levels are: OFF, ERROR, BASIC, PROTOCOL, NETWORK,
    EXTENDED
    INFO:superdesk:got lock task=elastic host=hostid:448fa2c1d237 pid:50
    INFO:superdesk:releasing lock task=elastic host=hostid:448fa2c1d237 pid:50
    Traceback (most recent call last):
      File "manage.py", line 18, in <module>
        app = get_app(init_elastic=True)
      File "/opt/superdesk/app.py", line 41, in get_app
        app = superdesk_app(config, init_elastic=init_elastic)
      File "/usr/local/lib/python3.4/dist-packages/superdesk/factory/app.py", line 126, in get_app
        app.data.init_elastic(app)
      File "/usr/local/lib/python3.4/dist-packages/superdesk/datalayer.py", line 49, in init_elastic
        self.elastic.init_index(app)
      File "/usr/local/lib/python3.4/dist-packages/eve_elastic/elastic.py", line 205, in init_index
        if not es.indices.exists(index):
      File "/usr/local/lib/python3.4/dist-packages/elasticsearch/client/utils.py", line 69, in _wrapped
        return func(*args, params=params, **kwargs)
      File "/usr/local/lib/python3.4/dist-packages/elasticsearch/client/indices.py", line 221, in exists
        raise ValueError("Empty value passed for a required argument 'index'.")
    ValueError: Empty value passed for a required argument 'index'.
    +++ new user has been created
    All services are started :3
    /usr/local/lib/python3.4/dist-packages/raven/conf/remote.py:67:
    UserWarning: Transport selection via DSN is deprecated. You should
    explicitly pass the transport class to Client() instead.
     
    warnings.warn('Transport selection via DSN is deprecated. You should
    explicitly pass the transport class to Client() instead.')
    Unable to init Sentry: Unsupported Sentry DSN scheme:  ()
    409: Conflict
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/dist-packages/eve/io/mongo/mongo.py", line 407, in insert
        return coll.insert_many(doc_or_docs, ordered=True).inserted_ids
      File "/usr/local/lib/python3.4/dist-packages/pymongo/collection.py", line 684, in insert_many
        blk.execute(self.write_concern.document)
      File "/usr/local/lib/python3.4/dist-packages/pymongo/bulk.py", line 470, in execute
        return self.execute_command(sock_info, generator, write_concern)
      File "/usr/local/lib/python3.4/dist-packages/pymongo/bulk.py", line 314, in execute_command
        raise BulkWriteError(full_result)
    pymongo.errors.BulkWriteError: batch op errors occurred

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/src/superdesk-core/superdesk/__init__.py", line 56, in __call__
        res = self.run(*args, **kwargs)
      File "/opt/superdesk-content-api/content_api/prepopulate/command.py", line 22, in run
        prepopulate_data(prepopulate_file)
      File "/opt/superdesk-content-api/content_api/prepopulate/service.py", line 54, in prepopulate_data
        ids = service.post([data])
      File "/tmp/src/superdesk-core/superdesk/services.py", line 110, in post
        ids = self.create(docs, **kwargs)
      File "/tmp/src/superdesk-core/superdesk/services.py", line 63, in create
        ids = self.backend.create(self.datasource, docs, **kwargs)
      File "/tmp/src/superdesk-core/superdesk/eve_backend.py", line 82, in create
        ids = self.create_in_mongo(endpoint_name, docs, **kwargs)
      File "/tmp/src/superdesk-core/superdesk/eve_backend.py", line 92, in create_in_mongo
        ids = backend.insert(endpoint_name, docs)
      File "/usr/local/lib/python3.4/dist-packages/eve/io/mongo/mongo.py", line 425, in insert
        error['index'], error['errmsg'])
      File "/usr/local/lib/python3.4/dist-packages/werkzeug/exceptions.py", line 646, in __call__
        raise self.mapping[code](*args, **kwargs)
    werkzeug.exceptions.Conflict: 409: Conflict
    +++ public api was prepopulated
    Any Idea on this issue ? How to solve this ?