Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation progress stays at 0% #2304

Closed
WirthmU opened this issue Jan 13, 2019 · 11 comments
Closed

Installation progress stays at 0% #2304

WirthmU opened this issue Jan 13, 2019 · 11 comments
Labels
bug Undesired behaviour resolved A fixed issue

Comments

@WirthmU
Copy link

WirthmU commented Jan 13, 2019

I am updating from a fully working v1.1.38 on a Synology NAS to the latest V1.2.1. The update process works fine until I start the cacti website on the server to finalize the installation (cacti server installation wizard). The progress bar stays at 0% and installation goes forever without any result.

Browser command line says:
http://192.168.1.136/cacti/install/install.php?data={"Step":"97","Eula":"1"}

@cigamit
Copy link
Member

cigamit commented Jan 13, 2019

You must have some issue on the php/apache backend. I would check the Apache error_log. Can you follow this issue on the forums though. Thanks.

@cigamit cigamit closed this as completed Jan 13, 2019
@netniV netniV reopened this Jan 15, 2019
@netniV
Copy link
Member

netniV commented Jan 15, 2019

I have re-opened this issue as we now believe that this issue may be related to the CLI detection code and some environments incorrectly populating the $_SERVER variable with REMOTE_ADDR and REQUEST_METHOD despite the command being run from the command line.

@netniV netniV changed the title installation goes on forever Installation progress stays at 0% Jan 15, 2019
netniV added a commit that referenced this issue Jan 15, 2019
This commit corrects a previous unseen issue where the PHP environment at command line level is being populated with environment variables normally only seen when called from a web server.

issue#2304: Installation progress stays at 0%
issue#2311: Unable to update PHP location during installation due to incorrect CLI environment

The new check uses the php_sapi_name() function to verify that we are indeed at 'cli' level.  All other values returned by php_sapi_name are considered non-cli including 'cli-server' which is for client/server scenarios.

Most checks have now been replaced by a single defintion ('CACTI_CLI') to define whether in CLI mode.  If a script is only to be called from CLI it must either defined 'CACTI_CLI_ONLY' or include include/cli_check.php instead of include/global.php.
@netniV
Copy link
Member

netniV commented Jan 17, 2019

As part of #2315 I have updated the code to provide better detection of invalid scenario's. If possible, could you update to the latest develop code and see if that works for you?

@netniV netniV added bug Undesired behaviour resolved A fixed issue labels Jan 17, 2019
@netniV
Copy link
Member

netniV commented Jan 19, 2019

@WirthmU have you had a chance to review these changes?

@WirthmU
Copy link
Author

WirthmU commented Jan 20, 2019

Yes - I did a complete re-install on my Synology.

Unfortunately it is even worse since it already give an error message right at the license agreement page where I can choose language and default theme:

When I confirm the setting it says:
Action failed
Error 200 OK
Reason: The response to the last action was unexpected

@netniV
Copy link
Member

netniV commented Jan 20, 2019

Can you see if there are any errors in your web/cacti log ? That usually means that for some reason JSON isn't being returned and since the javascript code is issuing a JSON call, it bugs out.

@WirthmU
Copy link
Author

WirthmU commented Jan 20, 2019

The cacti_stderr.log shows:

  • the PHP MySQL module is installed and enabled.
  • the database is running.
  • the credentials in config.php are valid.
    FATAL: Connection to Cacti database failed. Please ensure:

@netniV
Copy link
Member

netniV commented Jan 20, 2019

Sorry, that seems to be either cut off or badly formatted. Any change you can let me have the cacti.log, and cacti_stderr.log ? Also, if you have an error log for the web server (eg, apache or ngix) that would also be good.

If you'd like to keep those private, email them to developers@cacti.net and I will take a look to see if I can spot anything obvious.

@netniV
Copy link
Member

netniV commented Jan 20, 2019

So, you appear to have a few errors occurring here, but the important one I think is:

sh: -q: command not found

This suggests that it failed to find a PHP location via the read_config() function. Normally, that setting is either missing from the DB or set to a valid PHP location. In your case, it appears to be empty, not missing (or at least the function is returning that).

Try running the following:

whereis php

Then update the DB with the correct location:

replace into settings (‘path_php_binary’, ‘<above location>’)

If that works, we may have to do some magic in the next release.

@TheWitness
Copy link
Member

TheWitness commented Jan 20, 2019

@WirthmU, I'm pretty familiar with the Synology as I have a DS1515+. I went through the process of setting up the Web Station and the various PHP and Apache versions available from the Download Center.

The real problem with getting Cacti up on the Synology right now is that it has a core dependence on PHP5.6 (which is basically EOL by the way). You can install PHP7 and PHP72, but only PHP7 can be used for the Web Station.

The problem with the PHP7 is that it currently does not contain all the modules required for Cacti to operate well. The PHP72 version that they allow you to download has everything, but does not work with the Web Station.

Reading on the Synology forums, it would appear that there will be a release of DSM7 sometime this year (hopefully Q1) that should start to use PHP72 as the core PHP version. Once that happens, Cacti should play real well on the device. I'm looking forward to it actually.

There are other package managers available for Synology, but I personally won't go there. I would suggest that you are pushing on a string right now. Better wait it out for a bit. Go get a Raspberry Pi in the mean time.

@cigamit cigamit closed this as completed Jan 27, 2019
@WirthmU
Copy link
Author

WirthmU commented Jan 28, 2019 via email

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants