Bug 29964 - SMTP server list not populating
Summary: SMTP server list not populating
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: 21.11
Hardware: All Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-27 21:19 UTC by Father Vlasie
Modified: 2023-06-25 11:38 UTC (History)
6 users (show)

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


Attachments
screenshot of SMTP server page (304.14 KB, image/png)
2022-01-27 21:19 UTC, Father Vlasie
Details
apt history (2.04 KB, text/plain)
2022-03-09 05:41 UTC, Father Vlasie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Father Vlasie 2022-01-27 21:19:00 UTC
Created attachment 129917 [details]
screenshot of SMTP server page

After adding an SMTP server to Koha it does not show in the list. Therefore it cannot be chosen, edited, etc.

(Mac Chromium-based browser)
Comment 1 Owen Leonard 2022-01-28 11:57:07 UTC
I don't see this problem in master or 21.11.x, which makes me think this is probably a local problem. Are there any errors in the browser console?
Comment 2 Fridolin Somers 2022-02-11 07:14:38 UTC
Can you try with Mozilla Firefox please ?
Comment 3 Father Vlasie 2022-02-11 07:23:36 UTC
Thank you for looking at this issue!

It does not work in Firefox either...

The browser console contains these messages:

/api/v1/config/smtp_servers?_page=1&_per_page=20&q=%5B%5D&_match=contains&_order_by=%2Bme.name:1 Failed to load resource: the server responded with a status of 404 (Not Found)

datatables_21.1101000.js:515 DataTables warning: table id=smtp_servers - Ajax error. For more information about this error, please see http://datatables.net/tn/7
jQuery.fn.dataTable.ext.errMode @ datatables_21.1101000.js:515

K @ datatables.min_21.1101000.js:113
error @ datatables.min_21.1101000.js:74
i @ jquery-2.2.3.min_21.1101000.js:2
fireWith @ jquery-2.2.3.min_21.1101000.js:2
z @ jquery-2.2.3.min_21.1101000.js:4
(anonymous) @ jquery-2.2.3.min_21.1101000.js:4
Comment 4 Katrin Fischer 2022-02-21 22:35:46 UTC
Hi, could you check if the list of libraries loads ok for you? This is also done via the API so just to check that this part works ok in your installation.
Comment 5 Katrin Fischer 2022-02-21 22:36:01 UTC
Should be more specific: Administration > libraries
Comment 6 Father Vlasie 2022-02-21 22:38:10 UTC
Aha! No the library list does not load!
Comment 7 Katrin Fischer 2022-02-21 22:41:02 UTC
(In reply to Father Vlasie from comment #6)
> Aha! No the library list does not load!

I've seen this problem come up a few times now but still not quite sure about what the fix was :( 

Someone else might be able to help you here better, but I remember it had to do with OS version and dependencies. So what OS and version of it are you running Koha on?
Comment 8 Father Vlasie 2022-02-21 22:48:40 UTC
uname -a says

	#1 SMP Debian 4.9.290-1 (2021-12-12) x86_64 GNU/Linux

And About Koha says

	21.11.01.000

I just checked and some of my Perl modules need upgrading:

	JSON::Validator (3.14)	0.97
	Mojolicious (8.12)	7.21
	Mojolicious::Plugin::OpenAPI (2.16)	1.15

Could this be it?
Comment 9 Jonathan Druart 2022-02-22 11:55:17 UTC
(In reply to Father Vlasie from comment #8)
> uname -a says
> 
> 	#1 SMP Debian 4.9.290-1 (2021-12-12) x86_64 GNU/Linux
> 
> And About Koha says
> 
> 	21.11.01.000
> 
> I just checked and some of my Perl modules need upgrading:
> 
> 	JSON::Validator (3.14)	0.97
> 	Mojolicious (8.12)	7.21
> 	Mojolicious::Plugin::OpenAPI (2.16)	1.15
> 
> Could this be it?

Yes, upgrade them. Which OS do you have?
Comment 10 Jonathan Druart 2022-02-22 11:57:56 UTC
And post what you have in /etc/apt/sources.list.d/koha.list
Comment 11 Katrin Fischer 2022-02-22 12:00:01 UTC
From the uname... Debian 9 perhaps? Could you confirm?
Comment 12 Father Vlasie 2022-02-22 17:22:34 UTC
Yes it is Debian 9.
Comment 13 Father Vlasie 2022-02-22 17:25:44 UTC
less /etc/apt/sources.list.d/koha.list contains:

deb http://debian.koha-community.org/koha stable main
Comment 14 Father Vlasie 2022-02-22 17:26:34 UTC
And I have installed the missing Perl modules but the problem persists...
Comment 15 Jonathan Druart 2022-02-22 17:38:15 UTC
Try:
  deb http://debian.koha-community.org/koha stable main jessie

then apt update; apt upgrade
Comment 16 Tomás Cohen Arazi 2022-02-23 11:11:33 UTC
(In reply to Jonathan Druart from comment #15)
> Try:
>   deb http://debian.koha-community.org/koha stable main jessie
> 
> then apt update; apt upgrade

That should be:

    deb http://debian.koha-community.org/koha stable main stretch

Keep in mind that Debian 9 will be EOL in June.
Comment 17 Jonathan Druart 2022-02-23 11:39:35 UTC
Oops yes, jessie is Debian 8!
Comment 18 Father Vlasie 2022-02-23 17:03:29 UTC
It is a good thing I was busy! :) I was not so excited about downgrading...
I will try this over the weekend. Thank you everyone!
Comment 19 Katrin Fischer 2022-02-26 16:37:07 UTC
Just downgrading importance a little bit as I think we are up against an installation issue here.
Comment 20 Manos PETRIDIS 2022-03-06 09:37:49 UTC
Could it be related to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28800 ?
Comment 21 Manos PETRIDIS 2022-03-06 09:38:07 UTC
Could it be related to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28800 ?
Comment 22 Katrin Fischer 2022-03-06 11:36:37 UTC
(In reply to Manos PETRIDIS from comment #21)
> Could it be related to
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28800 ?

It is related in terms of missing dependencies/wrong versions etc. The suggested fix will hopefully solve the issue.
Comment 23 Father Vlasie 2022-03-08 17:54:48 UTC
Sorry for the delay! I tried the fix of updating /etc/apt/sources.list.d/koha.list to deb http://debian.koha-community.org/koha stable main stretch

But the problem persists! :(
Comment 24 Katrin Fischer 2022-03-08 23:28:28 UTC
(In reply to Father Vlasie from comment #23)
> Sorry for the delay! I tried the fix of updating
> /etc/apt/sources.list.d/koha.list to deb
> http://debian.koha-community.org/koha stable main stretch
> 
> But the problem persists! :(

Did anything happen/change when you ran  apt update; apt upgrade ?
Comment 25 Father Vlasie 2022-03-09 05:41:42 UTC
Created attachment 131508 [details]
apt history
Comment 26 Father Vlasie 2022-03-09 05:42:29 UTC
I have attached the apt history which shows what changed.
Comment 27 Jonathan Druart 2022-03-09 08:54:09 UTC
Did you restart all the things (memcached, apache2, koha-common)?

Please post the versions of the following packages: JSON::Validator, Mojolicious, Mojolicious::Plugin::OpenAPI

Do you get an error in the koha logs?
Comment 28 Father Vlasie 2022-03-09 18:32:44 UTC
Yes I have restarted the whole server.

JSON::Validator (3.14)	5.05
Mojolicious (8.12)	9.22
Mojolicious::Plugin::OpenAPI (2.16)	5.02

The api-error.log is empty.

Thank you!
Comment 29 Tomás Cohen Arazi 2022-03-09 18:49:33 UTC
(In reply to Father Vlasie from comment #28)
> Yes I have restarted the whole server.
> 
> JSON::Validator (3.14)	5.05
> Mojolicious (8.12)	9.22
> Mojolicious::Plugin::OpenAPI (2.16)	5.02
> 
> The api-error.log is empty.
> 
> Thank you!

XD

That's not gonna work, see bug 30194. This is how it should look like:

root@kohadevbox:koha(master)$ pmvers Mojolicious
8.12
root@kohadevbox:koha(master)$ pmvers JSON::Validator
3.14
root@kohadevbox:koha(master)$ pmvers Mojolicious::Plugin::OpenAPI
2.16
Comment 30 Tomás Cohen Arazi 2022-03-26 21:51:37 UTC
(In reply to Father Vlasie from comment #28)
> Yes I have restarted the whole server.
> 
> JSON::Validator (3.14)	5.05
> Mojolicious (8.12)	9.22
> Mojolicious::Plugin::OpenAPI (2.16)	5.02
> 
> The api-error.log is empty.
> 
> Thank you!

You need to remove the libraries you manually installed using cpanm now that the right ones are pulled from the updated repository (i.e. now you added the stretch keyword)
Comment 31 Katrin Fischer 2023-06-25 11:38:30 UTC
This is an installation/setup issue, please see:
https://wiki.koha-community.org/wiki/REST_API_Debug