Problem on exporting PDF between collection and render server

280 views
Skip to first unread message

cabalero

unread,
Jun 22, 2012, 12:36:09 PM6/22/12
to mwlib
Hi All,

I installed mwlib 0.13.8 on my server and I checked exporting PDF
worked well with 'mw-render' command.

But exporting PDF through collection extension with my render server
doesn't work well.
Rendering worked well. But after rendering finish, when I click
download link.
'File not found' error message occured.

I checked render server. And I can found collect.zip file is in tmp
folder.
It seems that the zip file did not converted to pdf file, so 'file not
found' message occur.
(mediawiki version is 1.19 and I received collection from git )

About render server, I just execute below four basic commands.
$ nserve.py
$ mw-qserve
$ nslave.py --cachedir={{cache url}}
$ postman.py -cachedir={{cache url}}


I think above error might related with render server setting, cause
when I set render server as default (http://tools.pediapress.com/mw-
serve/)
exporting worked well.

Anyone can help me to set render server well or let me know other
cause?

Thanks,

cabalero

unread,
Jun 26, 2012, 2:07:38 AM6/26/12
to mw...@googlegroups.com
I found 'output.rl' file at tmp folder and it was opened well on acrobat reader as PDF format.
It means rendering was done well, but download from mediawiki does not work well.
 
I reinstall Ubuntu version to 12.04 from 10.04 and mwlib but same issue occur..
And still download from mediawiki worked well if I set render server as default.
But I have to use own render server for layout modification..
 
My render server was only opened throught 8899, 8898, 14311 ports,
So I tried to open all port. But situation was not changed..
 
Please help me..

cabalero

unread,
Jun 27, 2012, 5:24:40 AM6/27/12
to mw...@googlegroups.com
I check tcp stream(HTTP Response) when normal case and problem case.


===Normal download case with defalut render server====
HTTP/1.1 200 OK
Date: Wed, 27 Jun 2012 09:05:55 GMT
Server: Apache
X-Powered-By: PHP/5.3.14
P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"
X-Content-Type-Options: nosniff
Vary: Accept-Encoding
Content-Length: 60970
Content-Disposition: inline; filename=collection.pdf
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: application/pdf

%PDF-1.4
%뱦떈 ReportLab Generated PDF document http://www.reportlab.com
% 'BasicFonts': class PDFDictionary 
1 0 obj
% The standard fonts dictionary
<< /F1+0 16 0 R

(skip rest of stream)

============================================


======Problem case with own render server============
HTTP/1.1 200 OK
Date: Wed, 27 Jun 2012 08:32:58 GMT
Server: Apache
X-Powered-By: PHP/5.3.14
P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"
X-Content-Type-Options: nosniff
Content-language: en
X-Frame-Options: DENY
Vary: Accept-Encoding,Cookie
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Content-Encoding: gzip
Content-Length: 5259
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

?       ?ks珉쿊C轢 넬썘?`p?캅圄됥??앁=??i I?뜉9벋切{ z ?N跨?最諦c벨{ ?陳遵??뱣 ??풥@즥?멌<_?@
눡 M뮒?>땊#淑뎰?鎚K?`洶Bpq罔/돤륤J? ?例??CZ???c 1A%?x$ u???炊>i7?싴J#햮\&? ?뤯?|훱€?떲룱D? 稈춗?캱?H w[?l??M삗
_?. [n2k)T? 룁S? 훦?? .쩁J? qkDo凋 U 0*?C? ? 푃Ο? "t㈖ W?B읹낥?i?
?R ???M$ ? i ]??? m/肋礬冶뢦? 뎉恁N1懶G2~?6?纘? ??? ?J??X'`#?yA 햇" / 뷿 ?pBM?? ( 1?쩀i?緋"f췖껒G?녈 X K?놇Kl旻?뒘

(skip rest of stream)
============================================


Content type is different..
Any idea?

Thanks,

On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:

cabalero

unread,
Jun 27, 2012, 9:23:50 AM6/27/12
to mw...@googlegroups.com
This is server side TCP stream..
 
I cannot understand why bookcmd='download' request is received and ended as 'render_status' command on server..
 
===================================
POST / HTTP/1.0
Host: 118.33.113.13:8899
Accept: */*
Accept-Encoding: deflate, gzip
Referer: https://www.pentasecurity.com/csw/index.php/Special:Book
User-Agent: MediaWiki/1.19.1
Content-Length: 370
Content-Type: multipart/form-data; boundary=----------------------------4d40e8b16a8c
------------------------------4d40e8b16a8c
Content-Disposition: form-data; name="collection_id"
70096f4af14a150c
------------------------------4d40e8b16a8c
Content-Disposition: form-data; name="writer"
rl
------------------------------4d40e8b16a8c
Content-Disposition: form-data; name="command"
render_status
------------------------------4d40e8b16a8c--

HTTP/1.0 200 OK
Content-Length: 264
Content-Type: application/json
Connection: close
Date: Wed, 27 Jun 2012 10:19:55 GMT
{"content_length": 83224, "state": "finished", "content_type": "application/pdf", "url": "http://192.168.3.135:8898/cache/70/70096f4af14a150c/output.rl", "collection_id": "70096f4af14a150c", "writer": "rl", "content_disposition": "inline; filename=collection.pdf"}
======================================================
 

On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:
On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:
On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:
On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:

cabalero

unread,
Jun 27, 2012, 12:42:22 PM6/27/12
to mw...@googlegroups.com
I finally found what is different between operation of default render server and my own server.

In Collection.body.php, there is '$req->execute()->isOK()' command related with sending new request to server.
In case of default render server, result of above command is true, 
but in case of my own render server, result is false.

But I don't know why result is different..
Can anyone help me to inspect?

Thanks,

On Saturday, June 23, 2012 1:36:09 AM UTC+9, cabalero wrote:
Reply all
Reply to author
Forward
0 new messages