openresty / openresty.org

Code and data for the openresty.org site
https://openresty.org
1.26k stars 289 forks source link

bad HTML content in file html/en/debugging.html #24

Closed mingjunyang closed 7 years ago

mingjunyang commented 8 years ago

I try make gendata 47c89a12b0bd33c09d0ab54de256eb7a89842aa4


 make gendata
.....

pandoc --from markdown_github-hard_line_breaks --to plain cn/memc-nginx-module.md --output text/cn/memc-nginx-module.txt
mkdir -p text/en text/cn
pandoc --from markdown_github-hard_line_breaks --to plain cn/yichun-zhang.md --output text/cn/yichun-zhang.txt
./util/gen-data.pl en
bad HTML content in file html/en/debugging.html at ./util/gen-data.pl line 47.
Makefile:74: recipe for target 'posts-en.tsv' failed
make: *** [posts-en.tsv] Error 255

more infor

NAME="openSUSE Leap"
VERSION="42.1"
VERSION_ID="42.1"
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"

pandoc --version
pandoc 1.15.0.6
Compiled with texmath 0.8.3, highlighting-kate 0.6.
Syntax highlighting is supported for the following languages:
    abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
    changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
    curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
    eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go,
    haskell, haxe, html, idris, ini, isocpp, java, javadoc, javascript, json,
    jsp, julia, kotlin, latex, lex, lilypond, literatecurry, literatehaskell,
    lua, m4, makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
    metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
    objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike,
    postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml,
    roff, rpmspec, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
    sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml, zsh
Default user data directory: /home/mingjunyang/.pandoc
Copyright (C) 2006-2015 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
agentzh commented 8 years ago

@mingjunyang Please provide the raw content in your html/en/debugging.html file.

mingjunyang commented 8 years ago
<p>&lt;!--- @title Debugging @creator Yichun Zhang @created 2013-10-06 18:12 GMT @modifier Yichun Zhang @modifier_link yichun-zhang @modified 2013-10-06 18:24 GMT @changes 10 ---&gt;</p>
<p>You should always check out <a href="nginx.html">Nginx</a>'s error log file (specified by the <code>error_log</code> directive in <code>nginx.conf</code>) for any errors or warnings.</p>
<p>If you prefer redirecting common Lua errors to the HTTP response body during Lua development, you can put a Lua <a href="http://www.lua.org/manual/5.1/manual.html#pdf-pcall">pcall</a> call on the top level of your Lua code to catch and redirect any Lua exceptions. But keep in mind, not all errors can be captured this way because you could have errors when sending out the response, then it is impossible to put such errors into the response body.</p>
<p>During Lua code development, you can disable the <a href="http://wiki.nginx.org/HttpLuaModule#lua_code_cache">Lua code cache</a> temporarily so that you do not have to reload the <a href="nginx.html">Nginx</a> server for your (external) Lua code changes to take effect.</p>
<p>Also, it is strongly recommended to follow the test-driven development workflow. For example, <a href="lua-resty-redis-library.html">Lua Resty Redis Library</a> uses the <a href="http://search.cpan.org/perldoc?Test%3A%3ANginx">Test::Nginx</a> test scaffold to drive its (declarative) <a href="https://github.com/agentzh/lua-resty-redis/tree/master/t/">test suite</a>.</p>
<p>If you are on Linux, there are quite many real-time analysing tools based on <a href="http://sourceware.org/systemtap/">systemtap</a>, which can be used to inspect a running <a href="nginx.html">Nginx</a> worker process in various ways:</p>
<pre><code>https://github.com/agentzh/nginx-systemtap-toolkit</code></pre>
<p>You can find additional tools in the stap++ project:</p>
<pre><code>https://github.com/agentzh/stapxx</code></pre>
<p>These tools can not only debug functional problems, but also profile online servers to find performance bottlenecks.</p>
agentzh commented 8 years ago

@mingjunyang Seems like a pandoc issue. Will you upgrade pandoc to 1.16.x? Mine is 1.16.0.2.

agentzh commented 8 years ago

@mingjunyang Basically, your pandoc does not handle HTML comments (<!--...-->) correctly inlined in the Markdown source.

mingjunyang commented 8 years ago

let me try update.

agentzh commented 8 years ago

@mingjunyang Interestingly, pandoc 1.13.2 works correctly in my Fedora Linux. Not sure if it is a regression in pandoc 1.15.x :)

agentzh commented 8 years ago

@mingjunyang I've just committed a fix to the git master branch to work around this problem for you. Will you run git pull on your side and try make gendata again? Thanks!

mingjunyang commented 8 years ago

@agentzh It's work. It's ok! thx!

lyqscmy commented 7 years ago

I'm new to nginx and OpenRestry. It seems like not a pandoc issue.

How about make a container for newcomer to run it quickly?

fc25.x86_64 pandoc 1.17.0.3

$ make gendata ./util/gen-data.pl en en/lua-cjson-library: key @modifier not found. parsing git meta... en/lua-cjson-library: key @modified not found. parsing git meta... en/lua-cjson-library: key @changes not found. parsing git meta... en/changelog-1009015: key @modifier not found. parsing git meta... en/changelog-1009015: key @modified not found. parsing git meta... en/changelog-1009015: key @changes not found. parsing git meta... en/redis2-nginx-module: key @changes not found. parsing git meta... en/installation: key @modifier not found. parsing git meta... en/installation: key @modified not found. parsing git meta... en/installation: key @changes not found. parsing git meta... en/components: key @modifier not found. parsing git meta... en/components: key @modified not found. parsing git meta... en/components: key @changes not found. parsing git meta... en/community: key @modifier not found. parsing git meta... en/community: key @modified not found. parsing git meta... en/community: key @changes not found. parsing git meta... en/donors: key @modifier not found. parsing git meta... en/donors: key @modified not found. parsing git meta... en/donors: key @changes not found. parsing git meta... en/changelog-1011002: key @creator not found. parsing git meta... en/changelog-1011002: key @created not found. parsing git meta... en/changelog-1011002: key @modifier not found. parsing git meta... en/changelog-1011002: key @modified not found. parsing git meta... en/changelog-1011002: key @changes not found. parsing git meta... en/lua-nginx-module: key @modifier not found. parsing git meta... en/lua-nginx-module: key @modified not found. parsing git meta... en/lua-nginx-module: key @changes not found. parsing git meta... en/samples: key @modifier not found. parsing git meta... en/samples: key @modified not found. parsing git meta... en/samples: key @changes not found. parsing git meta... en/rpm-packages: key @creator not found. parsing git meta... en/rpm-packages: key @created not found. parsing git meta... en/rpm-packages: key @modifier not found. parsing git meta... en/rpm-packages: key @modified not found. parsing git meta... en/rpm-packages: key @changes not found. parsing git meta... en/openresty: key @modifier not found. parsing git meta... en/openresty: key @modified not found. parsing git meta... en/openresty: key @changes not found. parsing git meta... en/ebooks: key @modifier not found. parsing git meta... en/ebooks: key @modified not found. parsing git meta... en/ebooks: key @changes not found. parsing git meta... en/changes: key @modifier not found. parsing git meta... en/changes: key @modified not found. parsing git meta... en/changes: key @changes not found. parsing git meta... en/linux-packages: key @creator not found. parsing git meta... en/linux-packages: key @created not found. parsing git meta... en/linux-packages: key @modifier not found. parsing git meta... en/linux-packages: key @modified not found. parsing git meta... en/linux-packages: key @changes not found. parsing git meta... en/main-menu: key @modifier not found. parsing git meta... en/main-menu: key @modified not found. parsing git meta... en/main-menu: key @changes not found. parsing git meta... bad HTML content in file html/en/download.html at ./util/gen-data.pl line 69. Makefile:82: recipe for target 'posts-en.tsv' failed make: *** [posts-en.tsv] Error 255

agentzh commented 7 years ago

@lyqscmy Will you put the raw content of your html/en/download.html file somewhere so that we can fix it? You can email the file as an attachment to me (agentzh@gmail.com). Thanks!

My local Fedora environment is 23 and my pandoc version is older than you, that is, 1.13.2. Maybe the new pandoc changes the behavior.

Regarding a dedicated virtualization environment for everyone to play immediately, I'm thinking about sharing a public AMI on AWS EC2. Will that be good enough for you? Nevertheless, I still want to fix the problem in your environment.

lyqscmy commented 7 years ago

@agentzh The raw file is empty. Then I remove the entire directory html/ and make gendata. It seems work.

$ make gendata make: Nothing to be done for 'gendata'.

And I spend some time to figure out how to initdb.

$ make initdb psql -Uopenresty openresty_org -f init.sql Password for user openresty: DROP TABLE CREATE TABLE DROP TABLE CREATE TABLE COPY 107 COPY 96 DROP FUNCTION CREATE FUNCTION CREATE TRIGGER CREATE TRIGGER CREATE INDEX CREATE INDEX UPDATE 107 UPDATE 96

Then reload.

$ make reload nginx -p $PWD -c conf/nginx.conf -t nginx: the configuration file /home/xml/git/openresty.org/v2/conf/nginx.conf syntax is ok nginx: configuration file /home/xml/git/openresty.org/v2/conf/nginx.conf test is successful kill -HUP cat logs/nginx.pid

However I still get 500 Internal Server Error。。。

lyqscmy commented 7 years ago

After check the error.log, I have fix it.

nice log😁

agentzh commented 7 years ago

@lyqscmy Glad you got it running. I'm closing this.