Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-2969

Moodle.net hub is failing to take into account ipv6 address lengths

XMLWordPrintable

      Just ran the cron on moodle.net since it was moved to it's new home and found the following error message in the cron error log:

      An error occurred during registration update on "Moodle.net" (Error writing to database | DEBUG INFO: Data too long for column 'ip' at row 1
      UPDATE mdl_hub_site_directory SET name = ?,description = ?,contactname = ?,contactemail = ?,contactphone = ?,imageurl = ?,privacy = ?,language = ?,url = ?,users = ?,courses = ?,street = ?,regioncode = ?,countrycode = ?,geolocation = ?,contactable = ?,emailalert = ?,enrolments = ?,posts = ?,questions = ?,resources = ?,participantnumberaverage = ?,modulenumberaverage = ?,moodleversion = ?,moodlerelease = ?,badges = ?,issuedbadges = ?,ip = ?,deleted = ?,timemodified = ? WHERE id=?
      [array (
      0 => 'Moodle.net',
      1 => 'Moodle.net (formerly known as MOOCH) connects you with free content and courses shared by Moodle users all over the world.  It contains: ^M
      ^M
      courses you can download and use^M
      courses you can enrol in and participate^M
      other content you can import into your own courses^M
      ^M
      ^M
      Follow @moodlenet for updates ',
      2 => 'Moodle.net Administrator',
      3 => 'mary@moodle.com',
      4 => '',
      5 => '',
      6 => 'notdisplayed',
      7 => 'en',
      8 => 'http://moodle.net',
      9 => 52908,
      10 => 0,
      11 => '',
      12 => '-',
      13 => 'AU',
      14 => '',
      15 => 0,
      16 => 1,
      17 => 46422,
      18 => 0,
      19 => 0,
      20 => 0,
      21 => 0,
      22 => 0,
      23 => '2013051400',
      24 => '2.5 (Build: 20130514)',
      25 => 0,
      26 => 0,
      27 => '2a01:4f8:201:2028:0:0:0:2',
      28 => 0,
      29 => 1397103371,
      30 => '42301',
      )] | ERRORCODE: dmlwriteexception)
      Finished registration update on hubs.

      This indicates that the hub site directory table schema needs to be modified to allow 128bit address lengths (ipv6).

      I'm actually surprised this hasn't been brought up before, considering a significant amount of educational institutions are using ipv6 in production environments (and have been for quite a while).

      Either way, just need to update the database and all should be good.

      One hopes that Moodle it's self is able to cope with these address sizes and syntax too (I've not seen any evidence to the contrary as yet).

      Matt

            nebgor Aparup Banerjee
            mspurrier Matt Spurrier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.