Closed mingjunyang closed 7 years ago
@mingjunyang Please provide the raw content in your html/en/debugging.html
file.
<p><!--- @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 ---></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>
@mingjunyang Seems like a pandoc issue. Will you upgrade pandoc to 1.16.x? Mine is 1.16.0.2.
@mingjunyang Basically, your pandoc does not handle HTML comments (<!--...-->
) correctly inlined in the Markdown source.
let me try update.
@mingjunyang Interestingly, pandoc 1.13.2 works correctly in my Fedora Linux. Not sure if it is a regression in pandoc 1.15.x :)
@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!
@agentzh It's work. It's ok! thx!
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
@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.
@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 Glad you got it running. I'm closing this.
I try make gendata 47c89a12b0bd33c09d0ab54de256eb7a89842aa4
more infor