Installation does not complete 2.5.4 and 2.6

Installation does not complete 2.5.4 and 2.6

by todd vainisi -
Number of replies: 24

Hi Folks,
Please note - all the installations I mention are clean, new installs with empty database.

I can install and run Moodle 2.4 just fine.  When I try to install 2.5.4 (latest-25) or 2.6 it gets through setting up all the db tables then comes up with the screen where I should create the admin account and hangs.  It cannot display the form.  I just get the instructional text "On this page you should configure your main administrator account ..." but thats as far as it gets.  The page never finishes loading - the loading indicator never stops (in any of the 3 major browsers I tried).  I do a view source on the page, the source always stops while writing out jscript (between <script></script> tags).

I have met all of the requirements outlined in the installation list.

What the heck is going wrong??

Average of ratings: -
In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You need to run with Debugging on. The easiest way is to start again, create the config.php by hand (by copying config-dist.php). Edit the lines near the top for your system's setup. Find the debugging lines and uncomment them. Then go again. Do you get any extra errors or warnings displayed or logged?

You could also try the command line install instead?

What operating system is this?

In reply to Howard Miller

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Hi Howard,Thanks for the advice.  I will try reinstalling with debugging turned on.  I'm running CentOS 5.10.  I don't get any errors or warnings currently.  And again, the page doesn't break and report an error, it just continues trying to load to infinity.

 

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

It should be pretty straight forward on CentOS 5.10.   Nice to know what OS, but now one more question:  is this remotely hosted on a VPS or is it a shared hosting thang or ?   Do you have ssh command line access?

Really could be a browser time out issue.

Have you tried installing via command line?

After creating non-populated moodle25/6 DB (character set utf8 collate utf8_general_ci), manually creating a /var/www/[moodle25/6data?] directory and setting ownership/permissions to apache:apache for that directory, try the install from command line.

cd /var/www/html/moodle25/admin/cli/

php install.php

That will begin installation in the interactive mode.   You will be prompted for giving values ... the same items one sees in the web based forms.

'spirit of sharing', Ken

 

 

In reply to Ken Task

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Hi Ken,

Its not a shared host.  It's merely co-located. I ran from the installer line and it completes the install.  However, when i hit the web site, it still hangs at the same place - trying to display the admin user form.  Also, when I show source, I see a script from the formslib.php that never completes.

I can now get to pages that don't call the forms library.  Very weird.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

the jscript php never finishes pushing out is qf_errorHandler.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

Well, sounds like we are making some progress! ;)

Do we have any PHP extensions installed that might be related to the issue?  suPHP or something like it?

php -m [ENTER] will show all modules/extensions loaded

php -i [ENTER] (is a command line version of phpinfo.php file.   Will show how compiled as well as extensions loaded + settings)   Don't need the output of that here, but we are looking for something like suPHP, etc..

Have you checked logs: /var/log/httpd/error_log or /var/log/messages

Before attempting access this next time, clear any cookie for the Moodle site(s) in your local browser and clear browser cache of all that it contains.

Edit the config.php file and add this line:

$CFG->dbsessions='0';

On your next attempt at logging on, one should see a 'sessions' directory created in moodledata.

The line tells Moodle not to use the DB for session information - which, at this point, probably has in-correct information recorded for the admin user.

Have to ask one more question ... how are you attempting to install?   The 'long way' or, since you have ssh access/are colocated installing code via git?

http://docs.moodle.org/26/en/Git_for_Administrators

Think I'd install code via git as that would make it very easy to get fixes and patches (updated code) as well as upgrade to the next version when released.

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

I don't use the git repo for moodle, though I do use it for my own projects.  I suppose I should consider switching.

I added the dbsessions line and purged my browser history, cache, and cookies.  Again though, I can log in ok, but after login you are dropped on front page - if you click to go anywhere from there, it immediately takes you to the admin user update form where it gets stuck.

I looked for this extension called suPHP but a find on the output of both php -m and php -i does not find it.  There is, however, a file called suphp.conf in /etc/.

This machine runs interworx as my management software. I wonder if that could have anything to do with it, though as I said, I've been running interworx for 7 years with moodle and have never had problems of this type before.

I'm really stumped.  All this so I can use the bootstrap themes!

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Annalise Duca -

I have a very similar issue with Moodle 2.6.1...I cannot seem to be able to install it and I keep having different errors - such as:

Installation

System

Unable to acquire a lock for caching.

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

Debug info:
Error code: ex_unabletolock
Stack trace:
line 159 of /cache/locks/file/lib.php: cache_exception thrown
line 104 of /cache/locallib.php: call to cachelock_file->lock()
line 438 of /cache/locallib.php: call to cache_config_writer->config_save()
line 275 of /cache/disabledlib.php: call to cache_config_writer::create_default_configuration()
line 573 of /cache/classes/helper.php: call to cache_factory_disabled->create_config_instance()
line 1366 of /lib/moodlelib.php: call to cache_helper::update_site_identifier()
line 135 of /lib/db/install.php: call to set_config()
line 1474 of /lib/upgradelib.php: call to xmldb_main_install()
line 230 of /admin/index.php: call to install_core()

 

I cannot find anything on forums - I have started a forum too - explaining exactly what is happening https://moodle.org/mod/forum/discuss.php?d=254781

 

In reply to Howard Miller

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Well shucks.  Adding debugging lines to config.php has not solved the problem.  I doubted it would, as the debug messages usually appear after a php error has happened and a page has aborted/quit/finished.  But my pages are just running endlessly without ever erring out.

 

I don't get it.  This should be a homerun for the moodle installer.  I'm not adding any plugins or irregular setup steps.  I did see that my memory_limit was set quite low in php.ini so I bumped that up to 256.

I don't think its db related, since it has no trouble generating all the tables (though it takes a few minutes).

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Doesn't make sense to me. Pages cannot run for ever - there are limits in PHP to stop that. 

Running with debugging on was never intended to fix the problem - it was supposed to (hopefully) identify the problem. Have you checked your web server error log?

In reply to Howard Miller

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Apologies - I know merely turning debugging on doesn't fix anything - but an error message usually provides the basis for the solution (since the problem can be identified).

I know it sounds impossible, and my experience is that pages should time out as well.  But Moodle 2.5-2.6m pages running from my CentOS system don't.  In each of the major mac browsers, its the same, firefox, chrome, safari.  Page never completes and never says finished loading.

What is most bizarre to me is that moodle 2.4 runs just fine.  What is the sticking point between 2.4 and 2.5?

Also, no, there are no errors in my webserver error log pertaining to the time periods that I have been trying to install moodle.  There is no indication of what the problem is ANYWHERE that I can find.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

Well, we've done quite a bit of fishing without some specific information ... other than OS.

Don't think it would be a security risk if you were to share at least the domain of the server.  Those of us, going the 'extra mile', could then do some checks from another location other than your workstations.Anything of a security issue found could be discussed in IM or directly via EMail.

What does top look like?
(the Mem: and Swap: lines of top output)

What does apache config look like?
/usr/sbin/httpd -t (checks config for syntax)
/usr/sbin/httpd -V (shows apache info + compiled with)

What does:
fgrep KeepAlive httpd.conf
show?

Networking comes before application.
That also includes DNS in this case.

So are the various versions of Moodle you are attempting to install in a virtual apache ... i.e., another FQDN?  Or are they in a subdirectory of a single FQDN?

Are there any issues with DNS lookups.   
From server: dig [your_domain] (see if it can find itself)

Use some DNS tool from a workstation.

Is server experiencing dropped packets?
From workstation, do a trace route to the server.   Acceptable times and routes?  Or do you get loops?
Can you do a constant ping from workstation to server?
Is output consistent or do you get jumps in ms times?

Install iptraf
yum -y install iptraf
Note: might have to install ncurses.x86_64 ncurses-devel.x86_64 to get iptraf to run in terminal window.


Run it.  No special tweaks/options.  We'll be looking at port 80 stuff.
Access the 24 site that's working and watch the iptraf window for issues related to packets/bytes, etc..

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Thanks for not giving up on me, Ken.  I don't mean to be withholding any information. 

I don't mind exposing the address, its just my test setup place anyway.

http://test.authenticeducation.org

username: admin
password: 

 Mem:  14434304k total,  6943676k used,  7490628k free,        0k buffers
Swap:        0k total,        0k used,        0k free,  1071960k cached

Result of httpd -t is Syntax Ok

Result of httpd -V:

Server version: Apache/2.2.26 (Unix)
Server built:   Dec 12 2013 09:38:01
Server's Module Magic Number: 20051115:33
Server loaded:  APR 1.3.12, APR-Util 1.2.7
Compiled using: APR 1.3.12, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

 

 


Howard I'm just gonna destroy this whole install in a day.

 

(Edited by Howard Miller to remove password - original submission Thursday, 20 February 2014, 10:15 PM)

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Don't post password. If someone wants to help, fine, but please send by PM.

In reply to Howard Miller

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -
This install is for practice and will be gone in a day so it didn't seem like there would be a problem. I guess there are other security implications.
Average of ratings: Useful (1)
In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Let's just call it a bad habit to get into wink

Average of ratings: Useful (1)
In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks, Howard, for removing info.

Ok, did some constant pings and traceroutes to FQDN and IP address of server.

Shows TimeWarner IP.   Are you running this server off a home connection?

The traceroutes did some ... shall we say 'returns' in routing.   Something like this:

 8  xx-xx-xx-xx.static.twtelecom.net (IPaddress)  85.549 ms
    gso1-ar1-xe-0-0-0-0.us.twtelecom.net (66.192.241.42)  72.875 ms
    sameasxxxabove.static.twtelecom.net (sameIP)  81.272 ms
 9  sameasxxxabove.static.twtelecom.net (sameIP)  74.199 ms
    97.x.x.x (97.x.x.x)  75.429 ms
    sameasxxxabove.static.twtelecom.net (sameIP)  72.853 ms

Typically, one sees only one IP address/device at each hop (the numbers 8,9, etc.)

Now would that be enough to confuse a browser?   Maybe.

Did you try any iptraf?

Could access site and could login as guest.

Soooooo .... now what's the problem again?????

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

I'll check with my co-locator about the strange tracerouting... I saw some slightly weird things too.  I know it co-located in the Time Warner hub building in North Carolina.

In any case, I run many sites off that server (including a moodle 1.9 install that I've been trying to upgrade for, oh, 3 years but theres just too much legacy stuff in it to move it forward) and I don't think that sort of thing is the problem.

Again, the site fails whenever it has to display a form.  You can login fine (though you won't be able to do anything as a guest) but, for example as an admin, you are required to update other information in the admin account after the install.  Moodle cannot load that admin account form.

The way I originally discovered this was I upgraded a 2.4 instance to 2.5.  I thought everything was fine because I could see my course listings and login and such.  But then when I tried to do anything involving a form the site broke in much the same way - endlessly waiting for page to complete (I can wait on it for 20 minutes and it doesn't finish or throw a gateway error or any other error and the browser's loading icon never stops running and it doesn't display the form, only the heading of the form).

As I've mentioned in previous posts, it cuts out right in the middle of writing out a script from the formslib.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

In the config-dist.php file there is this:

//=========================================================================
// 5. DIRECTORY LOCATION  (most people can just ignore this setting)
//=========================================================================
// A very few webhosts use /admin as a special URL for you to access a
// control panel or something.  Unfortunately this conflicts with the
// standard location for the Moodle admin pages.  You can work around this
// by renaming the admin directory in your installation, and putting that
// new name here.  eg "moodleadmin".  This should fix all admin links in Moodle.
// After any change you need to visit your new admin directory
// and purge all caches.

$CFG->admin = 'admin';

Wonder if that's the issue ... add the above $CFG line to your config.php file.

Also, are there any .htaccess files?

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

I tried editing that line, but it only cause things not to work at all.

This is the page the site gets stuck on, on first login after an install.  As I said, it will get to the authenticated front page and seem fine.  However, when you click to go anywhere, it redirects to an edit user form (probably to get the missing info about the admin user).

Here is where it gets stuck: http://test.authenticeducation.org/user/edit.php?id=2&course=1

Here is the source of that page (after forcing it to stop loading, because it won't stop on its own):
http://test.authenticeducation.org/viewsource_m254.html

You'll notice the output stops in the middle of a script that gets output from /lib/formslib.php - its a big output statement that starts on line 2139 ($js = '...).

Its hard for me to believe that this isn't important information.

Also, no, no .htaccess file.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

I give up!  Rolling back to 2.4.  Thanks for all the suggestions.

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by Ken Task -
Picture of Particularly helpful Moodlers

Sigh!  Seems I've also failed! sad   Mind IM'ing me the admin login and password?

Just ran firebug in FireFox and accessed your site.   No issues.   But you say it happens only after logging on and it appears to be attempting to direct to the admin user profile.   When that occurs, BTW, there is some data that moodle requires missing from the DB, usually.  But you say  your browser never gets all files.   Have you installed FireBug in your FireFox and tried logging onto the Moodle?  FireBug will show specifics.

I run a CentOS 5.10 server that has multiple instances of Moodle running on it ... 24, 25, and 2.6.  So I know the OS can do ... if PHP, MySQL, memory/free space requirements are met.

And here's an offer you might not refuse ... IM me ssh root access and I'll do my best to fix it ... for FREE ... that offer NOT good for anyone but you!  It's a matter of man over machine! ;)

'spirit of sharing', Ken

In reply to todd vainisi

Re: Installation does not complete 2.5.4 and 2.6

by todd vainisi -

Okay lookers, with special thanks to Howard and Ken who walked a mile in my shoes, I took care of this by upgrading my php to 5.5. 

The installer said my php was adequate (I had 5.3.?), but I noticed in different thread (remarkably it was a thread where Ken was trying to get opcache installed on CentOS 5) that said that upgrading to 5.5 solves many ills.
After upgrading php, the installer immediately worked, all the way, and the other errors on first login disappeared too.  I think Moodle should consider more strongly encouraging php 5.5.