[Koha] koha stop working after enabling plack

Alvaro Cornejo cornejo.alvaro at gmail.com
Thu Aug 16 17:06:06 NZST 2018


Hi

This is what I get from plack-error.log:

aco at Celacp:/var/log/koha/biblioteca$ sudo more plack-error.log
Process Backgrounded
2018/08/15-23:29:54 Starman::Server (type Net::Server::PreFork) starting!
pid(7772)
Binding to UNIX socket file "/var/run/koha/biblioteca/plack.sock"
Setting gid to "1001 1001"
Setting uid to "1001"
Error while loading /etc/koha/plack.psgi: Can't load application from file
"/usr/share/koha/api/v1/app.pl": Can't
locate object method "cache_dir" via package "Swagger2::SchemaValidator" at
/usr/share/perl5/Swagger2.pm line 42.
Compilation failed in require at (eval 1285) line 1.
Error while loading /etc/koha/plack.psgi: Can't load application from file
"/usr/share/koha/api/v1/app.pl": Can't
locate object method "cache_dir" via package "Swagger2::SchemaValidator" at
/usr/share/perl5/Swagger2.pm line 42.
Compilation failed in require at (eval 1285) line 1.
....
....

Error while loading /etc/koha/plack.psgi: Can't load application from file
"/usr/share/koha/api/v1/app.pl": Can't
locate object method "cache_dir" via package "Swagger2::SchemaValidator" at
/usr/share/perl5/Swagger2.pm line 42.
Compilation failed in require at (eval 1285) line 1.
2018/08/15-23:32:01 Server closing!

...
...

Error while loading /etc/koha/plack.psgi: Can't load application from file
"/usr/share/koha/api/v1/app.pl": Can't
locate object method "cache_dir" via package "Swagger2::SchemaValidator" at
/usr/share/perl5/Swagger2.pm line 42.
Compilation failed in require at (eval 1285) line 1.
2018/08/15-23:49:00 Server closing!
panic: fold_constants JMPENV_PUSH returned 2 at
/usr/share/perl5/Plack/Util.pm line 120.


This is the content of refered file:

aco at Celacp:/var/log/koha/biblioteca$ sudo more /usr/share/koha/api/v1/app.pl
#!/usr/bin/perl

# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more
details.
#
# You should have received a copy of the GNU General Public License along
# with Koha; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

use Modern::Perl;

require Mojolicious::Commands;
Mojolicious::Commands->start_app('Koha::REST::V1');




|-----------------------------------------------------------------------------------------------------------------|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS
y GPRS online
              Visitenos en www.perusms.com

2018-08-15 23:57 GMT-05:00 Alvaro Cornejo <cornejo.alvaro at gmail.com>:

> Hi
>
> I´m trying to enable plack on my instance but Intranet and Opac hungs
> after restarting apache.
>
> This is what I´ve done:
>
>
> aco at Celacp:~$ sudo koha-plack --enable biblioteca
> WARNING: koha-plack requires some Apache modules that you are missing.
> You can install them with:
>
>     sudo a2enmod proxy_http
>
> Plack enabled for biblioteca
> aco at Celacp :~$ sudo a2enmod proxy_http
> Considering dependency proxy for proxy_http:
> Enabling module proxy.
> Enabling module proxy_http.
> To activate the new configuration, you need to run:
>   service apache2 restart
> aco at Celacp :~$ sudo service apache2 restart
> aco at Celacp :~$ sudo koha-plack --enable biblioteca
> Plack enabled for biblioteca
> aco at Celacp :~$ sudo koha-plack --start biblioteca
>  * Starting Plack daemon for biblioteca
>      [ OK ]
> aco at Celacp :~$ sudo service apache2 restart
>
> From here, if I try to access OPAC or internet it taked forever to load
> any page
>
> when stopping plack:
> aco at Celacp :~$ sudo koha-plack --stop biblioteca
>
> I get:
>
> Proxy Error
>
> The proxy server received an invalid response from an upstream server.
> The proxy server could not handle the request *GET /cgi-bin/koha/about.pl
> <https://biblioteca-admin.celacp.org/cgi-bin/koha/about.pl>*.
>
> Reason: *Error reading from remote server*
>
> Apache/2.4.18 (Ubuntu) Server at biblioteca-admin.celacp.org Port 443
>
>
>   after apache restart I get:
>
> Service Unavailable
>
> The server is temporarily unable to service your request due to
> maintenance downtime or capacity problems. Please try again later.
> ------------------------------
> Apache/2.4.18 (Ubuntu) Server at biblioteca-admin.celacp.org Port 443
>
>
> I need to disable plack and restart apache to recover the intranet and opac
>
>
> This is my koha version:
> Versión de Koha: 17.05.05.000
> Versión del SO ('uname -a'): Linux 4.15.13-x86_64-linode106 #1 SMP Tue
> Mar 27 14:42:14 UTC 2018 x86_64 Memcached is dissabled
>
>
> Any ideas of what can be happening?
>
> Regards,
>
> Alvaro
>
>


More information about the Koha mailing list