mitmproxy / docker-releases

🗃️ This repository has been integrated into mitmproxy/mitmproxy.
52 stars 26 forks source link

Crash on Startup #3

Closed skysteve closed 8 years ago

skysteve commented 8 years ago

I assume this is a lack of understanding from my end however I can't work out what I'm not doing/doing wrong.

I built and ran a container without any attached volume, that worked fine and if I hit http://mitm.it/ I get the install cert page which is fine.

I then tried attaching a volume without anything in. This created some certificates and then crashes. The stack trace is below with a screenshot of what was created and my docker-compose file.

I've also tried this with having common.conf mitmdump.conf and mitmproxy.conf files in the attached volume but that doesn't seem to make things better.

Any help would be much appreciated (This might be a bug in mitmproxy itself, my knowledge of mitmproxy is currently rather limited).

Cheers Steve

$ docker-compose build ; docker-compose up
mitmproxy uses an image, skipping
Starting c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1
Attaching to c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | Traceback (most recent call last):
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/mitmproxy/console/__init__.py", line 512, in run
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     self.loop.run()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 278, in run
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     self._run()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 376, in _run
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     self.event_loop.run()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 682, in run
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     self._loop()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 719, in _loop
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     self._watch_files[fd]()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 393, in <lambda>
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     event_loop, callback, self.get_available_raw_input())
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 427, in get_available_raw_input
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     codes = self._get_gpm_codes() + self._get_keyboard_codes()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 501, in _get_keyboard_codes
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     code = self._getch_nodelay()
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 635, in _getch_nodelay
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     return self._getch(0)
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |   File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 545, in _getch
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |     return ord(os.read(self._term_input_file.fileno(), 1))
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | TypeError: ord() expected a character, but string of length 0 found
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | 
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | mitmproxy has crashed!
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | Please lodge a bug report at:
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 |      https://github.com/mitmproxy/mitmproxy
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 | Shutting down...
c5a7996c5cd3_c5a7996c5cd3_clientscripttester_mitmproxy_1 exited with code 0

screen shot 2016-06-21 at 09 43 00

mhils commented 8 years ago

Thanks for the report! This looks like a duplicate of mitmproxy/mitmproxy#1157?

skysteve commented 8 years ago

Thanks :) don't think that's 100% related but did help me figure out what was wrong.

If I set tty: true in the docker-compose file everything seems to work. I'll close this