Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 26, 2019 11:00 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 2:57 am 
Offline

Joined: Mon Jan 14, 2019 2:54 am
Posts: 10
My upgrade from 1.1.38 to 1.2.0 freezes with this on webui:
Code:
Installing Cacti Server v1.2.0
Your Cacti Server is now installing

Refresh in       ProgressLast updated: 09:51:19
   
0 %
2019/01/14 09:51:19 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547452279.1488
2019/01/14 09:26:18 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547450778.7475
2019/01/12 19:04:18 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547312658.0686
2019/01/12 18:39:17 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547311157.1965
2019/01/12 18:14:17 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547309656.9957
2019/01/12 17:49:15 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547308155.3476
2019/01/12 17:24:14 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547306654.1411
2019/01/12 16:59:12 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547305152.6487
2019/01/12 16:34:11 - INSTALL: always: Spawning background process: /usr/bin/php /usr/share/cacti/site/install/background.php 1547303651.3062


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 6:12 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2419
Can you edit cli_check.php and change the following:
Code:
diff --git a/include/cli_check.php b/include/cli_check.php
index 9342fdca..b4204c28 100644
--- a/include/cli_check.php
+++ b/include/cli_check.php
@@ -23,7 +23,7 @@
*/

/* do NOT run this script through a web browser */
-if (!isset($_SERVER['argv'][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+if (php_sapi_name != 'cli') {
        die('<br><strong>This script is only meant to run at the command line.</strong>');
}

I suspect that for some reason your server is setting $_SERVER['REQUEST_METHOD'] and $_SERVER['REMOTE_ADDR'] at the cli which is weird.

Can you tell me the OS and PHP version?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 7:34 am 
Offline

Joined: Mon Jan 14, 2019 2:54 am
Posts: 10
netniV wrote:
Can you edit cli_check.php and change the following:
Code:
diff --git a/include/cli_check.php b/include/cli_check.php
index 9342fdca..b4204c28 100644
--- a/include/cli_check.php
+++ b/include/cli_check.php
@@ -23,7 +23,7 @@
*/

/* do NOT run this script through a web browser */
-if (!isset($_SERVER['argv'][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
+if (php_sapi_name != 'cli') {
        die('<br><strong>This script is only meant to run at the command line.</strong>');
}

I suspect that for some reason your server is setting $_SERVER['REQUEST_METHOD'] and $_SERVER['REMOTE_ADDR'] at the cli which is weird.

Can you tell me the OS and PHP version?

I make changes in /usr/share/cacti/site/include/cli_check.php but it doesn`t help.
os:
Code:
Linux renegade 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
php7.2


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 7:46 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2419
Which release of ubuntu is this?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 10:35 am 
Offline

Joined: Mon Jan 14, 2019 2:54 am
Posts: 10
netniV wrote:
Which release of ubuntu is this?

Its a desktop test machine:
Code:
lsb_release -a
No LSB modules are available.
Distributor ID:   LinuxMint
Description:   Linux Mint 19 Tara
Release:   19
Codename:   tara


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 10:36 am 
Offline

Joined: Mon Jan 14, 2019 2:54 am
Posts: 10
renegade310 wrote:
netniV wrote:
Which release of ubuntu is this?


Its a desktop test machine:
Code:
lsb_release -a
No LSB modules are available.
Distributor ID:   LinuxMint
Description:   Linux Mint 19 Tara
Release:   19
Codename:   tara


And, in adress bar, I got this strange link:
Code:
http://127.0.0.1/cacti/install/install.php?data={"Step":"97","Eula":"1"}


Last edited by renegade310 on Mon Jan 14, 2019 10:39 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 10:38 am 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2748
Location: B/CS Texas
What browser, and do you have any addons disabling javascript?

_________________
Report a bug
Download Releases
1.X Compatible Plugins


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 11:41 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2419
renegade310 wrote:
And, in adress bar, I got this strange link:
Code:
http://127.0.0.1/cacti/install/install.php?data={"Step":"97","Eula":"1"}

That's not a strange link, that's expected :)

Step 97 means begin installation. Eula 1 means you accepted our license terms. It does sound like the installer is not spawning the background exec. I will have to try and get a version of Mint going to see if I can spot the obvious.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Mon Jan 14, 2019 12:55 pm 
Offline

Joined: Mon Jan 14, 2019 2:54 am
Posts: 10
cigamit wrote:
What browser, and do you have any addons disabling javascript?


Google chrome, no adds that can disable js.


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Tue Jan 15, 2019 2:50 am 
Offline

Joined: Wed Mar 02, 2011 9:02 am
Posts: 21
I have got exactly the same error (complete replicate on all messages described above) on a completely different system (Synology NAS running Linux Kernel Version 3.10.105 / Synology 6.2 GM-23824).

I tried to update from a fully working cacti v1.1.38 to v1.2.1


Top
 Profile  
 
 Post subject: Re: Upgrading from 1.1.38 to 1.2.0 fails
PostPosted: Tue Jan 15, 2019 4:45 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2419
This may be related to a CLI issue that has come to light where some people have WEB-based information appearing in their CLI environments of PHP. For example, in another post on here about being unable to update the PHP location, someone sent me their installation logs and then when he applied a temporary code change for debugging purposes we found that $_SERVER['REQUEST_METHOD'] and $_SERVER['REMOTE_ADDR'] where both being set.

That is highly unusual from a CLI point of view because there is no REQUEST_METHOD since it isn't a HTTP request, and the REMOTE_ADDR is not normally set as that is normally the client address. But a CLI doesn't consider itself a client/server environment so again should not be set.

I am about to push some changes to our latest development code to correct the issue. We then need to run through a bunch of tests to ensure that the change is OK. It does seem to be specific environments only though and not a general issue making me think it's a configuration or environmental option that's causing the above weirdness.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: cuongnt and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group