Quantcast
Channel: Installing and upgrading help
Viewing all 47052 articles
Browse latest View live

Re: Moodle 3.7 Mail Send issue

$
0
0
by Ken Task.  

Enable Debugging for Mail
Admin - Development - Debugging

Also install:
https://moodle.org/plugins/local_mailtest

Two servers setup the same may not be the same ... they have different IP addresses and FQDN's - DNS records.

Have/could have different entries in DNS: SPF etc.

Do a DNS query from the cli of server having problems:

dig FQDNOFMoodleSever -t TXT

Do that on/for both servers.

Minimally, Google will work with SPF only ... but ... that's just
getting mail to Google.

Typically logs are kept in /var/log/ ... maillog?

Don't forget if students email servers check for spam/etc., the one server you are experiencing problems with could have gotten listed in SpamHause or other blacklist and was reported by the students email servers.

Normally, references you see in /var/log/mallog provide a link to investigate reasons.


The /var/log/maillog would/should show that.
The plugin should also show that.

It's an 'adventure'! :\

'SoS', Ken


Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Ken Task.  

Interesting ...

Two things ...

One could be a bug ...

php schedule_task.php --execute="\core\task\session_cleanup_task"
Task '\core\task\session_cleanup_task' not found

Not found????

cd /path/to/moodlecode/admin/tool/task/cli/

php schedule_task.php --list |grep session

should show a \core\task\session_cleanup_task

\core\task\session_cleanup_task                    * * * * * *       Thursday, 25 July 2019, 10:20 AM         Thursday, 25 July 2019, 10:21 AM

However, executing via command line sporadically results in
'not found'.

2nd thing ...

mdl_task_log is nothing more than that ... a log.
Truncating mdl_task_log has no ill affect.  Tested that ...
before I could get back to the mysql client to check entires in that table it was already populated with several entries.   That's because the settting for it and how often to run is every minute and many are set to ASAP ... as soon as possible.

The mysql client explain command on mdl_task_log looks to be the same as the create ... minus the indexes.


What does $CFG->dbtype line show in config.php?

And what does your server show for:

php mysql_compressed_rows.php -i

'SoS', Ken

Re: Moodle 3.7 Mail Send issue

$
0
0
by Ken Task.  

Have one other suggestion ... install logwatch.

Is a perl script that runs once a day and mails to root user on the server a summary of services from the day before.

One section deals with EMail ... which does help troubleshot email in general.

'SoS', Ken




Re: Can't sign in after server move

$
0
0
by Otaku Dude.  

Hiya Ken,

Thank you once more....

OK, so I spoke to IT and they told me that there should be no restriction on LDAP connections.

I have started to compare the archive to last years archive. When i do yum list installed I find that there is an extra package on the previous server 'openldap-clients.x86_64' Do I need this installed, will 'yum install openldap-clients' be enough?

Also, I did a variation of your '.......grep auth', and switched it to 'grep ldap'. On the previous archive it gave me auth ldap,email,mnet (and a few LDAP things) - on the current one it didn't return anything. Is it looking like LDAP has not been properly set up on the server?

Is there a way to test LDAP is working? I googled and found ldapsearch but it looked a bit complicated ;) 

Thank you,

Nigel.

Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Leon Stringer.  

I think the "Task '…' not found" error is because the backslash prefixed characters are being interpreted at some point. php schedule_task.php --execute='\core\task\session_cleanup_task' should work i.e. with single quotes to prevent the backslashes being interpreted as escape prefixes.


Re: Can't sign in after server move

$
0
0
by Ken Task.  

Network techs have been known to be wrong ... not intentionally ... so my advice is to test yourself using nmap.

nmap -P0 -p LDAPPORT IPADDRESSOFLDAPserver.

A real one:

nmap -P0 -p 389 172.25.84.30

would show:

389/tcp open  ldap

Means moodle server can talk to ldap on port 389 ... open.

On a server using LDAP for students only I do have openldap.x86_64 and openldap-clients.x86_64 installed even though Moodle doesn't really need it.  Comes into play testing however.

Are you using Moodle Networking?  That's the mnet in your auth ... shows it's turned on ... if not using, turn it off.

Yep, that ldapsearch command is 'involved' and not really a user friendly tool ... unless you are into LDAP.   Am not myself.

For 'easier' testing and admin of a server I usually install Webmin - open sourced cPanel.   It has it's own perl based web service one runs on ports like 100000 and a web based LDAP search that allows one to view the tree/forest/OU's etc. but not edit them - which is all you need for Moodle.

https://doxfer.webmin.com/Webmin/LDAP_Client

You do have to set that up to talk to an LDAP server with a user that can query the tree/forest whatever.

Once you do that successfully - which would have same settings one would use in Moodle for the BIND user, one can drill down via it's LDAP Browser into LDAP to find the OU's that contain users ... internet Schema ... which is the stuff moodle uses.

Can't share a screen shot as that would disclose too much info.

'SoS', Ken

Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Ken Task.  

Maybe Leon ...

Help on scheduled.php shows:

--execute=\\core\\task\\session_cleanup_task

See the \\ ... those escape and treat the next character as a literal.  So it ends up as \core\task\session_cleanup_task

However ...

have a server with a bash shell script consisting of one liners of the  task I want to run called 'cleanup' ... looks like:

php schedule_task.php --execute="\logstore_legacy\task\cleanup_task"
php schedule_task.php --execute="\logstore_standard\task\cleanup_task"
php schedule_task.php --execute="\core\task\file_trash_cleanup_task"
php schedule_task.php --execute="\core\task\messaging_cleanup_task"
php schedule_task.php --execute="\core\task\password_reset_cleanup_task"
php schedule_task.php --execute="\core\task\session_cleanup_task"
php schedule_task.php --execute="\core_files\task\conversion_cleanup_task"
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_category_bin"
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_course_bin"

Double quote treats what is enclosed as a literal.

Works just fine ...

[root@moodle cli]# ./cleanup
Execute scheduled task: Legacy log table cleanup (logstore_legacy\task\cleanup_task)
 Deleted old legacy log records
... used 1 dbqueries
... used 0.0050129890441895 seconds
Scheduled task complete: Legacy log table cleanup (logstore_legacy\task\cleanup_task)
Execute scheduled task: Log table cleanup (logstore_standard\task\cleanup_task)
 Deleted old log records from standard store.
... used 3 dbqueries
... used 0.015320062637329 seconds
Scheduled task complete: Log table cleanup (logstore_standard\task\cleanup_task)
Execute scheduled task: Cleanup files in trash (core\task\file_trash_cleanup_task)
Deleting old draft files... ... started 12:56:50. Current memory use 13MB.
done.
Deleting orphaned preview files... ... started 12:56:50. Current memory use 13.3MB.
done.
Deleting orphaned document conversion files... ... started 12:56:50. Current memory use 13.3MB.
done.
... used 3 dbqueries
... used 0.016566038131714 seconds
Scheduled task complete: Cleanup files in trash (core\task\file_trash_cleanup_task)
Execute scheduled task: Background processing for messaging (core\task\messaging_cleanup_task)
... used 2 dbqueries
... used 0.0048999786376953 seconds
Scheduled task complete: Background processing for messaging (core\task\messaging_cleanup_task)
Execute scheduled task: Cleanup password reset attempts (core\task\password_reset_cleanup_task)
 Cleaned up old password reset records
... used 1 dbqueries
... used 0.0045368671417236 seconds
Scheduled task complete: Cleanup password reset attempts (core\task\password_reset_cleanup_task)
Execute scheduled task: Cleanup old sessions (core\task\session_cleanup_task)
... used 7 dbqueries
... used 0.012788057327271 seconds
Scheduled task complete: Cleanup old sessions (core\task\session_cleanup_task)
Execute scheduled task: Cleanup of temporary records for file conversions. (core_files\task\conversion_cleanup_task)
... used 2 dbqueries
... used 0.0070869922637939 seconds
Scheduled task complete: Cleanup of temporary records for file conversions. (core_files\task\conversion_cleanup_task)
Execute scheduled task: Cleanup category recycle bin (tool_recyclebin\task\cleanup_category_bin)
... used 1 dbqueries
... used 0.0052070617675781 seconds
Scheduled task complete: Cleanup category recycle bin (tool_recyclebin\task\cleanup_category_bin)
Execute scheduled task: Cleanup course recycle bin (tool_recyclebin\task\cleanup_course_bin)
... used 1 dbqueries
... used 0.0048549175262451 seconds
Scheduled task complete: Cleanup course recycle bin (tool_recyclebin\task\cleanup_course_bin)

Not often, but every once in a while, this one:

core\task\session_cleanup_task

fails with not found!!!! ?????

'SoS', Ken



Plug-in Dependencies Check

$
0
0
by William Morrison.  

Hi,

Perhaps someone can help me.  I have been using moodle for 5 years and have never done an upgrade or a new plug-in.  Did a plug-in on the big blue button - no problem.  I was then offered an upgrade on my theme "essential"

I got the following message and it has completely hung up my site and I am unable to move from this page and this message.  Thanks for considering assisting me.  smile

Plugin dependencies check

Dependencies check failed for theme_essential
Plugin nameDirectorySourceCurrent versionNew versionRequiresStatus
Themes
Essential/theme/essentialAdd-on20130806002014090301
  • Moodle 2013051404
To be upgraded
You must solve all the plugin requirements before proceeding to install this Moodle version!


Re: Moodle 3.7 Mail Send issue

$
0
0
by Emma Richardson.  

Now that one might help - in response to your first answer...

var/log has no mail logs. I looked in the exim4 log which apparently sometime addresses smtp but it was empty.
I am seeing errors in the moodle logs about connection to the email server - so something must be breaking the connection part way through the send...
I already have mailtest installed and it connects just fine - it is just when doing a large group of emails
If I turn debugging on, maybe I could manually run the forum send mail task and see if it tells me more...
I am wondering if I am hitting a timeout somewhere maybe...will keep looking...it is just strange that it will send half of them before disconnecting..

Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Ken Task.  

Additional request for set up of your server ...

Background ... some time ago I was running an older version of MySQL.   One site, just one site, was throwing errors I hadn't seen before and in a 'deep dive' discovered what worked ...

Moodle code is a client to the DB server.   In settings of the DB server (/etc/my.cnf on Debian?) one normally finds settings only for server ... [mysqld] section ... not setting for client [client] section.

So to fix this one server, had to add a [client] section with just one setting ...

character-set-client-handshake=0 ... or something like that ...

After that and restart of the DB server ... no issues.

It's the only server where I had to use that setting! :\

All this explain why a peak at your mariadb config file might be in order.

'SoS', Ken


Re: Plug-in Dependencies Check

$
0
0
by Ken Task.  

What version of Moodle do you have?

Not long back ago, heard that maintainer was dropping further develop/updates.

Please see:

https://moodle.org/plugins/theme_essential

See in your screen shot a current version of 2013080600.

The above link allows looking for older released versions ... oldest I can find is for Essential 2.7.9.5.2 (Build: 2014111010) and for Moodle version 2.7.

'SoS', Ken

Re: Moodle 3.7 Mail Send issue

$
0
0
by Ken Task.  

When it comes to Moodle and mail ... sender (your moodle) must be able to talk to the server that will relay ... in this case Google.   Servers that are setup as relays do have limits as to the number of messages it can rec. at one time/session 

Doesn't Google have such?

This:

https://support.google.com/a/answer/2956491?hl=en

has section entitled:

Review sending limits for the SMTP relay service

URL also has a section for Sendmail which would be apaches default mailer.  It also has a section for PostFix ... both look like they suggest setting up a smarthost.

Hoping that gets you closer! smile

'SoS', Ken

Re: Plug-in Dependencies Check

$
0
0
by William Morrison.  

Thanks Ken!

Your speedy response and kindness in this are amazing!



On Thu, Jul 25, 2019 at 2:31 PM Ken Task (via Moodle.org) <

Installing with AWS CloudFront and Load Balancer

$
0
0
by James Yenne.  

Using Moodle 3.4.

I'm using an AWS app load balancer (ALB) on my Moodle site  - AWS EC2 instance with access via a ALB URL, and that works.

Then I change the system to use CloudFront, which has an SSL certificate for my domain that points at CF. When I hit that URL I get back the pages, but all the Moodle URLs (login, sign up, css, js, etc) on the home page are written with the full ALB URL, not my domain name.

The EC2 instance of Moodle has the config.php:

  $CFG->wwwroot = 'http://my-alb-example.com';

  $CFG->sslproxy = false;

This seems right.  Then I need to tell Moodle about my domain SSL URL so that it knows how to write the HTTPS URLs with https://example.com/ and not the load balancer URL.  

How do I tell Moodle to write URLs with a specific domain or as a relative URL, different from wwwroot?  Is there a database setting?  Or is this at the Apache level rewrite?

Thanks for any help.

James

Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Erik Frangež.  

Hi,

with command php schedule_task.php --execute='\core\task\session_cleanup_task' works but with error:

Execute scheduled task: Počisti stare seje (core\task\session_cleanup_task)
... used 7 dbqueries
... used 0,042623043060303 seconds
Scheduled task complete: Počisti stare seje (core\task\session_cleanup_task)
... used 8 dbqueries
... used 0,044022083282471 seconds
Scheduled task failed: Počisti stare seje (core\task\session_cleanup_task),Napaka pri pisanju v podatkovno bazo
Debug info:
Column count doesn't match value count at row 1
INSERT INTO mdl_task_log (type,component,classname,userid,timestart,timeend,dbreads,dbwrites,result,output) VALUES(?,?,?,?,?,?,?,?,?,?)
[array (
0 => 0,
1 => 'moodle',
2 => 'core\\task\\session_cleanup_task',
3 => 0,
4 => 1564115332.7506831,
5 => 1564115332.792284,
6 => 6,
7 => 1,
8 => 0,
9 => 'Execute scheduled task: Počisti stare seje (core\\task\\session_cleanup_task)
... used 7 dbqueries
... used 0,042623043060303 seconds
Scheduled task complete: Počisti stare seje (core\\task\\session_cleanup_task)
',
)]
Backtrace:
* line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 84 of /lib/classes/task/database_logger.php: call to mysqli_native_moodle_database->insert_record()
* line 299 of /lib/classes/task/logmanager.php: call to core\task\database_logger::store_log_for_task()
* line 718 of /lib/classes/task/manager.php: call to core\task\logmanager::finalise_log()
* line 163 of /admin/tool/task/cli/schedule_task.php: call to core\task\manager::scheduled_task_complete()

` (stdin) on line 4055 !!!r: failed at `background-color: ##FFFFFF;

$
0
0
by JC Dodo.  

Hi,

I am upgrade Moodle from version 3.1.1 to 3.4.9.

I've done it via CLI with the commands below.

php -f admin/cli/upgrade.php

It went through until suddenly stopped with the message below.

-->tinymce_pdw
++ Success (0.05 seconds) ++
-->tinymce_spellchecker
++ Success (0.05 seconds) ++
-->tinymce_wrap
++ Success (0.05 seconds) ++
-->logstore_database
++ Success (0.04 seconds) ++
-->logstore_legacy
++ Success (0.05 seconds) ++
-->logstore_standard
++ Success (0.06 seconds) ++
` (stdin) on line 4055 !!!r: failed at `background-color: ##FFFFFF;


when I rerun the cli command again, it's said

No upgrade needed for the installed version 3.4.9 (Build: 20190513) (2017111309). Thanks for coming anyway!

Is that indication of successful upgrade?

Thanks!

Re: Moodle 3.7 Mail Send issue

$
0
0
by Visvanath Ratnaweera.  

Hi Emma

So you have Exim running in the localhost and all the SMTP sending parameters of Moodle left empty? Your Exim then relays mails through Gmaii? I am asking because you said something about Gmail logs. I am not too familiar with Gmail, but wouldn't know where it shows its logs to me.

You haven't touched the Moodle SMTP sending parameters and the Exim config during or after the upgrade and you say Moodle now fails to send part of the forum mails after the upgrade, which were sent earlier?

I know, there is not an answer to your question, rather a try to limit the possible causes.

Re: After upgrading from 3.5.1 to 3.7.1 cron is not working

$
0
0
by Erik Frangež.  

Hi,
today i have created another instance for moodle (fresh, everything by default). with php 7.3*, MariaDB 10.1* and Apache (everything running on virtualized Debian 9).

I have same problem!!

root@hrcek:/var/www/html/admin/tool/task/cli# php schedule_task.php --execute='\core\task\session_cleanup_task'
Execute scheduled task: Cleanup old sessions (core\task\session_cleanup_task)
... used 7 dbqueries
... used 0,020804166793823 seconds
Scheduled task complete: Cleanup old sessions (core\task\session_cleanup_task)
... used 8 dbqueries
... used 0,022386074066162 seconds
Scheduled task failed: Cleanup old sessions (core\task\session_cleanup_task),Error writing to database
Debug info:
Column count doesn't match value count at row 1
INSERT INTO mdl_task_log (type,component,classname,userid,timestart,timeend,dbreads,dbwrites,result,output) VALUES(?,?,?,?,?,?,?,?,?,?)
[array (
0 => 0,
1 => 'moodle',
2 => 'core\\task\\session_cleanup_task',
3 => 0,
4 => 1564141229.488987,
5 => 1564141229.508868,
6 => 6,
7 => 1,
8 => 0,
9 => 'Execute scheduled task: Cleanup old sessions (core\\task\\session_cleanup_task)
... used 7 dbqueries
... used 0,020804166793823 seconds
Scheduled task complete: Cleanup old sessions (core\\task\\session_cleanup_task)
',
)]
Backtrace:
* line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 84 of /lib/classes/task/database_logger.php: call to mysqli_native_moodle_database->insert_record()
* line 299 of /lib/classes/task/logmanager.php: call to core\task\database_logger::store_log_for_task()
* line 718 of /lib/classes/task/manager.php: call to core\task\logmanager::finalise_log()
* line 163 of /admin/tool/task/cli/schedule_task.php: call to core\task\manager::scheduled_task_complete()

Can anyone try to install clean copy of moodle and do the same test described above?

Thank you!

Re: Moodle 3.7 Mail Send issue

$
0
0
by Emma Richardson.  

No, I don't have anything set on the server - I just have moodle set up to send through gmail. It can't be a gmail side stipulation because I am successfully sending emails from my other site on the same the same domain with exactly the same settings and nothing has changed on the gmail side. This was working fine until I upgraded to 3.7 and upgraded php to 7.2...
I was only looking at exim4 logs because I was not sure if maybe the Moodle settings set something up on the server (I didn't think they did but I was grasping at straws!)

Re: Moodle 3.7 Mail Send issue

$
0
0
by Emma Richardson.  

Just found a forum related error message - Undefined variable: forumentity in /var/www/html/moodle/mod/forum/post.php on line 94 - wonder if there is something with the new forum settings
Viewing all 47052 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>