[Bug 15032] New: Plack testing -- Stage MARC records for import -- Internal Server Error/Stalled Staged Import
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Bug ID: 15032 Summary: Plack testing -- Stage MARC records for import -- Internal Server Error/Stalled Staged Import Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: hbraum@nekls.org QA Contact: testopia@bugs.koha-community.org Blocks: 15019 After the fixes for 15005, I retried importing a record batch. I didn't get the error pop up message, but this time I get the message "Internal Server Error" for this page: http://test-intra.plack.bywatersolutions.com/cgi-bin/koha/tools/stage-marc-i... However, when I go directly to the Manage Staged Records page, I see my staged batch. To recreate: 1) Go to Tools --> Stage MARC records for import. 2) Upload file and click Import. I left all the settings on default ones. 3) Click Stage for Import. 4) Note the "Internal Server Error" message. 5) Click the back button and click on the Managed Staged Records link in the side bar. 6) Note the presence of the file you just uploaded. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15019 [Bug 15019] Plack testing - Umbrella -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #1 from Heather Braum <hbraum@nekls.org> --- A second file I just staged for import, stalled on 24% Job Progress on the screen, but when I manually go to the Managed Staged Records link, my second batch is there. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Mike <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8970 CC| |paul.poulain@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- For the same file, sometimes it works, sometimes you get "Internal server error" and sometimes the progress bar is stuck, that's it? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 43625 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43625&action=edit "Stage to import" fails The upload step doesn't seem to fail. But the "Stage to import" step raises the error from the screenshot. I tried to upload both authority and bibliographic records. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz Status|NEW |In Discussion --- Comment #4 from Liz Rea <liz@catalyst.net.nz> --- This is what I was seeing too - though I never got a server error, it just hung. Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #5 from Heather Braum <hbraum@nekls.org> --- I didn't get a server error just now when staging for import, but the page never goes to the MARC staging results page. When you manually access the manage staged records page, the file you tried to stage for import is listed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #6 from Liz Rea <liz@catalyst.net.nz> --- Yep, this is what I was seeing yesterday. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #7 from Heather Braum <hbraum@nekls.org> --- I also got another Internal Server Error for http://test-intra.plack.bywatersolutions.com/cgi-bin/koha/tools/manage-marc-... page when trying to import the batch of staged records. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14321 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This seems to be caused by bug 14321 The errors in the logs are: binmode() on closed filehandle _GEN_2 at /home/vagrant/kohaclone/C4/Templates.pm line 120. seek() on closed filehandle _GEN_2 at /usr/share/perl5/CGI/Emulate/PSGI.pm line 32. Can't seek stdout handle: Bad file descriptor at /usr/share/perl5/Plack/App/WrapCGI.pm line 87. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #8)
This seems to be caused by bug 14321
Not sure actually. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44011 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44011&action=edit Bug 15032: Make sure the filehandle is not close on background mode With Plack, when a file is uploaded for import, the fh created on this file in Koha::Upload is closed. To be sure we are using an opened one, we need to open it in the current scope. Test plan: 1) Go to Tools --> Stage MARC records for import. 2) Upload file and click Import. 3) Click Stage for Import. You should not get any error and the records have been correctly staged. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The last patch fixes the popup with not the internal server error. I only get the error with a kohadevbox install, using a dev install and my "old Plack config", everything works fine with this patch. My "old Plack config" is: INTRANET=1 INTRANETDIR=/home/koha/src plackup --reload --port 5001 $HOME/src/misc/plack/koha.psgi -E deployment Apache config: <Proxy> Order deny,allow Allow from 127.0.0.1,localhost </Proxy> <location /cgi-bin/koha/> ProxyPass http://localhost:5001/cgi-bin/koha/ </location> % INTRANET=1 INTRANETDIR=/home/koha/src plackup --reload --port 5001 $HOME/src/misc/plack/koha.psgi -E deployment service apache2 restart -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> ---
The last patch fixes the popup with not the internal server error.
s/with/but -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I made it works on kohadevbox:ansible, using plackup, ports and the koha.psgi from the source: vagrant@kohadevbox:~$ sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone INTRANET=1 INTRANETDIR=/home/vagrant/kohaclone plackup --port 5001 /home/vagrant/kohaclone/misc/plack/koha.psgi -E deployment and /etc/koha/apache-shared-intranet-plack.conf ProxyPass /cgi-bin/koha http://localhost:5001/cgi-bin/koha ProxyPassReverse /cgi-bin/koha http://localhost:5001/cgi-bin/koha Otherwise, trying with socket: vagrant@kohadevbox:~$ sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone INTRANET=1 INTRANETDIR=/home/vagrant/kohaclone plackup --socket /var/run/koha/kohadev/plack.sock /home/vagrant/kohaclone/misc/plack/koha.psgi -E deployment # using Koha intranet CGI from /home/vagrant/kohaclone failed to listen to port 8080: Address already in use at /usr/share/perl5/HTTP/Server/PSGI.pm line 94. --socket does not seems to work here (??) Note that it works if I use Starman: sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone INTRANET=1 INTRANETDIR=/home/vagrant/kohaclone plackup -s Starman --socket /var/run/koha/kohadev/plack.sock /home/vagrant/kohaclone/misc/plack/koha.psgi -E deployment # using Koha intranet CGI from /home/vagrant/kohaclone 2015/10/27-11:42:45 Starman::Server (type Net::Server::PreFork) starting! pid(11966) Binding to UNIX socket file "/var/run/koha/kohadev/plack.sock" Setting gid to "0 0 0" But when I try and access the interface: [Tue Oct 27 11:45:11.077045 2015] [proxy_http:error] [pid 12238] (70008)Partial results are valid but processing is incomplete: [client 192.168.50.1:47165] AH01110: error reading response, referer: http://kohadev-intra.box.vm:8080/ and finish with a 503 Service Unavailable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Starman with ports: sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone INTRANET=1 INTRANETDIR=/home/vagrant/kohaclone /usr/bin/starman -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --port 5001 /home/vagrant/kohaclone/misc/plack/koha.psgi Everyting looks fine, but the import tool is still broken (no progress bar). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #8)
This seems to be caused by bug 14321
The errors in the logs are:
binmode() on closed filehandle _GEN_2 at /home/vagrant/kohaclone/C4/Templates.pm line 120. seek() on closed filehandle _GEN_2 at /usr/share/perl5/CGI/Emulate/PSGI.pm line 32. Can't seek stdout handle: Bad file descriptor at /usr/share/perl5/Plack/App/WrapCGI.pm line 87.
Note that these errors always appear, even when the import and the progress bar work correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #14)
Everything looks fine, but the import tool is still broken (no progress bar).
Don't ask me to duplicate it, but I have had instances where the javascript didn't trigger. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Plack testing -- Stage MARC |(Plack) Stage MARC records |records for import -- |for import breaks in Plack |Internal Server | |Error/Stalled Staged Import | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Bug 15218 provides a workaround to this bug. Reading the scripts that fork, they look buggy and should probably be rewritten. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org