From the log output, it looks like you are using the Python driver. What versions of the Python driver, and Python itself, are installed in the Docker image?
The error message is a Fauna “unauthorized” error. Did you include a valid secret in your Docker image so that a client object can be created properly?
I’m not trying to access the Fauna Dev docker instance. Python script is definitely inside the container. In fact same docker file executed in heroku works fine.
If the identical Docker image runs fine in Heroku, but not locally, there must be something different about your local environment that is causing a problem.
Do you, by chance, override host lookups for db.fauna.com, via a hosts file or local DNS server?
Are you going through a proxy of VPN that might be modifying HTTP headers?
I also noticed the use of urllib3 in the output you shared. The Python driver just uses urllib. I have no idea if that makes any difference in this case, but I’d be curious to know if it does.
I’m not overriding hosts. And I’ve set up the DB as a classic so db.fauna.com shall work fine. In fact, I also access dropbox API from the same container it works fine.
The network is not going through a proxy or VPN etc.
Sometimes it is like this only, for no reason things will not work
There is always a reason. Whether we find that out depends on whether we give up before finding it.
Since you’ve demonstrated that a connection to Fauna has been made (because of the “unauthorized” response), it still seems most likely that the secret used in the query is either missing, or is invalid. The second most likely problem is that there is an ABAC role that is preventing the query from running.