question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to Run on EC2 instance

See original GitHub issue

I’m trying to run daphne on stand alone EC2 instance (without EB), but when I fire daphne -b localhost -p 8001 project.asgi:channel_layer, I’m not getting anything back from console. On my local system (Ubuntu 14.04) it works fine but with the same configuration on EC2 it does not show any response after firing command. I also checked Log file of Daphne but its empty altogether.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewgodwincommented, Feb 2, 2018

Closing due to inactivity.

0reactions
proofit404commented, Nov 28, 2017

PYTHONUNBUFFERED variable is forcing python to print output char by char as soon as it’s available. Instead of holding some buffer before flushing stdout.

But I have a better suggestion in mind. We should use hunter tracing tool for looking what’s going on under the hood.

Install it into your AWS instance into the virtual environment with Daphne.

pip install hunter

Run Daphne with tracing enabled.

PYTHONHUNTER="Q(module__regex='daphne.*') | Q(module__regex='asgi.*'), threading_support=True, actions=[CallPrinter]" daphne <your-channel-layer>

Please, attach hunter output to the pastebin-like service because output will be really huge. But it will help to understand what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot instance launch issues - AWS Documentation
Solution · Ensure that the device name is not used in the AMI that you selected. · Ensure that you are not using...
Read more >
Unable to Connect to your EC2 Instance after Launching
In this case the simplest fix is to terminate the instance and launch another one.
Read more >
Unable to launch EC2 instance - Stack Overflow
I got it working using the classic wizard to create the instance rather than the quick launch - it gave me an option...
Read more >
Fixing an AWS EC2 Instance Boot Up Issue - Home - Clairvoyant
Setup · Loin to the AWS Web Console · Stop the prod-instance instance · Detach the root EBS volume from the prod-instance ·...
Read more >
How to avoid 4 common errors in EC2 Instance Connect
Missing Amazon Machine Image. Users need to have in place an Amazon Machine Image (AMI) that supports EC2 Connect -- or must install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found