mordecai: Connection error

I confronted with a connection error in the updated Mordecai. I did not have this issue with the previous Mordecai. I will be thankful if you can help me to solve this error.

mordecai_1 | WARNING:elasticsearch:GET http://localhost:9200/_search [status:N/A request:0.000s]
mordecai_1 | Traceback (most recent call last):
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_urllib3.py", line 74, in perform_request
mordecai_1 |     response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 597, in urlopen
mordecai_1 |     _stacktrace=sys.exc_info()[2])
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/util/retry.py", line 222, in increment
mordecai_1 |     raise six.reraise(type(error), error, _stacktrace)
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 544, in urlopen
mordecai_1 |     body=body, headers=headers)
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 349, in _make_request
mordecai_1 |     conn.request(method, url, **httplib_request_kw)
mordecai_1 |   File "/usr/lib/python2.7/httplib.py", line 979, in request
mordecai_1 |     self._send_request(method, url, body, headers)
mordecai_1 |   File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
mordecai_1 |     self.endheaders(body)
mordecai_1 |   File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
mordecai_1 |     self._send_output(message_body)
mordecai_1 |   File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
mordecai_1 |     self.send(msg)
mordecai_1 |   File "/usr/lib/python2.7/httplib.py", line 797, in send
mordecai_1 |     self.connect()
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/connection.py", line 155, in connect
mordecai_1 |     conn = self._new_conn()
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/connection.py", line 134, in _new_conn
mordecai_1 |     (self.host, self.port), self.timeout, **extra_kw)
mordecai_1 |   File "/usr/local/lib/python2.7/dist-packages/urllib3/util/connection.py", line 88, in create_connection
mordecai_1 |     raise err
mordecai_1 | ProtocolError: ('Connection aborted.', error(111, 'Connection refused'))

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I had the same issue as the described here, and tried the adm1 branch -started with the instructions in the readme of that branch

everything loads and network now appears to route correctly, but the python api only returns an empty array for the exemplar queries – example below:

(not sure if this should be a new issue or included in this, since it’s against the adm1 branch)

I also don’t see any logfile output for the mordecai box (sudo docker logs -f ab51)

The expected elasticsearch logs are visible using the same pattern.

OS is ubuntu 16.04

root@linux-dev:~# docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                              NAMES
ab51321158a6        mordecai                    "python /src/app.py"     7 minutes ago       Up 7 minutes        0.0.0.0:5000->5000/tcp             grave_lovelace
09ddb8ae1d2e        openeventdata/es-geonames   "/bin/sh -c 'cd elast"   22 hours ago        Up 22 hours         0.0.0.0:9200->9200/tcp, 9300/tcp   elastic
root@linux-dev:~#
root@linux-dev:~# curl -XPOST -H "Content-Type: application/json"  --data '{"text":"(Reuters) - The Iraqi government claimed victory over Islamic State insurgents in Tikrit on Wednesday after a month-long battle for the city supported by Shiite militiamen and U.S.-led air strikes, saying that only small pockets of resistance remained. State television showed Prime Minister Haidar al-Abadi, accompanied by leaders of the army and police, the provincial governor and Shiite paramilitary leaders, parading through Tikrit and raising an Iraqi flag. The militants captured the city, about 140 km (90 miles) north of Baghdad, last June as they swept through most of Iraqs Sunni Muslim territories, swatting aside a demoralized and disorganized army that has now required an uneasy combination of Iranian and American support to get back on its feet."}' 'http://localhost:5000/places'
[]
root@linux-dev:~# 
root@linux-dev:~# curl -XGET http://localhost:9200/_search
{"took":30,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":9455860,"max_score":1.0,"hits":[{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ1e","_score":1.0,"_source":{"elevation": "", "name": "Tolsally\u014fng-t\u2019\u014fn\u014fl", "modification_date": "2014-01-01", "geonameid": "7584353", "feature_class": "R", "admin3_code": "", "admin2_code": "", "coordinates": "38.25169,128.09909", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "TNL", "timzeone": "Asia/Seoul", "dem": "928", "admin1_code": "06", "asciiname": "Tolsallyong-t'onol", "alternativenames": "Tolsallyong-t'onol,Tolsally\u014fng-t\u2019\u014fn\u014fl,dolsanlyeongteoneol,\ub3cc\uc0b0\ub839\ud130\ub110", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ1j","_score":1.0,"_source":{"elevation": "", "name": "S\u014frik-kol", "modification_date": "2014-01-01", "geonameid": "7584358", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.07845,128.1616", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "VAL", "timzeone": "Asia/Seoul", "dem": "359", "admin1_code": "06", "asciiname": "Sorik-kol", "alternativenames": "Sorik-kol,S\u014frik-kol,solisgol,\uc18c\ub9bf\uace8", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ1o","_score":1.0,"_source":{"elevation": "", "name": "Hapkang il-gyo", "modification_date": "2014-01-01", "geonameid": "7584363", "feature_class": "S", "admin3_code": "", "admin2_code": "", "coordinates": "38.09349,128.17968", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "BDG", "timzeone": "Asia/Seoul", "dem": "200", "admin1_code": "06", "asciiname": "Hapkang il-gyo", "alternativenames": "Hapkang il-gyo,habgang1gyo,\ud569\uac151\uad50", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ1t","_score":1.0,"_source":{"elevation": "", "name": "Nambukgyo", "modification_date": "2014-01-01", "geonameid": "7584368", "feature_class": "S", "admin3_code": "", "admin2_code": "", "coordinates": "38.06077,128.17031", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "BDG", "timzeone": "Asia/Seoul", "dem": "197", "admin1_code": "06", "asciiname": "Nambukgyo", "alternativenames": "Nambuk-kyo,Nambukgyo,nambuggyo,\ub0a8\ubd81\uad50", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ1y","_score":1.0,"_source":{"elevation": "494", "name": "Amisan", "modification_date": "2014-01-01", "geonameid": "7584373", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.04155,128.16385", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "MT", "timzeone": "Asia/Seoul", "dem": "235", "admin1_code": "06", "asciiname": "Amisan", "alternativenames": "Amisan,Kunch'ung-nyong,Kunch\u2019ung-ny\u014fng,amisan,gunchuglyeong,\uad70\ucd95\ub839,\uc544\ubbf8\uc0b0", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ13","_score":1.0,"_source":{"elevation": "", "name": "Kaeun-dong", "modification_date": "2014-01-01", "geonameid": "7584378", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.05107,128.12971", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "VAL", "timzeone": "Asia/Seoul", "dem": "227", "admin1_code": "06", "asciiname": "Kaeun-dong", "alternativenames": "Kaeun-dong,gaeundong,\uac1c\uc6b4\ub3d9", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ18","_score":1.0,"_source":{"elevation": "", "name": "Pomun-sa", "modification_date": "2014-01-01", "geonameid": "7584383", "feature_class": "S", "admin3_code": "", "admin2_code": "", "coordinates": "38.16296,128.21938", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "TMPL", "timzeone": "Asia/Seoul", "dem": "356", "admin1_code": "06", "asciiname": "Pomun-sa", "alternativenames": "Pomun-sa,bomunsa,\ubcf4\ubb38\uc0ac", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ2D","_score":1.0,"_source":{"elevation": "", "name": "Mokchang-gol", "modification_date": "2014-01-01", "geonameid": "7584524", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.2449,128.18576", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "VAL", "timzeone": "Asia/Seoul", "dem": "477", "admin1_code": "06", "asciiname": "Mokchang-gol", "alternativenames": "Mokchang-gol,mogjang-gol,\ubaa9\uc7a5\uace8", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ2I","_score":1.0,"_source":{"elevation": "", "name": "P\u2019iyang-gol", "modification_date": "2014-01-01", "geonameid": "7584529", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.21451,128.23218", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "VAL", "timzeone": "Asia/Seoul", "dem": "503", "admin1_code": "06", "asciiname": "P'iyang-gol", "alternativenames": "P'iyang-gol,P\u2019iyang-gol,piyang-gol,\ud53c\uc591\uace8", "admin4_code": "", "population": "0"}},{"_index":"geonames","_type":"geoname","_id":"AU4wG06OSPt6k9TaGZ2N","_score":1.0,"_source":{"elevation": "", "name": "Sanghwang-gol", "modification_date": "2014-01-01", "geonameid": "7584534", "feature_class": "T", "admin3_code": "", "admin2_code": "", "coordinates": "38.19486,128.30389", "cc2": "", "country_code3": "KOR", "country_code2": "KR", "feature_code": "VAL", "timzeone": "Asia/Seoul", "dem": "377", "admin1_code": "06", "asciiname": "Sanghwang-gol", "alternativenames": "Sanghwang-gol,sanghwang-gol,\uc0c1\ud669\uace8", "admin4_code": "", "population": "0"}}]}}
root@linux-dev:~# 
root@linux-dev:~# uname -a
Linux linux-dev 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@linux-dev:~# 
root@linux-dev:~# docker logs  09ddb8
[2016-07-25 03:14:19,132][INFO ][node                     ] [Gideon] version[1.6.0], pid[7], build[cdd3ac4/2015-06-09T13:36:34Z]
[2016-07-25 03:14:19,133][INFO ][node                     ] [Gideon] initializing ...
[2016-07-25 03:14:19,136][INFO ][plugins                  ] [Gideon] loaded [], sites []
[2016-07-25 03:14:19,170][INFO ][env                      ] [Gideon] using [1] data paths, mounts [[/ (none)]], net usable_space [167.1gb], net total_space [202.7gb], types [aufs]
[2016-07-25 03:14:21,175][INFO ][node                     ] [Gideon] initialized
[2016-07-25 03:14:21,175][INFO ][node                     ] [Gideon] starting ...
[2016-07-25 03:14:21,237][INFO ][transport                ] [Gideon] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/172.17.0.2:9300]}
[2016-07-25 03:14:21,249][INFO ][discovery                ] [Gideon] elasticsearch/4mKNsJwwRcmyOxmZb2cEPg
[2016-07-25 03:14:25,111][INFO ][cluster.service          ] [Gideon] new_master [Gideon][4mKNsJwwRcmyOxmZb2cEPg][09ddb8ae1d2e][inet[/172.17.0.2:9300]], reason: zen-disco-join (elected_as_master)
[2016-07-25 03:14:25,160][INFO ][http                     ] [Gideon] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/172.17.0.2:9200]}
[2016-07-25 03:14:25,160][INFO ][node                     ] [Gideon] started
[2016-07-25 03:14:25,175][INFO ][gateway                  ] [Gideon] recovered [1] indices into cluster_state
root@linux-dev:~# 
root@linux-dev:~# docker logs ab5132
root@linux-dev:~# 


$ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b9753dc6cd32 mordecaimaster3_mordecai “python /src/app.py” 47 hours ago Up 31 minutes 0.0.0.0:5000->5000/tcp mordecaimaster3_mordecai_1 188a73e53717 openeventdata/es-geonames “/bin/sh -c 'cd elast” 47 hours ago Up 31 minutes 9200/tcp, 9300/tcp mordecaimaster3_elastic_1

$ curl -XGET http://localhost:9200/_search {“took”:1,“timed_out”:false,“_shards”:{“total”:0,“successful”:0,“failed”:0},“hits”:{“total”:0,“max_score”:0.0,“hits”:[]}}