Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

livereload in docker container not working

オープン
#174 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, python
領域
backend, devops

調査の方向性

Start by reproducing the documented livereload --host 0.0.0.0 -p 8000 docs/_build/html/ command inside Docker with the reported Tornado versions. Review the Tornado traceback and websocket headers, then compare behavior across Tornado versions. Done means the container serves the Sphinx page and live reload without the HTTPOutputError.

索引モデルが issue の本文から書いたものです。

説明

Hello,

I have a livereload running in a docker container hosting some sphinx documentation that I built. I am trying to use it to to navigate the docs while I edit them outside of the container. I attempt to start livereload like so

 livereload --host 0.0.0.0 -p 8000 docs/_build/html/

From inside the container, and that works fine. However, when I surf to the page to view the docs, I get the following error.

[I 180703 22:16:15 server:292] Serving on http://0.0.0.0:8000
[I 180703 22:16:15 handlers:59] Start watching changes
[I 180703 22:16:15 handlers:61] Start detecting changes
[E 180703 22:16:17 web:1621] Uncaught exception GET /userguide/about-as3.html (172.17.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/userguide/about-as3.html', version='HTTP/1.1', remote_ip='172.17.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1543, in _execute
        result = yield result
      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1099, in run
        value = future.result()
      File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 260, in result
        raise_exc_info(self._exc_info)
      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 315, in wrapper
        yielded = next(result)
      File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2472, in get
        yield self.flush()
      File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 973, in flush
        start_line, self._headers, chunk, callback=callback)
      File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 403, in write_headers
        data += self._format_chunk(chunk)
      File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 415, in _format_chunk
        "Tried to write more data than Content-Length")
    HTTPOutputError: Tried to write more data than Content-Length
[E 180703 22:16:17 web:1042] Cannot send error response after headers written

It appears the -148 bytes are being detected by tornado...for reasons unknown...but the headers are the following

 0.0s write_headers: k='Connection', v='Upgrade'
 0.0s write_headers: k='Date', v='Tue, 03 Jul 2018 21:53:40 GMT'
 0.0s write_headers: k='Sec-Websocket-Accept', v='rhbSxvq2M8ltJL2dQgWpQ+zNv2o='
 0.0s write_headers: k='Server', v='TornadoServer/5.0.2'
 0.0s write_headers: k='Upgrade', v='websocket'

If I downgrade tornado to any version < 4, the error goes away.

I'm scratching my head as to what the problem might be though, because I see release notes for livereload that say its fixing stuff in tornado 4.5+

Any ideas?

Thanks!

主要言語
Python
スター
1.1k
フォーク
148
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lepture/python-livereload のほかの issue

lepture/python-livereload の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。