You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/23 10:27:48 UTC

[GitHub] [airflow] brunojus opened a new issue #15502: Error Airflow in Dockerfile is not creating the database

brunojus opened a new issue #15502:
URL: https://github.com/apache/airflow/issues/15502


   I am getting the error below when I am running the Airflow with docker-compose in a Macos/Windows environment. 
   
       > webserver_1  | [2021-04-23 07:30:27,971] {abstract.py:229} ERROR -
       > Failed to add operation for GET /api/v1/connections webserver_1  |
       > Traceback (most recent call last): webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/apis/abstract.py",
       > line 209, in add_paths webserver_1  |     self.add_operation(path,
       > method) webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/apis/abstract.py",
       > line 173, in add_operation webserver_1  |    
       > pass_context_arg_name=self.pass_context_arg_name webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/operations/__init__.py",
       > line 8, in make_operation webserver_1  |     return
       > spec.operation_cls.from_spec(spec, *args, **kwargs) webserver_1  |  
       > File
       > "/usr/local/lib/python3.7/site-packages/connexion/operations/openapi.py",
       > line 138, in from_spec webserver_1  |     **kwargs webserver_1  |  
       > File
       > "/usr/local/lib/python3.7/site-packages/connexion/operations/openapi.py",
       > line 89, in __init__ webserver_1  |    
       > pass_context_arg_name=pass_context_arg_name webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/operations/abstract.py",
       > line 96, in __init__ webserver_1  |     self._resolution =
       > resolver.resolve(self) webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/resolver.py", line
       > 40, in resolve webserver_1  |     return
       > Resolution(self.resolve_function_from_operation_id(operation_id),
       > operation_id) webserver_1  |   File
       > "/usr/local/lib/python3.7/site-packages/connexion/resolver.py", line
       > 66, in resolve_function_from_operation_id webserver_1  |     raise
       > ResolverError(str(e), sys.exc_info()) webserver_1  |
       > connexion.exceptions.ResolverError: <ResolverError: columns>
   
   [1](https://pastebin.com/hSpcthUS)
   
   
   **Apache Airflow version**: 2.0.1
   
   
   
   **Environment**:
   
   - **OS** (e.g. from /etc/os-release): Windows/Macos
   - **Install tools**: Docker
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769


   Closing this as invalid. There is no information about how you are running this and what docker-compose you use. The Dockerfile is not supposed to create a database, docker image is only there to run the software.
   
   If you have an external DB, you need to create airflow DB using some kind of init container. With Docker-compose you could create an init-service that could do it. There are examples in https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html where you can see an example docker compose that uses external database and creates it  for "production" settings where database is external and it initializes the DB and creates the admin user.
   
   If you just want to use "sqlite" embeded database for a "really quick start" (not production - it's not supposed to be used in production)  in the docker image you have the environment variable _AIRFLOW_DB_UPGRADE that you can use to create/upgrade the schema as described here: https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db (also next chapters show you how to create the user) but this is really for "local development" purpose and it should never be used in production, that's why all those variables start with _ because they are dev-only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-825563143


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769


   Closing this as invalid. There is no information about how you are running this and what docker-compose you use. The Dockerfile is not supposed to create a database, docker image is only there to run the software.
   
   If you have an external DB, you need to create airflow DB using some kind of init container. With Docker-compose you could create an init-service that could do it. There are examples in https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html where you can see an example docker compose that uses external database and creates it  for "production" settings where database is external,
   
   If you just want to use "sqlite" embeded database for a "really quick start" (not production - it's not supposed to be in production)  in the docker image you have the environment variable _AIRFLOW_DB_UPGRADE that you can use to create/upgrade the schema as described here: https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db but this is really for "local development" purpose.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] marcosmarxm commented on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
marcosmarxm commented on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826086313


   Hi @brunojus installing Airflow in MacOS/Windows sometimes can be more difficult. There are some issues/contributions to help users on that. Can you look #14231  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] marcosmarxm commented on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
marcosmarxm commented on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826086313


   Hi @brunojus installing Airflow in MacOS/Windows sometimes can be more difficult. There are some issues/contributions to help users on that. Can you look #14231  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #15502:
URL: https://github.com/apache/airflow/issues/15502


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769


   Closing this as invalid. There is no information about how you are running this and what docker-compose you use. The Dockerfile is not supposed to create a database, docker image is only there to run the software.
   
   If you have an external DB, you need to create airflow DB using some kind of init container. With Docker-compose you could create an init-service that could do it. There are examples in https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html where you can see an example docker compose that uses external database and creates it  for "production" settings where database is external,
   
   If you just want to use "sqlite" embeded database for a "really quick start" (not production - it's not supposed to be in production)  in the docker image you have the environment variable _AIRFLOW_DB_UPGRADE that you can use to create/upgrade the schema as described here: https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db but this is really for "local development" purpose.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769


   Closing this as invalid. There is no information about how you are running this and what docker-compose you use. The Dockerfile is not supposed to create a database, docker image is only there to run the software.
   
   If you have an external DB, you need to create airflow DB using some kind of init container. With Docker-compose you could create an init-service that could do it. There are examples in https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html where you can see an example docker compose that uses external database and creates it  for "production" settings where database is external and it initializes the DB and creates the admin user.
   
   If you just want to use "sqlite" embeded database for a "really quick start" (not production - it's not supposed to be used in production)  in the docker image you have the environment variable _AIRFLOW_DB_UPGRADE that you can use to create/upgrade the schema as described here: https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db but this is really for "local development" purpose.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #15502: Error Airflow in Dockerfile is not creating the database

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #15502:
URL: https://github.com/apache/airflow/issues/15502


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org