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

Re: Moodle in docker environent

$
0
0
by Ken Task.  

Pardon 2 cents worth ...

Noticed in your screen shots you acquire the moodle code via git and then remove the hidden .git directory ... which means you loose the ability to acquire point releases - maybe even 0 day flaws (happened only once in many years, but still ...)

You also loose the ability to upgrade the site as long as server has compat versions of PHP + extensions and DB version in place without the need of a new docker.

https://moodledev.io/general/releases

Yes, Docker gets AMP stack and a moodle setup quickly ... but doesn't that kinda limit you to above the water line with the moodle?

Often wondered ... so I'll ask a non-docker user stupid question ... how does that setup handle updates/upgrades to PHP/DB server/Web server?

There are things that need to be setup outside of moodle once it's up and running ... cron job.  Maybe you could include in your docker a bash shell script to do a site backup?

For that matter, if one left .git, 2 more scripts ... one to update code for a point release ... and another to upgrade site when a desired higher version is released.

'SoS', Ken


Re: Moodle in docker environent

$
0
0
by Rick Jerz.  

At this year's MountainMoot, I attended a session titled "Docker & Moodle: Setting Up Your Local Learning Playground," provided by Alan McCoy from NCSU. Alan did a great job, but because I am always slow at things, I had problems getting Docker to work on my Mac. At the Moot, I persisted by catching Alan at different times during the Moot, asking questions, and trying things. Eventually, I succeeded in getting Docker working.

As with many of these experimental environments, sometimes it is hard to see their advantages. I have used XAMPP, MAMP, Moodlebox, and experimental installs on my servers. They each seem to offer interesting features. My "impression" of Docker is that it may provide more backend server-type configurations for testing. For my simple-minded approach to experimenting, MAMP on my Mac is where I am at right now. Docker seemed interesting to me, but I wasn't convinced to continue with it over my MAMP environment.

I am unsure if Alan provides any resources on a website. And I am unsure if the MountainMoot folks would allow guest access to his resources. The session looks like my screenshot, below.

Re: Serious database preformace problems after upgrade

$
0
0
by Ken Task.  

Running out of disk space can corrupt a DB ... if lucky, maybe a few tables.

Strongly suggest running the command line only script in code/admin/cli/ called check_database_schema.php

Would also suggest installing MySQLTuner.pl

Run tuner with superuser creds (root) and pay attention to the lines at the top related to memory as well as the recommendations at the bottom of the run.

https://github.com/major/MySQLTuner-perl

and some more 'light reading' (NOT) on DB:

https://www.percona.com/blog/mysql-101-parameters-to-tune-for-mysql-performance/

'SoS', Ken

Re: Serious database preformace problems after upgrade

$
0
0
by Visvanath Ratnaweera.  

About the $CFG->db* settings: The only thing I notice is the 'dbcollation' => 'utf8mb4_czech_ci'. utf8mb4_unicode_ci is advised. But that can not be the cause of sporadic errors. Still worth checking the Administration via command line#Converting character set and collation. Your config.php file looks like a shared hosting. Hope, you have CLI access.
 
5xx errors come from the web server - most of the time. So it is logical that Moodle doesn't log them. You need to search the web server error logs.

About the "resources" I linked: They happen to be called "Before you post.. Read this.."!

Re: unable to remove Login page text from old fordson theme

$
0
0
by Matthew DiSano.  

Ken,
Sorry for the late reply but your solution to use php cfg.php worked. I was able to change the value and then see that change in the login page.
Thanks!

Re: unable to remove Login page text from old fordson theme

$
0
0
by Ken Task.  

You are welcome! Glad to hear it!

That script is pretty handy for a lot of things! smile

'SoS', Ken

Re: Serious database preformace problems after upgrade

$
0
0
by Howard Miller.  

Just a random thought - you've not set up database sessions have you?

Re: Moodle in docker environent

$
0
0
by Howard Miller.  

It's a slight over-simplification but - here's were Docker wins - to obtain a new version of Moodle and update all the requirements, copy the config files, change the version numbers and rebuild. In fact, you can have multiple versions of everything running at once. To me, that's what makes it worth the trouble.

Re: Serious database preformace problems after upgrade

$
0
0
by Jiří Procházka.  

Hello Ken,
thank you for the suggestion. Here’s what we have done so far to diagnose the issues which I am able to do:

Database Integrity and Optimization Checks:
We performed an analysis and integrity check on all database tables. No errors or issues were found.

Disk Space Issue Review:
We confirmed that there was no disk space issue during the upgrade, and the database did not run out of space. It has dedicated space.

Running check_database_schema.php:
We ran the check_database_schema.php script from the command line on both our staging and production environments. The script highlighted the following inconsistencies in the organizer module:

organizer
* column 'grade' has incorrect type 'N', expected 'I'
* column 'gradeaggregationmethod' has default '1', expected '0' (I)
* column 'userslotsmin' has default '1', expected '0' (I)
* column 'userslotsmax' has default '1', expected '0' (I)

These issues were found consistently on both installations.

While the schema issues are present in the organizer module, we haven't identified any direct correlation between these and the sporadic database connection errors. We are continuing to monitor the situation and would appreciate any further insights or recommendations you might have on resolving these schema issues or other potential sources of the problem.

We are ok with removing Organizer, it is not used.
The outage did not appear again since I have started my thread and What I did not expect, after turning on the debug, Moodle is faster than before.

Best regards,
Jiri

Re: Serious database preformace problems after upgrade

$
0
0
by Jiří Procházka.  

Hallo Howard,
that’s an interesting suggestion. While we haven't set up database sessions, we do have Memcached available on our server. Given that, we’re considering switching to Memcached for session handling to see if it alleviates the issues we’ve been experiencing.

The relevant section from our config.php, which is currently commented out.

Thank you for the insight!

Best regards,
Jiri

Re: Serious database preformace problems after upgrade

$
0
0
by Ken Task.  

Since that plugin isn't used, deleting it will remove schema checks issues.

How do you "performed an analysis and integrity check"?

Find any tables in need of optimizing?   If so and that was done, that could account for appearing to be faster.

It has dedicated space. ... does that mean it's a dedicated DB server?  If so, it's always been a recommendation to turn off 'networking' - has to do with DNS lookups on every query by a client (moodle code is a client).   And, if you install MySQLTuner, run it from both servers - web server (involves networking) and also from DB server itself.   You will get different recommendations.  Tuner, BTW, should be compat with MariaDB.

Also, you've mentioned MariaDB.  Does it now have TLS like MySQL 8?

'SoS', Ken

Re: Serious database preformace problems after upgrade

$
0
0
by Visvanath Ratnaweera.  

You might want to go through the starting points in the case of performance problems in the documentation: Performance and Performance FAQ.
 
There is a dedicated forum on Hardware and performance. This discussion might be ultimately moved to that forum. Normally it is a good idea to search the discussions there. But since timing has no correlation to anything, a systematic search is not possible.

Re: Serious database preformace problems after upgrade

$
0
0
by Howard Miller.  

Just to be clear... I meant DO NOT use the database for sessions smile

Memcached is a bit "old school". If you have a choice, use Redis. I would definitely switch to a proper cache (for caching, obviously I hope) and for sessions if you have the option. Do it anyway!

Re: MariaDB 10.6 support on Redhat

$
0
0
by Alain Raap.  

Hi Howard, thanks for the tip, we're not using Docker. But the problem is solved, so we can continue with the research for the next Moodle LTS (4.5) version

Re: How do I fix this "ERROR!!! The code you are using is OLDER than the version that made these databases!"

$
0
0
by Benoit Xavier.  

Thanks Howard! I was looking for an option to downgrade the DB. From what you have mentioned, there is none..

Moodle/Shibboleth integration.

$
0
0
by Jason Hiser.  

I have a fresh install of Shibboleth (both an identity provider 5 (IdP5) running Jetty and service provider 3 (SP3) with apache2 and shibd) and Moodle 4.3.5, all running on Jammy (Ubuntu 22).  Shibboleth is backed by accounts from a fresh Active Directory (on Win Server 2k222) install acting as an LDAP server.

I was able to configure Moodle to connect directly to AD/LDAP and let users log in.  But I want to use Shibboleth for easier extension when I end up changing away from LDAP, etc.  When I followed the Shibboleth README.txt, I ran into a variety of problems (e.g., the IDP wasn't exporting a user account to SAML properly, the SP wasn't forwarding that to the user properly, ...) but I've worked through those and am now pretty convinced that the SP is providing the right values for the Username variable (which I've set to sAMAccountName, as that's what I configured Shibboleth to forward from AD/LDAP).  When I try to login via auth/shibboleth/index.php, I'm immediately redirected to my IDP to enter credentials, which I can do successfully, and get redirected back to auth/shibboleth/index.php, which throws this error message at the user:

You seem to be Shibboleth authenticated but Moodle has no valid account for your username. Your account may not exist or it may have been suspended.

I have the `Name of the webserver Shibboleth environment variable that shall be used as Moodle username` field set to what I believe my SP is providing as the proper user name (sAMAccountName).  My SAML from the Shibboleth IDP at least has the property:

        <saml2:Attribute FriendlyName="sAMAccountName" Name="https://castle.os/attributes/sAMAccountName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue>colleenhudson</saml2:AttributeValue>

My SP also has the rules to send that to Moodle:

    <Attribute name="https://castle.os/attributes/sAMAccountName" id="sAMAccountName">
        <AttributeDecoder xsi:type="StringAttributeDecoder" caseSensitive="false"/>
    </Attribute>
        <AttributeRule attributeID="sAMAccountName" permitAny="true">
        </AttributeRule>

I've checked shibd and apache logs, and the HTTP console, and I'm not seeing any errors.  I'm out of ideas for what to look into next.  Any help would be appreciated.

Thanks!

-j

p.s.  I posted this in the authentication forum last week and haven't seen any replies.  I figure it maybe needed to be here as this is a fresh install.

Re: Moodle in docker environent

$
0
0
by Visvanath Ratnaweera.  

Hi

You are talking of two things, a) what is wrong with my Moodle in Docker? b) how should one run Moodle in Docker for production? Two topics are already far from the ideal one-topic-one-discussion style forum discussions here. And to which people contribute their solutions for _testing and development_ making it worse.

Trying to focus on your first topic, "a) what is wrong with my Moodle in Docker?", I see that your Nginx location is just /.php$ whereas Nginx talks of [^/]\.php(/|$) and ^(.+\.php)(.*)$. I never had to use the latter, the former always worked.

On your second topic, "b) how should one run Moodle in Docker for production?" I am too waiting for a convincing answer.

Re: Moodle/Shibboleth integration.

Re: Moodle in docker environent

$
0
0
by Howard Miller.  

I'm yet to encounter a large-scale, production version of Moodle running in containers. It doesn't mean it's not out there but people who are into that sort of thing tend not to share their experiences here.
 
However, a solid first step is surely getting it to work at all?

Re: Moodle/Shibboleth integration.

$
0
0
by Visvanath Ratnaweera.  

Do I understand you rightly: You run a MS Active Directory. You want to feed its user data in to Shibboleth IdP running Jetty. And you want your Moodle to be a SP talking to Jetty for authentication? No federation? Just an one-to-one IdP-SP? Both belonging to you? Isn't that an overkill?

Moodle works well as a SP for Shibboleth. Yeah, you need Shibd and the configuration is in /etc/shibboleth/shibboleth2.xml. Then there is this business of key-pair generation and exchanging with the IdP. Usually there is a federation behind the framework and its admins will tell you how to join. Without one you are on your own. This is not a topic that has been discussed often on moodle.org. I think you'll be better served in a Shibboleth forum.
 
P.S. This is indeed an Authentication question, but a rare one.
Viewing all 46954 articles
Browse latest View live


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