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

core:archive does not work on Solaris #7054

Open
mkobel opened this issue Jan 20, 2015 · 12 comments
Open

core:archive does not work on Solaris #7054

mkobel opened this issue Jan 20, 2015 · 12 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@mkobel
Copy link

mkobel commented Jan 20, 2015

The command ps ex (in core/CliMulti/Process.php in Method isProcessStillRunning) cannot be executed on Solaris.
Changing this command to ps -e it works.

@tsteur
Copy link
Member

tsteur commented Jan 20, 2015

It used to use -e but the dash was removed while working on #5842 see ca84f22

@diosmosis do you remember why it was removed? If we have to execute it this way maybe we could run ps ex first and if it fails use ps -ex?

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 20, 2015
@mnapoli
Copy link
Contributor

mnapoli commented Jan 20, 2015

Could we consider using something like Symfony's Process? Or is there a particular reason we don't use it? They seem to have an alternative solution using proc_get_status(), that would (hopefully) prevent us maintenance and bugfixes like this.

@tsteur
Copy link
Member

tsteur commented Jan 21, 2015

Probably not, the latest version requires PHP 5.5.9

@diosmosis
Copy link
Member

There was an issue w/ using '-...' on BSD. I can't quite remember what happened, but wikipedia says "Most systems derived from BSD fail to accept the SUS and POSIX standard options because of historical conflicts (for example, the "e" or "-e" option will cause the display of environment variables)." [1]. Sounds familiar.

[1] http://en.wikipedia.org/wiki/Ps_%28Unix%29

@mnapoli
Copy link
Contributor

mnapoli commented Jan 21, 2015

Symfony 3 will require 5.5, but Symfony 2 requires 5.3.3.

@tsteur
Copy link
Member

tsteur commented Jan 21, 2015

We could give it a try then. We don't use it much so would be easy to replace for a test although there are a few warnings in the docs to consider which makes it maybe a bit more work. How long will they support Symfony 2? I'm pretty sure we looked that time into it and there was something why we couldn't use it.

It would be nice if it still worked on the same systems as it does today. I can't find anything about this in docs or composer so presume it just works everywhere. By looking at the code we'll have to patch their PHP executable finder as it seems to not correctly find a valid php that we can use (eg cgi, fpm, ...). Probably we could also inject another dependency there and use our own instead. We should also make sure their code makes sure it detects the end of a process in all cases to prevent ending in a never ending loop. We might have to make more adjustments here.

@mattab
Copy link
Member

mattab commented Feb 19, 2015

@mkobel when you say core:archive does not work on Solaris, does it actually fail? because even if ps -e fails to execute, then it should fallback to using HTTP rather than processes which should still work. Can you post the error message?

@mattab mattab added this to the Mid term milestone Feb 19, 2015
@mkobel
Copy link
Author

mkobel commented Mar 2, 2015

As far as I know, the fallback does not work automatically.

The error message is the following:
( I replaced the URL of Piwik with PIWIKURL )

INFO CoreConsole[2015-01-20 07:30:19] ---------------------------                           
INFO CoreConsole[2015-01-20 07:30:19] INIT                         
INFO CoreConsole[2015-01-20 07:30:19] Piwik is installed at: PIWIKURL                         
INFO CoreConsole[2015-01-20 07:30:19] Running Piwik 2.10.0 as Super User                                                                                                                 
usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ]                                                                                                                                
        [ -u userlist ] [ -U userlist ] [ -G grouplist ]                                                                                                                                 
        [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ]                                                                                                                   
  'format' is one or more of:                                                                                                                                                            
        user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid                                                                                                          
        pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid                                                                                                           
        f s c lwp nlwp psr tty addr wchan fname comm args projid project pset                                                                                                            
ERROR CoreConsole[2015-01-20 07:30:19] Got invalid response from API request:                                                                                                            
+PIWIKURL?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a   
+server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.    
+ERROR CoreConsole[2015-01-20 07:30:19] The Piwik URL PIWIKURL does not seem to be pointing to a Piwik server. Response was ''.                             
ERROR CoreConsole[2015-01-20 07:30:19] The Piwik URL PIWIKURL does not seem to be pointing to a Piwik server. Response was ''.                              



  [Exception]                                                                                                                                                                            
  The Piwik URL PIWIKURL does not seem to be pointing to a Piwik server. Response was ''.                  

@mattab
Copy link
Member

mattab commented Sep 11, 2015

Hi @mkobel - do you still experience this bug in 2.14.3? if so, is there any chance you could grant us access to Solaris server so we can test and investigate this issue?

@mkobel
Copy link
Author

mkobel commented Sep 22, 2015

Yes, the bug still exists and we changed the command to ps -e.
I'm sorry, we cannot grant access to the server.

@mattab
Copy link
Member

mattab commented Sep 22, 2015

If anyone has access to a Solaris server or wants to provide a Pull request that solves the issue on Solaris, we will welcome it!

@bartonjd
Copy link

So I am running OmniOS which is based on Solaris 10 (uname -a output: SunOS piwik 5.11 omnios-170cea2 i86pc i386 i86pc), changing ps ex to ps -e worked for me. I would be willing to test any patches or suggestions you may have

ps ex works in Solaris/bash but not when called from ./core/CliMulti/Process.php. For some reason (maybe environment related it only works for me when I use -e if it is being called from within PHP

@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
@mattab mattab added the c: Onboarding For issues that make the experience of getting Matomo up and running better. label Oct 22, 2019
@mattab mattab removed this from the Backlog (Help wanted) milestone Oct 22, 2019
@tsteur tsteur removed the c: Onboarding For issues that make the experience of getting Matomo up and running better. label Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

7 participants