Installation must be finished from the original IP address, sorry.

Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -
Number of replies: 17

Hi there,

 

I 've unsuccessfully tried several attempts to solve this based on evrerything I've read in foruns.

Could someone please help me?

Moodle2.6

php version 5.3.25

 

Thanks,

Julio

Average of ratings: -
In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Ken Task -
Picture of Particularly helpful Moodlers

Other than starting over (and if doing the web based installation, making sure you have a good connection ... ie, it won't drop), how about doing the installation from the command line in an ssh shell session to server.  You've not mentioned your set up but if Linux and one can access the server via ssh, one can install via command line:

cd moodlecodefolder/admin/cli/

php install.php

You will be prompted for values ... like site URL, DB server,DB user, DB password so have all your pre-setup info handy.

The command line is not subject to browser issues and other settings in php for the apache server.

'spirit of sharing' Ken

 

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Hi Ken,

No I cannot have access the server via ssh.

I had to install Moodle using install.php

System Information

SettingValue
 
PHP Built On Linux lamp15.cloudaccess.net 2.6.32-458.18.1.lve1.2.39.el6.x86_64 #1 SMP Mon Sep 16 12:10:28 EEST 2013 x86_64
Database Version 5.5.33-cll-lve
Database Collation utf8_general_ci
PHP Version 5.3.25
Web Server Apache

Do you think I am in a tight spot and won't get to solve this issue?

Thanks,

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

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

I would start by asking your hosts/ISP why your IP keeps changing. You might be unlucky and the DHCP refreshes once but it shouldn't be a regular problem.

In reply to Howard Miller

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Hi Ken,

I did what you suggest.

Here is their answer:

Your site has static IP, but it is shared for multiple other sites that are on the same server.

The notice about original IP address might be actually referring to your end - your computer's IP might have changed during the installation process. It is common with 3G/4G GSM connections, and also with ASDL modems. You might need to check if it's possible to resume the installation process even if the IP changed, or, of not, restart installation.

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Ken Task -
Picture of Particularly helpful Moodlers

'Their answer' must be providers, right?   Howard does have an idea there.   But, I've never had the issue arise and I've done many many installs - but I've never quit an install once beginning the process and always use a connection that is reliable when installing.  Trust you are using a computer and not a handheld/tablet or other device.

Still though, have never found where this requirement is kept ... maybe sessions table of the DB.   So minimally, one might be able to 'restart' the install by dropping the DB and re-creating an empty DB (with proper character set and collation, user etc.).

Since you've not had a chance to actually begin development there is nothing to loose by trying that.

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

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

The previous IP is stored in the admin user's field in the user table - in the field 'lastip'. This is compared with the current ip in admin/index.php round about line 600. 

If you are sure they installation has not been hijacked you could just comment out those three lines. 

In reply to Howard Miller

Re: Installation must be finished from the original IP address, sorry.

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks!  Now we know! ;)

Line 463 and 464

        if ($adminuser->lastip !== getremoteaddr()) {
            print_error('installhijacked', 'admin');

But even if commented out, couldn't that 'upset' the installation?  Just wonderin' ... not really asking.

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

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

Not if the message is spurious for some reason. If..... wink

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Ken Task -
Picture of Particularly helpful Moodlers

Not familiar with cloudaccess but they appear to be Joomla hosters under RHEL 6.   Moodle 2 is resource hungry ... more so than Joomla (I also run joomla's as front ends to Moodle and as backends for multimedia so have experience with both).

Can you increase php variables ... time for a script to run, memory a script can use?   If so, increase them X 2.

Then, try this: http://yoursite/moodle/admin/purgecaches.php

Clear browser (use FireFox) cache and cookies for the site.

Then try it again (TIA) by the servers fully qualified domain name.

If that still won't do ... using whatever you have to browse files, go to:

/moodledata/cache/cachestore_file/default_application/

and manually remove any folders/files found there.  This is what the purgecaches.php is supposed to do.

Again, clear browser cache/cookies and TIA.

If that fails, reinstall from scratch ... everything, including the DB.  Sorry. :|

'spirit of sharing', Ken

 

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Thanks Ken

I've done everything you've suggested. 

What I have to say is:

I am going  to reinstall from scratch.

I will tell you if it works

Thanks, 

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Hi Ken,

I have to figure out another solution. I have a dynamic IP address in my ISP not in my site.

When I start installing Moodle I have one IP, during the installation it changes. So, I will never have the same IP address. This is what is blocking to finish installation. Moodle wants the IP address of my ISP when it start installing.

Therefore, there must be another solution in Moodle to complete installation independently the IP address.

I would appreciate If you could help me to figure out it.

 

Thanks,

 

Julio

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Ken Task -
Picture of Particularly helpful Moodlers

Mentioned before that I've never found where Moodle actually stores that information on a failed/interruputed install.  My best guess would be in the sessions table for I don't think it writes to any file one could remove or it's totally in memory and thus can't be changed.

Your ISP will have to do something about this if your IP changes during such installs.   The install itself shouldn't take very long.  OR, gain ssh access to server where the install script is run from the server itself.   Or, install from another location.

Maybe someone from Moodle HQ (a true programmer of Moodle) would take pity and disclose.

OR, and this is a lot more work.   Install a local version of Moodle - should be no change of IP then.   After local installation is successful, one would have to migrate the local site to the server.

http://docs.moodle.org/22/en/Moodle_migration

But that might be a little too much! :\

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Hi Ken,

I think this is the last resource.

I have moodle installed in locolhost and it works, no problem.

I am going try it. I don't have choice.

Let's see what I Can get.  

Julio

In reply to Ken Task

Re: Installation must be finished from the original IP address, sorry.

by Brian Yare -

Just a thought - would an intermediate product such as http://www.expatshield.com/ help by providing a fixed IP address? I have not tried it for this purpose, but it might be worth investigating (and it is free)

Brian

In reply to Brian Yare

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

Hi Ken,

 

Thank you for the suggestion.

I am affraid it won't work. I've checked and found out  that my IP address haven't changed while I was installing. So, I think something bizarre has been taking place in Moodle.

Thank you for your time, help and cooperation. It makes world much better.

I am going now to proceed with Moodle migration. I am going to it step by step in order not to something wrong accidentally.

If Moodle migration works, and I hope so, I am going to tell you here so, everyone else can do the same just in case being in the same spot.

Thanks

Julio

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

I am sorry Brian,

I type Ken instead of Brian in the greeting.

 

I thank you Brian and Ken for having patient trying to help me.

 

Let's see the aftermath of migration.

 

Thanks,

In reply to Julio Cesar Figueiredo

Re: Installation must be finished from the original IP address, sorry.

by Julio Cesar Figueiredo -

I am glad to say that Moodle migration worked.

 

I would like to thank Brian and specially Ken who gave me lots of suggestions including the one which solved the issue.

If someone  has been experiencing such an error I had, could try the same solution. Install moodle in localhost, and after that migrate it to your site.

A piece of advice!: In order not to have much work, just install moodle and migrate it without creating courses or edit code. Let it to do after moodle has already migrated to your site. It turn the migration task easier.

That's all.

Thanks,

Julio

Average of ratings: Useful (1)