Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Moodle
  3. Moodle broken after Cloudron update – OAuth2 plugin causing SQL errors

Moodle broken after Cloudron update – OAuth2 plugin causing SQL errors

Scheduled Pinned Locked Moved Moodle
5 Posts 2 Posters 182 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RoloufGoudebin
    wrote last edited by RoloufGoudebin
    #1

    Hi all,

    Since the automatic Moodle update via Cloudron last night, my Moodle instance won’t start. The healthcheck fails (ECONNREFUSED), and PostgreSQL logs show repeated errors like:

    2025-10-06 12:48:40.132 UTC ERROR: syntax error at or near "," at character 170
    STATEMENT: INSERT INTO mdl_oauth2_endpoint (issuerid, name, url, usermodified, timecreated, timemodified)
    VALUES (1, 'authorization_endpoint', 'https://my.ciamtc.com/openid/auth', , 1759754919, 1759754919)
    

    It seems Moodle is trying to insert an OAuth2 endpoint with an empty usermodified field, which produces a syntax error in PostgreSQL.

    I’ve already tried:

    Restoring the Cloudron DB backup

    Running SQL fixes manually

    cloudron repair

    … but nothing works. The problem seems to be with the OAuth2 plugin code deployed with the update, not the DB itself.

    Has anyone else experienced this issue after the Cloudron update? Any ideas on how to start Moodle without breaking the DB?

    Thanks in advance!

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RoloufGoudebin
      wrote last edited by
      #2

      Hi again,

      I’ve tried installing Moodle on another Cloudron instance, but it doesn’t work either. Even with a fresh setup, the installation fails the same way as on my other instance.

      It seems the issue is not limited to a single server, so it might be related to the recent update or the packaging itself.

      Thanks!

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ccfu
        wrote last edited by
        #3

        You said you tried to restore the DB backup. Why not restore the whole backup taken before the update? You can then clone the instance and test and once the problem is resolved update the production instance. Just make sure you deactivate automatic updates.

        For what it's worth, we don't use the Oauth plugin though it is installed and there were no issues with the update to 5.0.3.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RoloufGoudebin
          wrote last edited by
          #4

          Thank you for your answer. I tried to clone the version before the update but I have this error in logs :

          => Healtheck error: Error: connect EHOSTUNREACH 172.18.19.202:8000
          Oct 06 23:10:53 => Healtheck error: Error: connect EHOSTUNREACH 172.18.19.202:8000
          Oct 06 23:11:03 => Healtheck error: Error: connect EHOSTUNREACH 172.18.19.202:8000
          Oct 06 23:11:13 => Healtheck error: Error: connect EHOSTUNREACH 172.18.19.202:8000
          Oct 06 23:11:14 DELETE 0
          Oct 06 23:11:14 ERROR: syntax error at or near ","
          Oct 06 23:11:14 LINE 1: ...n_endpoint', 'https://my.example.com/openid/auth', , 17597850...
          Oct 06 23:11:14 UPDATE 1
          
          1 Reply Last reply
          1
          • R Offline
            R Offline
            RoloufGoudebin
            wrote last edited by
            #5

            Hello,

            I finally managed to solve the issue as suggested above. I installed a second instance, which ended up working, then created a backup of version 3.1.3 (the one that wasn’t working) and imported that backup into the new instance.

            Thanks for your help!

            1 Reply Last reply
            3
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search