Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BookStack Connector not pulling data #3923

Open
PhilippRieth opened this issue Feb 6, 2025 · 1 comment
Open

BookStack Connector not pulling data #3923

PhilippRieth opened this issue Feb 6, 2025 · 1 comment

Comments

@PhilippRieth
Copy link

Hey,

I've been trying to set up the connector to our local BookStack server. The setup works fine, but it does not full any documents.

Image

While setting up the Connector and running the initial Index, I kept doing a tail -f /var/log/apache2/access.log to see if any actual HTTP requests hit the BookStack server and negative - there is no incoming request from the Onyx server.

Not sure if I'm missing something, I've followed the documentation.

Thanks heap in advance!

@PhilippRieth
Copy link
Author

There is a BookStack Demo instance on https://demo.bookstackapp.com/ but also can't get that one working.

Feel free to test with the following API creds (the BookStack Demo instance resets regular):

  • Token ID: KkeqhUTn0hvGhkPlMMzTtJ23T5kCqpdI
  • Token Secret: k597YMIlq3OY3ymS4pLeAEk1YG69ptg7

Here is a "normal" curl API request

❯ curl --header 'Authorization: Token KkeqhUTn0hvGhkPlMMzTtJ23T5kCqpdI:k597YMIlq3OY3ymS4pLeAEk1YG69ptg7' \
  'https://demo.bookstackapp.com/api/books?count=16&offset=0&sort=%2Bid&filter%5Bupdated_at%3Alte%5D=2025-02-06+08%3A35%3A44' -k | jq

{
  "data": [
    {
      "id": 1,
      "slug": "bookstack-demo-site",
      "name": "BookStack Demo Site",
      "description": "Details about this demo site and some pages to support showcasing what BookStack can do",
      "created_at": "2021-10-17T10:56:15.000000Z",
      "updated_at": "2021-10-17T10:56:15.000000Z",
      "owned_by": 3,
      "created_by": 3,
      "updated_by": 3,
      "cover": {
        "id": 6,
        "name": "books_image_800x600_4.jpg",
        "url": "https://demo.bookstackapp.com/uploads/images/cover_book/2021-10/books-image-800x600-4.jpg"
      }
    },
    {
      "id": 2,
      "slug": "admins-only-book",
      "name": "Admins Only Book",
      "description": "This book and its contents has permissions set upon it to only show for admins.",
      "created_at": "2021-10-17T11:41:04.000000Z",
      "updated_at": "2021-10-17T11:45:07.000000Z",
      "owned_by": 1,
      "created_by": 1,
      "updated_by": 1,
      "cover": {
        "id": 10,
        "name": "london_image_800x800_2.jpg",
        "url": "https://demo.bookstackapp.com/uploads/images/cover_book/2021-10/london-image-800x800-2.jpg"
      }
    }
  ]
}

Using the test instance and API keys from the same systems that host Onyx, I get this exception:

Traceback (most recent call last):
  File "/app/onyx/background/indexing/run_indexing.py", line 295, in _run_indexing
    for doc_batch in connector_runner.run():
  File "/app/onyx/connectors/connector_runner.py", line 50, in run
    for batch in self.doc_batch_generator:
  File "/app/onyx/connectors/bookstack/connector.py", line 200, in poll_source
    doc_batch, num_results = self._get_doc_batch(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/app/onyx/connectors/bookstack/connector.py", line 63, in _get_doc_batch
    batch = bookstack_client.get(endpoint, params=params).get("data", [])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/onyx/connectors/bookstack/client.py", line 41, in get
    raise BookStackClientRequestFailedError(response.status_code, error)
onyx.connectors.bookstack.client.BookStackClientRequestFailedError: BookStack Client request failed with status 403: Forbidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant