Back

Error when listing document (HTTPConnectionPool)

  • 0
  • Self Hosted
  • Functions
CodingXeer01
29 Jun, 2024, 16:19

I'm getting this error in the function

TypeScript
HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /v1//databases/63291eba/collections/663876a/documents?queries%5B0%5D=%7B%22method%22%3A%22equal%22%2C%22attribute%22%3A%22username%22%2C%22values%22%3A%5B%22test%22%5D%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0a6a382280>: Failed to establish a new connection: [Errno 111] Connection refused'))
TypeScript
        try:
            user = database.list_documents(
                database_id, collection_id, [
                    Query.equal(
                        "username", username,)
                ])
        except Exception as e:
            context.log(f"Inside exception - 1\n{e}")
            return context.res.send("False")
TL;DR
Developers are encountering an error when trying to list documents due to connection issues. The logs show warnings related to connection refusal. The problem seems to stem from the HTTPConnectionPool. One possible solution is to check the specified host and port.
CodingXeer01
29 Jun, 2024, 16:42

logs:

TypeScript
2024-06-29 22:11:02 
2024-06-29 22:11:02 Warning: fsockopen(): Unable to connect to 668067:3000 (Connection refused) in /usr/local/src/Executor/Validator/TCP.php on line 45
2024-06-29 22:11:02 
2024-06-29 22:11:02 Warning: fsockopen(): Unable to connect to 6680391ce0767:3000 (Connection refused) in /usr/local/src/Executor/Validator/TCP.php on line 45
2024-06-29 22:11:03 
2024-06-29 22:11:03 Warning: fsockopen(): Unable to connect to 6680391ce0767:3000 (Connection refused) in /usr/local/src/Executor/Validator/TCP.php on line 45```
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more