Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Django runserver not working in build machine

I am attempting to run a Django application using the `runserver` management command in a pipelines build machine. I am doing this so that I can perform some testing that requires a running django instance.


When I run the runserver command and tell it to run on `` it does not show the normal startup information, and if I run it with nohup and then try to curl `` on the build machine I get the error `0curl: (7) Failed to connect to port 8000: Connection refused`.

I can successfully get the django app running with the same commands in a local version of the docker image the build machine uses, so it seems to be something specific to running on the build machine. I have also tried switching up the port it is running on to see if that resolves it but to no avail.

My pipeline looks like:

- step:
name: Run UI tests
- node
- pip
- apt-get update && apt-get install -y firefox chromium-browser libcurl4-openssl-dev libssl-dev
- pip3 install virtualenv
- virtualenv -p python3 venv
- . venv/bin/activate
- pip install -r app/test-requirements.txt
- export TZ='Pacific/Auckland'
- nvm install
- npm install
- nohup npm run start &
- python app/ migrate --verbosity=3 --settings=app.settings.test-ui
- python app/ createcachetable --verbosity=3 --settings=app.settings.test-ui
- nohup python app/ runserver --verbosity=3 --settings=app.settings.test-ui & # this step is where I have an issue.
- npm run test-ui -- all -r spec,xunit:./app/test-reports/testcafe.xml
- postgres
- redis

Any thoughts? The other management commands like `migrate` and `createcachetable` work fine so it seems to be specific to `runserver`.



1 answer

@Richard_Campen thank you for the question.

Can you share more output from runserver since you run it with verbosity 3, in the case without nohup using?

Perhaps, this way we will be able to help



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across Jira Cloud instance.   📢 Get y...

61 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you