Skip to content

Fresh db cannot be configured #47

@tilsche

Description

@tilsche

Stuff like this

[2023-05-11 11:23:45 +0000] [7] [ERROR] Error handling request
Traceback (most recent call last):
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 167, in wrapper
    return await func(endpoint, *args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/remote.py", line 363, in _put
    _, json = await self._database._remote._put(self.endpoint, data, params)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/remote.py", line 96, in _put
    return await self._request("PUT", path, json=data, params=params)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/remote.py", line 144, in _request
    resp.raise_for_status()
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 409, message='Conflict', url=URL('https://couchdb.metricq.zih.tu-dresden.de/config/db-barnard')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/api/views/source.py", line 401, in save_source_raw_config
    await configurator.set_config(source_id, request_data)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/configurator.py", line 285, in set_config
    await config.save()
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/document.py", line 138, in save
    data = await self._put(self._data)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 167, in wrapper
    return await func(endpoint, *args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 167, in wrapper
    return await func(endpoint, *args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 167, in wrapper
    return await func(endpoint, *args, **kwargs)
  [Previous line repeated 1 more time]
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 170, in wrapper
    raise_for_endpoint(endpoint, message, exception, exception_type)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocouch/exception.py", line 154, in raise_for_endpoint
    raise exception_type(message.format(**message_input)) from exception
aiocouch.exception.ConflictError: 'Document with the specified ID (db-barnard) already exists or specified revision None is not latest for target document'
[2023-05-11 11:24:45 +0000] [7] [ERROR] Error handling request
Traceback (most recent call last):
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/api/views/client.py", line 61, in get_clients_dependencies
    return json_response(data=await configurator.fetch_dependency_wheel())
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/configurator.py", line 63, in wrapped
    result = await func(*args)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/configurator.py", line 191, in fetch_dependency_wheel
    for consumer in await self.fetch_consumers(metric):
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/configurator.py", line 147, in fetch_consumers
    bindings = await self.rabbitmq_bindings()
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocache/decorators.py", line 103, in wrapper
    return await self.decorator(f, *args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocache/decorators.py", line 118, in decorator
    result = await f(*args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/configurator.py", line 128, in rabbitmq_bindings
    return await rabbitmq.fetch_bindings(
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/rabbitmq.py", line 101, in fetch_bindings
    await bindings._fetch()
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/rabbitmq.py", line 88, in _fetch
    consumer = await self._guess_token_from_queue_name(
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocache/decorators.py", line 103, in wrapper
    return await self.decorator(f, *args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/aiocache/decorators.py", line 118, in decorator
    result = await f(*args, **kwargs)
  File "/home/metricq/.local/lib/python3.10/site-packages/metricq_wizard_backend/metricq/rabbitmq.py", line 54, in _guess_token_from_queue_name
    assert queue.endswith("-data")
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions