Skip to content

backend does not start #90

Closed
Closed

Description

@monatis

docker-compose up -d starts each one of the services, but backend service fails with the following:

docker-compose logs backend

Attaching to iaas_backend_1
�[36mbackend_1        |�[0m Checking for script in /app/prestart.sh
�[36mbackend_1        |�[0m There is no script /app/prestart.sh
�[36mbackend_1        |�[0m INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
�[36mbackend_1        |�[0m INFO: Started reloader process [1]
�[36mbackend_1        |�[0m ERROR: Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".
�[36mbackend_1        |�[0m INFO: Stopping reloader process [1]

I tried to get into the backend's bash to try debugging, but it also fails:

docker-compose exec backend bash

ERROR: No container found for backend_1

Activity

  1. monatis commented on Dec 21, 2019

    @monatis
    Author

    I commented and uncommented commands in docker-compose.dev.command.yml so that backend should be able to run indefinitely, and now could get into that container with docker-compose exec backend bash. The problem is that /app directory is empty in the container. Something prevents it from mounting volumes on the host machine. What might be the reason for that? A permission issue?

  2. monatis commented on Dec 24, 2019

    @monatis
    Author

    It seems that this error relates to WSL, not to any particular Docker image / container. I resolved it, closing the issue.

  3. daddydrac commented on Jan 2, 2020

    @daddydrac

    Problem persists:

    Request URL: http://localhost/docs
    Request Method: GET
    Status Code: 404 Not Found
    

    AND

    Request URL: http://localhost/api/v1/login/access-token
    Request Method: POST
    Status Code: 404 Not Found
    Remote Address: [::1]:80
    
  4. monatis commented on Jan 2, 2020

    @monatis
    Author

    Hi @joehoeller, in my case it was an issue related to Windows Subsystem for Linux. It seems that WSL doesn't properly handle volumes, so I moved my project to regular Windows and it works now. Please try to make sure that ./backend/app is properly mounted as a volume inside the container.

  5. daddydrac commented on Jan 2, 2020

    @daddydrac
  6. daddydrac commented on Jan 3, 2020

    @daddydrac
  7. robido commented on Feb 20, 2020

    @robido

    I struggled with this issue a while... tried to mount files in a seperate drive away from Windows C, tried running Docker in Windows mode, tried all the fixes offered here, none worked.

    What worked for me was to do the same as in this issue:
    #41

    I know the solution says its a cookie cutter issue, but the line endings are still wrong in the source of this repo. Should I do a PR?

  8. akashvibhute commented on Mar 6, 2020

    @akashvibhute

    I had the same issue on windows.
    Fixed with running find . -type f -exec dos2unix {} \; in git bash under the project root.
    https://stackoverflow.com/questions/7068179/convert-line-endings-for-whole-directory-tree-git
    This will convert all files to LF.

  9. tiangolo commented on Apr 7, 2020

    @tiangolo
    Member

    Thanks @monatis for reporting back and closing the issue 👍

    Thanks @akashv10 for the tip. If anyone else is still having problems, please create a new issue (unless you already did 😅 )

  10. danielbf92 commented on Jul 1, 2020

    @danielbf92

    Hello, I will need your help, I am having the problem you had from the beginning in api send me this:

    ERROR: Error loading ASGI app. Import string ": app" must be in format "<module>: <attribute>".

  11. danielbf92 commented on Jul 9, 2020

    @danielbf92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions