[librecat-dev] librecat failing to run as service
Jonathan NORRIS
jnorris at ist.ac.at
Mon Feb 12 17:05:07 CET 2018
Yes sorry I forgot to mention that i'm trying to run this on debian
stretch which doesn't actually have those functions.
And I am using my own values for the variables you've mentioned.
when I look into the code I can see that its failing when trying to
'require' the modules at the 'path' (line 25 of
/var/storage/librecat/local/lib/perl5/all.pm):
12 sub import {
13 my $class = shift;
14 my $of = shift;
15 my $args = [ @_ ];
16 if ($of ne 'of') {
17 unshift @$args, $of;
18 }
19 my $caller = caller();
20 foreach my $arg (@$args) {
21 my $modules = _find_modules( $arg );
22 foreach my $module (@$modules) {
23 my $package = $module->{ module };
24 eval {
25 require $module->{ path };
26 $package->import;
27 };
28 if ($@) {
29 warn( $@ );
30 }
31 }
32 }
33 1;
34 }
In the extract from the syslog you can see its trying to require some
modules and is failing there for some reason. Initially i thought the
message 'not found' was because the modules were not found, but now I
realize that is the 'echo_success' function that is not found! So its
hard to tell what the actual issue is here.
Thanks,
Jonathan
On 02/12/2018 04:34 PM, Patrick Hochstenbach wrote:
> Hi Jonathan,
>
> Do you have made the necessary changes in the etc/librecat.initd file? https://github.com/LibreCat/LibreCat/blob/master/etc/librecat.initd
>
> Parameters you need to check:
>
> CARTON <- where is our `carton` installed. (hint: execute `which carton` on the command line)
> SERVER_USER <- user that owns the librecat code
> SERVER_GROUP <- group that own the librecat code
> DANCER_DIR <- installation directory of librecat
> LIBRECAT_LAYERS <- if you use a local layer point it to your layer directory
>
> It is weird you can’t execute echo_success and echo_failure. They are part of /etc/rc.d/init.d/functions ..The ‘initscripts’ RPM package (maybe it is not default installed on Centos7 ?)
>
> Patrick
>
>
>> On 12 Feb 2018, at 15:33, Jonathan NORRIS <jnorris at ist.ac.at> wrote:
>>
>> Hello,
>>
>> I'm wondering if anybody knows what could be the issue here. I am trying to run librecat as a service following the documentation here: https://github.com/LibreCat/LibreCat/wiki/Deployment-%28CentOS7%29
>>
>> When I run 'systemctl start librecat.service' I get no error messages, but when I go to librecat in the browser I am only getting the unrendered content of the index page, so all I see is the template toolkit code.
>>
>> When I run 'systemctl status librecat.service' I get the following output:
>>
>> ● librecat.service - Librecat application
>> Loaded: loaded (/etc/systemd/system/librecat.service; enabled; vendor preset: enabled)
>> Active: active (running) since Mon 2018-02-12 14:39:58 CET; 4s ago
>> Process: 19598 ExecStop=/var/storage/librecat-ist/etc/librecat.initd stop (code=exited, status=0/SUCCESS)
>> Process: 19611 ExecStart=/var/storage/librecat-ist/etc/librecat.initd start (code=exited, status=0/SUCCESS)
>> Main PID: 19615 (starman master )
>> Tasks: 16 (limit: 4915)
>> CGroup: /system.slice/librecat.service
>> ├─19615 starman master
>> ├─19616 starman worker
>> ├─19617 starman worker
>> ├─19618 starman worker
>> ├─19619 starman worker
>> ├─19620 starman worker
>> ├─19621 starman worker
>> ├─19622 starman worker
>> ├─19623 starman worker
>> ├─19624 starman worker
>> ├─19625 starman worker
>> ├─19626 starman worker
>> ├─19627 starman worker
>> ├─19628 starman worker
>> ├─19629 starman worker
>> └─19630 starman worker
>>
>> ' at /var/storage/librecat/local/lib/perl5/Plack/Util.pm line 120
>> Plack::Util::_load_sandbox('/var/storage/librecat/bin/app.pl') called at /var/storage/librecat/local/lib/perl5/Plack/Util.pm line 136
>> Plack::Util::load_psgi('/var/storage/librecat/bin/app.pl') called at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 179
>> Plack::Runner::__ANON__ at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 24
>> Plack::Runner::__ANON__ at /var/storage/librecat/local/lib/perl5/Plack/Loader.pm line 55
>> Plack::Loader::preload_app('Plack::Loader=HASH(0x55d0b5984440)', 'CODE(0x55d0b593de50)') called at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 274
>> Plack::Runner::run('Plack::Runner=HASH(0x55d0b57423a0)') called at /var/storage/librecat/local/bin/plackup line 7
>> Compilation failed in require at /var/storage/librecat/local/lib/perl5/all.pm line 25, <DATA> line 1003.
>> /var/storage/librecat-ist/etc/librecat.initd: 51: /var/storage/librecat-ist/etc/librecat.initd: echo_success: not found
>> Started Librecat application.
>>
>>
>> There is some extra logging in the syslog file:
>>
>> $Starting : unknown store default
>> Trace begun at /var/storage/librecat/local/lib/perl5/Catmandu/Env.pm line 140
>> Catmandu::Env::store('Catmandu::Env=HASH(0x55fe3d193470)', undef) called at /var/storage/librecat/local/lib/perl5/Catmandu.pm line 97
>> Catmandu::store('Catmandu', undef) called at /var/storage/librecat/local/lib/perl5/Dancer/Plugin/Catmandu/SRU.pm line 42
>> Dancer::Plugin::Catmandu::SRU::sru_provider('/sru') called at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 21
>> require LibreCat/App/Search/Route/api.pm at /var/storage/librecat/local/lib/perl5/all.pm line 25
>> eval {...} at /var/storage/librecat/local/lib/perl5/all.pm line 24
>> all::import('all', 'LibreCat::App::Search::Route::*') called at /var/storage/librecat/lib/LibreCat/App/Search.pm line 6
>> LibreCat::App::Search::BEGIN at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> eval {...} at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> require LibreCat/App/Search.pm at /var/storage/librecat/lib/LibreCat/App.pm line 13
>> LibreCat::App::BEGIN at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> eval {...} at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> require LibreCat/App.pm at /var/storage/librecat/bin/app.pl line 22
>> Plack::Sandbox::_2fvar_2fstorage_2flibrecat_2fbin_2fapp_2epl::BEGIN at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> eval {...} at /var/storage/librecat/lib/LibreCat/App/Search/Route/api.pm line 0
>> require /var/storage/librecat/bin/app.pl at (eval 8) line 3
>> eval 'package Plack::Sandbox::_2fvar_2fstorage_2flibrecat_2fbin_2fapp_2epl;
>> {
>> my $app = do $_file;
>> if ( !$app && ( my $error = $@ || $! )) { die $error; }
>> $app;
>> }
>> ' at /var/storage/librecat/local/lib/perl5/Plack/Util.pm line 120
>> Plack::Util::_load_sandbox('/var/storage/librecat/bin/app.pl') called at /var/storage/librecat/local/lib/perl5/Plack/Util.pm line 136
>> Plack::Util::load_psgi('/var/storage/librecat/bin/app.pl') called at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 179
>> Plack::Runner::__ANON__ at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 24
>> Plack::Runner::__ANON__ at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 24
>> Plack::Runner::__ANON__ at /var/storage/librecat/local/lib/perl5/Plack/Loader.pm line 55
>> Plack::Loader::preload_app('Plack::Loader=HASH(0x55fe3c146420)', 'CODE(0x55fe3c100548)') called at /var/storage/librecat/local/lib/perl5/Plack/Runner.pm line 274
>> Plack::Runner::run('Plack::Runner=HASH(0x55fe3bf043a0)') called at /var/storage/librecat/local/bin/plackup line 7
>> Compilation failed in require at /var/storage/librecat/local/lib/perl5/all.pm line 25, <DATA> line 1003.
>> /var/storage/librecat-ist/etc/librecat.initd: 51: /var/storage/librecat-ist/etc/librecat.initd: echo_success: not found
>> Started Librecat application.
>>
>>
>> Has anyone seen an issue like this before?
>>
>>
>> Thanks for any help,
>>
>> Jonathan
>>
>> IST Austria
>>
>> _______________________________________________
>> librecat-dev mailing list
>> - send list mails to librecat-dev at lists.uni-bielefeld.de
>> - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
>> - project website: http://librecat.org/
More information about the librecat-dev
mailing list