Skip to content

Backend not starting #41

Closed
Closed

Description

@olegasdo

Hello
I've tried running project locally on Windows server (using cookiecutter), but backend is not starting.
docker logs shows:
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
: not foundad.sh: 2: /app/prestart.sh:

Activity

  1. olegasdo commented on Jun 16, 2019

    @olegasdo
    Author

    Sorry, was using docker logs
    "docker-compose logs backend" shows all the texts :)
    Attaching to test_project_backend_1
    backend_1 | Checking for script in /app/prestart.sh
    backend_1 | Running script /app/prestart.sh
    : not found | /start-reload.sh: 2: /app/prestart.sh:

  2. olegasdo commented on Jun 17, 2019

    @olegasdo
    Author

    there was an issue with backend/app/prestart.sh
    when executing directly in container it returned error "/usr/bin/env: ‘bash\r’: No such file or directory"
    changing line endings in vscode from "CRLF" to "LF" solved the issue. Project files might need update

  3. mastacheata commented on Aug 13, 2019

    @mastacheata

    I think that's an issue on cookiecutter and not on the files in this repository.

  4. tiangolo commented on Apr 18, 2020

    @tiangolo
    Member

    Indeed, it's probably an issue with Cookiecutter on Windows: cookiecutter/cookiecutter#1159

    But still, this should be fixed now with #149 🎉

    It fixes the line endings of shell scripts right after generation.

  5. github-actions commented on Apr 29, 2020

    @github-actions
    Contributor

    Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

  6. rohitkumar93 commented on Jul 6, 2020

    @rohitkumar93

    I changed my prestart.sh to "LF" using VScode too, and checked it as well.
    But I am getting the same error:
    `Checking for script in /app/prestart.sh

    Running script /app/prestart.sh

    /start-reload.sh: 22: .: Can't open /app/prestart.sh`

  7. pranjalsrv commented on Aug 13, 2020

    @pranjalsrv

    This is in the output of command docker-compose logs:

    backend_1  | There is no script /app/prestart.sh
    backend_1  | INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
    backend_1  | INFO:     Started reloader process [1] using statreload
    backend_1  | ERROR:    Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".
    

    This issue still persists on running on Windows.
    I tried changing the line endings using both VSCode and then manually by using the command: find . -type f -exec dos2unix {} \;, but the issue still exists.

  8. danielbf92 commented on Sep 21, 2020

    @danielbf92

    @pranjalsrv did you manage to solve the problem? Right now it sends me that error.

    Checking for script in /app/prestart.sh
    There is no script /app/prestart.sh
    INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
    INFO:     Started reloader process [1] using statreload
    ERROR:    Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".
    
  9. OddBlueDog commented on Sep 24, 2020

    @OddBlueDog

    Have the same issue on macOS I have put the line endings as LF. Any ideas?

  10. alemengana commented on Oct 17, 2020

    @alemengana

    there was an issue with backend/app/prestart.sh
    when executing directly in container it returned error "/usr/bin/env: ‘bash\r’: No such file or directory"
    changing line endings in vscode from "CRLF" to "LF" solved the issue. Project files might need update

    Thanks my friend !!!!!!

  11. badrelmazaz commented on Feb 9, 2022

    @badrelmazaz

    I changed the end of line sequence from CRLF to LF end it worked. I used visual studio code to change this

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