Bug 28811 - Cant receive orders
Summary: Cant receive orders
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 21.05
Hardware: All Linux
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-04 08:39 UTC by Mohamad Barham
Modified: 2022-06-06 20:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
no listing order to receive (119.04 KB, image/png)
2021-08-04 08:39 UTC, Mohamad Barham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamad Barham 2021-08-04 08:39:51 UTC
Created attachment 123453 [details]
no listing order to receive

Dears,

Im on debian 9
koha 21.05

I have a problem with receiving orders, 

I have closed basket, with a lot of orders inside, check picture attached , if I try to receive any order, nothing appear on the receiving page , check next photo.


logs from server


==> /var/log/koha/koha/plack.log <==
IP - - [04/Aug/2021:09:26:51 +0300] "GET /intranet/acqui/parcel.pl?invoiceid=22 HTTP/1.1" 200 41592 "https://koha-intra.birzeit.edu/cgi-bin/koha/acqui/parcels.pl?booksellerid=309" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

==> /var/log/koha/koha/intranet-access.log <==
IP - - [04/Aug/2021:09:26:51 +0300] "GET /cgi-bin/koha/acqui/parcel.pl?invoiceid=22 HTTP/1.1" 200 7952


==> /var/log/koha/koha/plack.log <==
IP - - [04/Aug/2021:09:26:51 +0300] "GET /api/v1/app.pl/api/v1/acquisitions/orders?only_active=1&_page=1&_per_page=20&_match=contains&_order_by=%2Bbasket.name HTTP/1.1" 404 - "https://koha-intra.birzeit.edu/cgi-bin/koha/acqui/parcel.pl?invoiceid=22" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

==> /var/log/koha/koha/intranet-access.log <==
IP - - [04/Aug/2021:09:26:51 +0300] "GET /api/v1/acquisitions/orders?only_active=1&_page=1&_per_page=20&_match=contains&_order_by=%2Bbasket.name HTTP/1.1" 404 1046
Comment 1 Jonathan Druart 2021-08-06 09:59:19 UTC
Hello Mohamad,

Your problem is coming from:

IP - - [04/Aug/2021:09:26:51 +0300] "GET /api/v1/app.pl/api/v1/acquisitions/orders?only_active=1&_page=1&_per_page=20&_match=contains&_order_by=%2Bbasket.name HTTP/1.1" 404

You are getting a 404, the correct path is /api/v1/acquisition[...] but you have an extra "/api/v1/app.pl" before

How did you install Koha? Is it a fresh install or you upgraded from an older version?
Comment 2 Jonathan Druart 2021-08-16 12:55:07 UTC
It's certainly coming from a bad value in your koha.list (apt) file.

Similar problem reported (and fixed) today on IRC: http://irc.koha-community.org/koha/2021-08-16#i_2371014


More info: https://wiki.koha-community.org/wiki/Koha_on_Debian#Pick_which_Koha_version_to_follow
Comment 3 Mohamad Barham 2021-09-06 09:24:16 UTC
not fresh copy.

current version 21.05

upgrade from old version , I have changed koha.list to be 
deb http://debian.koha-community.org/koha stable main bullseye

update && upgrade && restart services 


I dont know exactly at which stage of upgrade happened (between which versions)

but problem 404 still exist, 

should I change smth manually regarding this route?
or should I wait till another release ?

note that its in production now


Regards
Comment 4 Jonathan Druart 2021-09-06 09:36:37 UTC
If you are using debian 9, your apt source shouldn't contain "bullseye" (which is the codename for debian 11).
Comment 5 Mohamad Barham 2021-09-06 09:42:26 UTC
removed,

my debian  is exactly 9.13
Comment 6 Jonathan Druart 2021-09-06 10:33:06 UTC
So use:
deb http://debian.koha-community.org/koha stable main stretch

% apt update && apt install koha-common
Comment 7 Mohamad Barham 2021-09-07 06:54:08 UTC
problem still exist
Comment 8 Jonathan Druart 2021-09-08 10:06:17 UTC
Then provide us more information. What's the output of the following commands?

pmvers Mojolicious::Plugin::OpenAPI
pmvers Mojolicious
pmvers JSON::Validator
pmvers YAML::XS
apt-cache policy libjson-validator-perl
Comment 9 Mohamad Barham 2021-09-08 10:54:53 UTC
root@libkoha:~# pmvers Mojolicious::Plugin::OpenAPI
4.05
root@libkoha:~# pmvers Mojolicious
9.20
root@libkoha:~# pmvers JSON::Validator
4.21
root@libkoha:~# pmvers YAML::XS
0.83
root@libkoha:~# apt-cache policy libjson-validator-perl
libjson-validator-perl:
  Installed: 3.25+dfsg-1+koha3
  Candidate: 3.25+dfsg-1+koha3
  Version table:
 *** 3.25+dfsg-1+koha3 500
        500 http://debian.koha-community.org/koha stable/main amd64 Packages
        100 /var/lib/dpkg/status
     0.92+dfsg-1 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
Comment 10 Jonathan Druart 2021-09-09 08:25:27 UTC
On debian 9 it should be:

pmvers Mojolicious::Plugin::OpenAPI
2.16
pmvers Mojolicious
8.12
pmvers JSON::Validator
3.14
pmvers YAML::XS
0.76

You have messed with your packages somehow.

Can you post the output of the following command?

% sudo grep -r koha /etc/apt/sources.list*
Comment 11 Mohamad Barham 2021-09-09 10:03:14 UTC
/etc/apt/sources.list.d/koha.list:deb http://debian.koha-community.org/koha stable main stretch
/etc/apt/sources.list.d/koha.list.save:deb http://debian.koha-community.org/koha stable main
Comment 12 Jonathan Druart 2021-09-09 10:20:52 UTC
In a test environment, I would try to remove the different packages and reinstall them.

remove:
libmojolicious-plugin-openapi-perl
libmojolicious-perl
libjson-validator-perl
libyaml-perl

apt update && apt upgrade

reinstall them
restart services
Comment 13 Mason James 2021-09-09 12:10:23 UTC
(In reply to Mohamad Barham from comment #9)
> root@libkoha:~# pmvers Mojolicious::Plugin::OpenAPI
> 4.05
> root@libkoha:~# pmvers Mojolicious
> 9.20
> root@libkoha:~# pmvers JSON::Validator
> 4.21
> root@libkoha:~# pmvers YAML::XS
> 0.83

hi Mohamad
it seems that these perl modules have been installed from CPAN

this will cause problems with your Koha install, and you need to remove these modules to fix the problem

you should not have to install any perl modules from CPAN, for a working Koha package install
Comment 14 Mason James 2021-09-09 12:26:26 UTC
(In reply to Mason James from comment #13)
> (In reply to Mohamad Barham from comment #9)
> > root@libkoha:~# pmvers Mojolicious::Plugin::OpenAPI
> > 4.05
> > root@libkoha:~# pmvers Mojolicious
> > 9.20
> > root@libkoha:~# pmvers JSON::Validator
> > 4.21
> > root@libkoha:~# pmvers YAML::XS
> > 0.83
> 
> hi Mohamad
> it seems that these perl modules have been installed from CPAN
> 
> this will cause problems with your Koha install, and you need to remove
> these modules to fix the problem
> 
> you should not have to install any perl modules from CPAN, for a working
> Koha package install

hi Mohamad
after a backup, try these commands to remove the problem modules

 sudo cpan -v --uninstall Mojolicious::Plugin::OpenAPI
 sudo cpan -v --uninstall Mojolicious
 sudo cpan -v --uninstall JSON::Validator
 sudo cpan -v --uninstall YAML::XS
 
then...
 sudo koha-plack --restart libkoha
Comment 15 Mason James 2021-09-09 12:30:29 UTC
> hi Mohamad
> after a backup, try these commands to remove the problem modules
> 

oops, that should been 'cpanm'

 sudo cpanm -v --uninstall Mojolicious::Plugin::OpenAPI
 sudo cpanm -v --uninstall Mojolicious
 sudo cpanm -v --uninstall JSON::Validator
 sudo cpanm -v --uninstall YAML::XS
Comment 16 Mohamad Barham 2021-10-12 09:29:19 UTC
Thank alot

every thing OK