Error in 'blog' demo --- can't open blog.py

Open
#2,870 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, docker-compose, python

Research direction

Start in demos/blog and reproduce the failure with docker-compose up, then compare the iptables error with the linked Moby issue. Determine whether the failure belongs to the demo configuration or the host Docker/iptables setup; done means the cause and a reproducible project-level fix are established, or the issue is documented as environmental.

Written by the indexing model from the issue text.

Description

docs

I'm unable to build the 'blog' demo application using docker-compose up. I'm definitely not a docker expert, so it could just be an easy fix.

I try to run docker-compose up in the demos/blog directory, but the build fails because of an unknown option for the iptables command during postgres configuration ( docker0: iptables v1.8.4 (legacy): unknown option "--\dport" ).

Below is the full output from docker-compose up:

[robertc@Z38S blog]$ docker-compose up                                                                                                                                                          
Starting blog_postgres_1 ...                                                                                                                                                                    
WARNING: Host is already in use by another container                                                                                                                                            
                                                                                                                                                                                                
ERROR: for blog_postgres_1  Cannot start service postgres: driver failed programming external connectivity on endpoint blog_postgres_1 (7fc11caf4be5a390d6ccdced928c5ea11d1768090d32b3b0709d41e\
d571e00bd):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 32797 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables v1.8.4 (legacy): unknown option "--\
dport"                                                                                                                                                                                          
Try `iptables -h' or 'iptables --help' for more information.                                                                                                                                    
 (exit status 2))                                                                                                                                                                               
                                                                                                                                                                                                
ERROR: for postgres  Cannot start service postgres: driver failed programming external connectivity on endpoint blog_postgres_1 (7fc11caf4be5a390d6ccdced928c5ea11d1768090d32b3b0709d41ed571e00\
bd):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 32797 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables v1.8.4 (legacy): unknown option "--dport"  
Try `iptables -h' or 'iptables --help' for more information.                                                                                                                                    
 (exit status 2))                                                                                                                                                                               
ERROR: Encountered errors while bringing up the project.

Edit: This could be related to this issue. I'll check to see if the suggested fix (symlink iptables-nft) works later today.

Dominant language
Python
Stars
22.2k
Forks
5.6k
Avg merge
3h 42m
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tornadoweb/tornado

All issues in tornadoweb/tornado

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.