Hi Team, I'm trying to run a GitHub connector inside a Docker container to ingest data into Elasticsearch (self-managed). The Docker container starts and connects to Elasticsearch successfully, but during the validation step, I keep getting a 406 Not Acceptable error from the GitHub API.
Hey @zeeshan_mohammed can you share what version of connectors are you using? The version should be part of the docker image name.
The error seems to be related to malformed (or even empty?) base URL to access github api. Are you syncing data from enterprise github server? Otherwise, if you select github cloud it should default to public github api.
Below is the traceback
[FMWK][15:59:46][ERROR] [Connector id: 8FtQp5YBd8qPwshEAMrV, index name: elastic-github-connector-cm] 406, message='Not Acceptable', url=URL('https:///login?return_to=https:///api')
Traceback (most recent call last):
File "/app/connectors/services/job_scheduling.py", line 96, in _schedule
await data_source.validate_config()
File "/app/connectors/sources/github.py", line 1466, in validate_config
await self._remote_validation()
File "/app/connectors/sources/github.py", line 1428, in _remote_validation
await self._validate_personal_access_token_scopes()
File "/app/connectors/sources/github.py", line 1435, in _validate_personal_access_token_scopes
scopes = await self.github_client.get_personal_access_token_scopes()
File "/app/connectors/sources/github.py", line 870, in get_personal_access_token_scopes
_, headers, _ = await self._get_client._request(
File "/app/lib/python3.10/site-packages/gidgethub/aiohttp.py", line 19, in _request
async with self._session.request(
File "/app/lib/python3.10/site-packages/aiohttp/client.py", line 1197, in aenter
self._resp = await self._coro
File "/app/lib/python3.10/site-packages/aiohttp/client.py", line 696, in _request
resp.raise_for_status()
File "/app/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1070, in raise_for_status
raise ClientResponseError:
aiohttp.client_exceptions.ClientResponseError: 406, message='Not Acceptable', url=URL('https:///login?return_to=https:///api')
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.