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

unable to login to doccano #152

Open
AbinJilson opened this issue Jul 7, 2023 · 9 comments
Open

unable to login to doccano #152

AbinJilson opened this issue Jul 7, 2023 · 9 comments

Comments

@AbinJilson
Copy link

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /v1/auth/login/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff268905b80>: Failed to establish a new connection: [Errno 111] Connection refused'))
[2023-07-07, 06:31:17 UTC] {taskinstance.py:1345} INFO - Marking task as UP_FOR_RETRY. dag_id=order-letter_NER, task_id=manual_review_task, execution_date=20230707T062658, start_date=20230707T063112, end_date=20230707T063117
[2023-07-07, 06:31:18 UTC] {standard_task_runner.py:104} ERROR - Failed to execute job 338 for task manual_review_task (HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /v1/auth/login/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff268905b80>: Failed to establish a new connection: [Errno 111] Connection refused')); 455)

I'm using doccano-client==1.2.7

@Hironsan
Copy link
Member

Hironsan commented Jul 7, 2023

Please paste your code.

@AbinJilson
Copy link
Author

client = DoccanoClient(base_url='http://localhost:8000/', verify=None) client.login(username='admin', password='password')

@Hironsan
Copy link
Member

Hironsan commented Jul 7, 2023

Can you access http://localhost:8000/v1/projects on your browser?

@AbinJilson
Copy link
Author

AbinJilson commented Jul 7, 2023

yess..I'm getting the following page
image

@AbinJilson
Copy link
Author

AbinJilson commented Jul 12, 2023

I was trying to access doccano from Airflow container. Both the containers are running fine. Should I make some changes in the airflow to get the access?

@Hironsan
Copy link
Member

What does Both mean? I interpreted the following, is this correct?

  • doccano run in a container.
  • you are using doccano-client in another container.

@AbinJilson
Copy link
Author

Yes it's correct. Doccano run's in a container and I'm using doccano-client in an another container(Airflow).

@Hironsan
Copy link
Member

Can your doccano-client container access to doccano container? You may need to set up container communication.

@biokraft
Copy link

biokraft commented May 29, 2024

@Hironsan Bumping this. I just had to redeploy my doccano instance and now suddenly none of my scheduled import & export are working anymore as I simply cannot authorize with the api via doccano client.
Im just doing the standard login which has worked previously and get the following error:

File "/app/metaflow/utils.py", line 116, in get_doccano_client
    doccano_client.login(username=config["doccano"]["username"], password=config["doccano"]["password"])
  File "/usr/local/lib/python3.9/site-packages/doccano_client/client.py", line 120, in login
    self._base_repository.login(username, password)
  File "/usr/local/lib/python3.9/site-packages/doccano_client/repositories/base.py", line 85, in login
    verbose_raise_for_status(response)
  File "/usr/local/lib/python3.9/site-packages/doccano_client/repositories/base.py", line 26, in verbose_raise_for_status
    raise DoccanoAPIError(str(err), err.response)
doccano_client.exceptions.DoccanoAPIError: 400 Client Error: Bad Request for url: https://mydoccanourl.de/v1/auth/login/

I tried redeploying my doccano instance with different versions, including: nightly, latest, 1.8.4 and 1.8.3
All of them arent working. Nightly and latest actually completely crash on me

I am using doccano-client==1.2.8

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

3 participants