Error: Function not implemented when running dbt in Docker with python flask

Hi Everyone,

Am trying to run my dbt code in a Docker container environment by creating a “python flask” application to pass the dbt execution commands as POST API parameters. When I try to do that. Image is getting built fine. And for a sample test when I pass dbt --version it is completing successfully. But if i execute any other dbt command like debug , test , run. Am getting Function not implemented error.

Below is the output sample:

“Command_Result”: “Success”,
Running with dbt=0.16.1
dbt version: 0.16.1
python version: 3.8.2
python path: /usr/local/bin/python
os info: Linux-4.4.0-x86_64-with-glibc2.2.5
Using profiles.yml file at /dbt/profiles.yml
Using dbt_project.yml file at /dbt/dbt_project.yml

profiles.yml file [OK found and valid]
dbt_project.yml file [OK found and valid]

Required dependencies: - git [OK found]
method: service-account
database: <database_name>
schema: <schema_name>
location: US
priority: interactive
timeout_seconds: 300
Encountered an error:
[Errno 38] Function not implemented


Please help!!

Thanks in advance!


There’s a few things that can cause this, but that message came from docker - something dbt is doing is not available on your docker service. You can examine the log file dbt writes to logs/dbt.log and look for a stack trace to see what exactly it’s upset about, but that looks like it’s happening when dbt tries to connect to your data warehouse. Given the location of that error, maybe something about threading.Lock objects isn’t supported?

Unfortunately, various hosted docker solutions (and various docker-providing Linux distros!) have their own silly and obscure bugs around returning ENOSYS (the underlying message here) in various places, so it’s hard to say exactly what is going on or how you could fix it. A sampling from a quick search:

And I know Ubuntu in the 14.04 era used to return ENOSYS all the time for filesystem reasons. I’m sure that’s improved, but older Linux distributions/docker versions are more likely to ENOSYS.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.