Pandora FMS Community

Problems with Phantomjs on CentOS 7

gairhald · 7 nov 2018, 18:31 · 6 mensajes · 69 visitas

  1. Inicio del debate

    Hi, I've installed Pandora 7.28 on CentOS 7x64 with MySQL 5.724 and works fine, but when I try to install Phantom Extension using Pandora Guide  https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration#Phantomjs Pandora Server all the time sais that i need to install phantomjs...  I put user root.root and apache.apache in folder phantomjs but always sais the same, is not installed, any idea?

    [root@ksrpandora opt]# ll
    total 2647400
    -rwxr-x---. 1 root   root        15080 oct  2  2017 epel-release-latest-7.noarch.rpm
    lrwxrwxrwx  1 mysql  mysql          35 nov  7 11:32 mysql -> mysql-5.7.24-linux-glibc2.12-x86_64
    drwxr-xr-x  9 root   root          129 nov  7 11:31 mysql-5.7.24-linux-glibc2.12-x86_64
    -rw-r--r--  1 root   root    644930593 oct  4 06:28 mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
    drwxr-x---. 9 mysql  mysql         172 nov  6 14:53 mysql-8.0.13-linux-glibc2.12-x86_64
    -rwxr-x---. 1 root   root   2042695680 oct  8 09:55 mysql-8.0.13-linux-glibc2.12-x86_64.tar
    drwxr-xr-x  3 apache apache         17 nov  6 16:52 phantomjs
    -rw-r--r--  1 root   root     23415665 ene 25  2016 phantomjs-2.1.1-linux-x86_64.tar.bz2
    [root@ksrpandora opt]# ll phantomjs
    total 0
    drwxr-xr-x 2 apache apache 23 nov  6 16:53 bin
    [root@ksrpandora opt]# ll phantomjs/bin/
    total 66340
    -rwxr-xr-x 1 apache apache 67932064 jun 12 14:51 phantomjs[root@ksrpandora opt]#
    [root@ksrpandora opt]#
    
    
    [root@ksrpandora opt]# cat /root/.bash_profile
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin:/opt/mysql/bin:/opt/phantomjs/bin
    
    export PATH
    
    
    [root@ksrpandora opt]# ll /usr/bin/phantomjs
    lrwxrwxrwx 1 root root 28 nov  6 16:53 /usr/bin/phantomjs -> /opt/phantomjs/bin/phantomjs
    [root@ksrpandora opt]#
    

  2. Hi, I've installed Pandora 7.28 on CentOS 7x64 with MySQL 5.724 and works fine, but when I try to install Phantom Extension using Pandora Guide  https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration#Phantomjs Pandora Server all the time sais that i need to install phantomjs...  I put user root.root and apache.apache in folder phantomjs but always sais the same, is not installed, any idea?

    [root@ksrpandora opt]# ll
    total 2647400
    -rwxr-x---. 1 root   root        15080 oct  2  2017 epel-release-latest-7.noarch.rpm
    lrwxrwxrwx  1 mysql  mysql          35 nov  7 11:32 mysql -> mysql-5.7.24-linux-glibc2.12-x86_64
    drwxr-xr-x  9 root   root          129 nov  7 11:31 mysql-5.7.24-linux-glibc2.12-x86_64
    -rw-r--r--  1 root   root    644930593 oct  4 06:28 mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
    drwxr-x---. 9 mysql  mysql         172 nov  6 14:53 mysql-8.0.13-linux-glibc2.12-x86_64
    -rwxr-x---. 1 root   root   2042695680 oct  8 09:55 mysql-8.0.13-linux-glibc2.12-x86_64.tar
    drwxr-xr-x  3 apache apache         17 nov  6 16:52 phantomjs
    -rw-r--r--  1 root   root     23415665 ene 25  2016 phantomjs-2.1.1-linux-x86_64.tar.bz2
    [root@ksrpandora opt]# ll phantomjs
    total 0
    drwxr-xr-x 2 apache apache 23 nov  6 16:53 bin
    [root@ksrpandora opt]# ll phantomjs/bin/
    total 66340
    -rwxr-xr-x 1 apache apache 67932064 jun 12 14:51 phantomjs[root@ksrpandora opt]#
    [root@ksrpandora opt]#
    
    
    [root@ksrpandora opt]# cat /root/.bash_profile
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin:/opt/mysql/bin:/opt/phantomjs/bin
    
    export PATH
    
    
    [root@ksrpandora opt]# ll /usr/bin/phantomjs
    lrwxrwxrwx 1 root root 28 nov  6 16:53 /usr/bin/phantomjs -> /opt/phantomjs/bin/phantomjs
    [root@ksrpandora opt]#
    

    Good morning gairhald, Can you please tell me what memory do you have? Phantomjs requieres plenty of memory for its use and that may be the problem. If not, try to use the command: phantomjs and it should enter you to the Phantomjs execution mode. Also you need to setup the PATH in the setup in "Phantomjs bin directory" Please try all these things and tell us the result. Alberto

  3. Good morning gairhald, Can you please tell me what memory do you have? Phantomjs requieres plenty of memory for its use and that may be the problem. If not, try to use the command: phantomjs and it should enter you to the Phantomjs execution mode. Also you need to setup the PATH in the setup in "Phantomjs bin directory" Please try all these things and tell us the result. Alberto

    hi Alberto, Pandora server has 4GB and 2.7 free, and Phantom is in the path, need more RAM?

    [root@ksrpandora ~]# free -kh
                  total        used        free      shared  buff/cache   available
    Mem:           3,7G        581M        2,7G         11M        471M        2,9G
    Swap:          4,2G          0B        4,2G
    [root@ksrpandora ~]# phantomjs
    phantomjs>
    phantomjs>
    phantomjs> ?
    Unexpected token '?'
    
      phantomjs://repl-input:1 in global code
    phantomjs> exit
    Can't find variable: exit
    
      phantomjs://repl-input:1 in global code
    phantomjs> quit
    Can't find variable: quit
    
      phantomjs://repl-input:1 in global code
    phantomjs>
    [root@ksrpandora ~]#
    
  4. Good morning gairhald, Can you please tell me what memory do you have? Phantomjs requieres plenty of memory for its use and that may be the problem. If not, try to use the command: phantomjs and it should enter you to the Phantomjs execution mode. Also you need to setup the PATH in the setup in "Phantomjs bin directory" Please try all these things and tell us the result. Alberto

    hi Alberto, Pandora server has 4GB and 2.7 free, and Phantom is in the path, need more RAM?

    [root@ksrpandora ~]# free -kh
                  total        used        free      shared  buff/cache   available
    Mem:           3,7G        581M        2,7G         11M        471M        2,9G
    Swap:          4,2G          0B        4,2G
    [root@ksrpandora ~]# phantomjs
    phantomjs>
    phantomjs>
    phantomjs> ?
    Unexpected token '?'
    
      phantomjs://repl-input:1 in global code
    phantomjs> exit
    Can't find variable: exit
    
      phantomjs://repl-input:1 in global code
    phantomjs> quit
    Can't find variable: quit
    
      phantomjs://repl-input:1 in global code
    phantomjs>
    [root@ksrpandora ~]#
    

    Good morning gairhald, Please try to save a report as PDF to see if the phatomjs is working at least. Some other problems can be: 1) That you haven't put the execution privilege to the phantomjs. 2) Try to click again on update in the setup, can be caused that the variable has not been saved into the database 3) Try to delete the cache data. Please do all these things and tell us more about it. Alberto

  5. Good morning gairhald, Can you please tell me what memory do you have? Phantomjs requieres plenty of memory for its use and that may be the problem. If not, try to use the command: phantomjs and it should enter you to the Phantomjs execution mode. Also you need to setup the PATH in the setup in "Phantomjs bin directory" Please try all these things and tell us the result. Alberto

    hi Alberto, Pandora server has 4GB and 2.7 free, and Phantom is in the path, need more RAM?

    [root@ksrpandora ~]# free -kh
                  total        used        free      shared  buff/cache   available
    Mem:           3,7G        581M        2,7G         11M        471M        2,9G
    Swap:          4,2G          0B        4,2G
    [root@ksrpandora ~]# phantomjs
    phantomjs>
    phantomjs>
    phantomjs> ?
    Unexpected token '?'
    
      phantomjs://repl-input:1 in global code
    phantomjs> exit
    Can't find variable: exit
    
      phantomjs://repl-input:1 in global code
    phantomjs> quit
    Can't find variable: quit
    
      phantomjs://repl-input:1 in global code
    phantomjs>
    [root@ksrpandora ~]#
    

    Good morning gairhald, Please try to save a report as PDF to see if the phatomjs is working at least. Some other problems can be: 1) That you haven't put the execution privilege to the phantomjs. 2) Try to click again on update in the setup, can be caused that the variable has not been saved into the database 3) Try to delete the cache data. Please do all these things and tell us more about it. Alberto

    sorry, i was holidays, the phamtomjs folder is in execution, the second part i don't understand, where i do click update?? update manager in pandora console? I updated it and nothing :/ but hey, don't worry, I do not think he uses the reports, thank you

  6. Did you ever get this issue sorted? I'm having exactly the same problem. As per the instructions in this documentation I installed phantomjs in /opt/phantomjs/bin and created a symlink /usr/bin/ I have tried setting the "Phantomjs bin directory" to both /opt/phantomjs/bin and /usr/bin, I have confirmed that the file is executable, I have even changed the owner and group to apache:apache as I noted the part that said "The user providing the web pages (by default Apache) should be able to run this file in the selected location." I have deleted cached data and restarted the server several times and I just can't get this working. Please can someone help?

    Good morning AWBbox, We are trying to solve this issue of the warning when Phantomjs is installed. However, for the OpenSource Phantomjs is not really needed for the reports. Alberto

Entra en tu cuenta para publicar.