Jump to content
Froxlor Forum
  • 0

Bionic Beaver


lanbo

Question

Hey guys,

I know there are no new configuration templates for Bionic Beaver but it looks like there have not been dramatic changes wrt Xenial. I believe php 7.0 > 7.2, also changes on apache 2.4.18 -> 2.4.29, same mysql...

I run a typical setup with LAMP with postfix/dovecot, extrausers & php-fpm.

Are you aware about any possible problem or changes that I might investigate before I try to upgrade?
 

Thanks

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

It almost worked.

 

After restarting I cannot access the Froxlor vhost for example.

When I manually force the crons I get this error:

Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
 

So I guess php7.0 is hardcoded somewhere in Froxlor maybe?

Any idea where I have to change it to 7.2?

 

I added:

insert into `panel_fpmdaemons` set `description`='Bionic Beaver', `reload_cmd` ='service php7.2-fpm restart', `config_dir` ='/etc/php/7.2/fpm/pool.d/', `pm`='static', `max_children`=1, `start_servers`=20, `min_spare_servers`=5, `max_spare_servers`=35, `max_requests`=0, `idle_timeout`=30, `limit_extensions`='.php';

 

and the cron works now. I also restarted apache but the froxlor vhost still returns 503.

 

/etc/php/7.0/ & /etc/php/7.2 are quit different. Specially because 7.2 does not have an "apache" subfolder.

I imagine these are created by froxlor somehow.

I guess I need to create some configs here /etc/php/7.0/apache2, but I'm not sure how should I do this.

This is the error in apache:

[Fri Sep 28 21:55:58.474171 2018] [proxy:error] [pid 3000:tid 140433602631424] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/apache2/fastcgi/1-froxlor.panel-XXXXX.com-php-fpm.socket (*) failed

And indeed it fails because:

ls /var/lib/apache2/fastcgi/

is empty.

Ideas?

Thanks

Link to comment
Share on other sites

This is the current state when I run the cron (after manually creating a record on panel_fpmdaemons):

 

php /var/www/html/froxlor/scripts/froxlor_master_cronjob.php --force --debug
[information] cron_tasks: Searching for tasks to do
[information] apache::createIpPort: creating ip/port settings for  148.251.136.148:80
[debug] 148.251.136.148:80 :: inserted vhostcontainer
[information] apache::createIpPort: creating ip/port settings for  148.251.136.148:443
[debug] 148.251.136.148:443 :: inserted vhostcontainer
[information] apache::writeConfigs: rebuilding /etc/apache2/sites-enabled/
[information] apache::writeConfigs: rebuilding /etc/apache2/htpasswd/
[information] apache::writeConfigs: rebuilding /etc/apache2/sites-enabled/
[information] apache::reload: running service php7.0-fpm restart
Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
[information] apache::reload: fpm config directory "/etc/php/7.2/fpm/pool.d/" is empty. Creating dummy.
[information] apache::reload: running service php7.2-fpm restart
[information] apache::reload: reloading apache
[information] Task4 started - Rebuilding froxlor_bind.conf
[information] Cleaning dns zone files from /etc/bind/domains/
[information] No domains found for nameserver-config, skipping...
[notice] Creating passwd file
[notice] Writing 0 entries to passwd file
[notice] Succesfully wrote passwd file
[notice] Creating group file
[notice] Writing 0 entries to group file
[notice] Succesfully wrote group file
[notice] Creating shadow file
[notice] Writing 0 entries to shadow file
[notice] Succesfully wrote shadow file
[notice] Checking system's last guid

I guess I need to create the proper 7.2 settings. It looks quite messy now :-S

Link to comment
Share on other sites

8 minutes ago, lanbo said:

But when? This is something I had to do before upgrading Ubuntu (while I was on 7.0)?

of course before so that the configs and folders/files are suitable for the new system

9 minutes ago, lanbo said:

Can it be done now?

of course, all you had to do was changing the fpm related paths. NO idea why you would add a new fpm-daemon manually (cause there is no more php7.0 i guess).

Link to comment
Share on other sites

25 minutes ago, d00p said:

of course before so that the configs and folders/files are suitable for the new system

I understand. But, exactly what did I have to do?

I'm checking demo.froxlor.org trying to understand what settings should I have done. How should I have prepared froxlor for 7.2 while I did not have it.

25 minutes ago, d00p said:

of course, all you had to do was changing the fpm related paths. NO idea why you would add a new fpm-daemon manually (cause there is no more php7.0 i guess).

There's no php7.0. That was one the points to upgrade to Bionic Beaver. To upgrade all the stuff without using PPAs...

I have tried to:

cp -a /etc/php/7.0 /etc/php/7.2

And then 

php /var/www/html/froxlor/scripts/froxlor_master_cronjob.php --force --debug
froxlor[11284]: The php PDO extension or PDO-MySQL driver is not available
froxlor[11284]: --- DEBUG: #0 /var/www/html/DB_UNPRIV_PWD/lib/classes/database/class.Database.php(178): Database::getDB() #1 /var/www/html/DB_UNPRIV_PWD/lib/cron_init.php(92): Database::__callStatic('query', Array) #2 /var/www/html/DB_UNPRIV_PWD/scripts/DB_UNPRIV_PWD_master_cronjob.php(20): include_once('/var/www/html/f...') #3 {main}
We are sorry, but a MySQL - error occurred. The administrator may find more information in the syslog

 

Link to comment
Share on other sites

4 minutes ago, lanbo said:

I understand. But, exactly what did I have to do?

Login as admin, goto settings, go through all corresponding categories and adjust as needed. You are the server admin, you need to know the paths and binaries that are in use. 

Also, READ the error message thoroughly...it literally tells you what the problem is and it's not a froxlor setting.

Link to comment
Share on other sites

Thanks. I installed pdo-mysql

I can run the cron:

php /var/www/html/froxlor/scripts/froxlor_master_cronjob.php --force --debug
[information] cron_tasks: Searching for tasks to do
[information] apache::createIpPort: creating ip/port settings for  148.251.136.148:80
[debug] 148.251.136.148:80 :: inserted vhostcontainer
[information] apache::createIpPort: creating ip/port settings for  148.251.136.148:443
[debug] 148.251.136.148:443 :: inserted vhostcontainer
[information] apache::writeConfigs: rebuilding /etc/apache2/sites-enabled/
[information] apache::writeConfigs: rebuilding /etc/apache2/htpasswd/
[information] apache::writeConfigs: rebuilding /etc/apache2/sites-enabled/
mkdir: cannot create directory ‘’: No such file or directory
[information] apache::reload: fpm config directory "/etc/php/7.2/fpm/pool.d/" is empty. Creating dummy.
[information] apache::reload: running service php7.2-fpm restart
[information] apache::reload: reloading apache
[information] Task4 started - Rebuilding froxlor_bind.conf
[information] Cleaning dns zone files from /etc/bind/domains/
[information] No domains found for nameserver-config, skipping...
[notice] Creating passwd file
[notice] Writing 0 entries to passwd file
[notice] Succesfully wrote passwd file
[notice] Creating group file
[notice] Writing 0 entries to group file
[notice] Succesfully wrote group file
[notice] Creating shadow file
[notice] Writing 0 entries to shadow file
[notice] Succesfully wrote shadow file
[notice] Checking system's last guid

fpm is running:

 service php7.2-fpm status
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-09-29 10:42:41 CEST; 7min ago
     Docs: man:php-fpm7.2(8)
 Main PID: 21885 (php-fpm7.2)
   Status: "Processes active: 0, idle: 1, Requests: 0, slow: 0, Traffic: 0req/sec"
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/php7.2-fpm.service
           ├─21885 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
           └─21886 php-fpm: pool dummy

Sep 29 10:42:41 ihtaca systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Sep 29 10:42:41 ihtaca systemd[1]: Started The PHP 7.2 FastCGI Process Manager.

however, for some reason some socket file is missing:

 

[Sat Sep 29 10:49:33.135842 2018] [proxy:error] [pid 21903:tid 140444239369984] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.2-fpm.sock (*) failed
[Sat Sep 29 10:49:33.135893 2018] [proxy_fcgi:error] [pid 21903:tid 140444239369984] [client 95.120.189.83:59498] AH01079: failed to make connection to backend: httpd-UDS

Should this file be created by the cron?

Link to comment
Share on other sites

6 hours ago, lanbo said:

[information] apache::reload: fpm config directory "/etc/php/7.2/fpm/pool.d/" is empty. Creating dummy.

please start reading the errormessges. There is no php-config that uses your manually created php7.2.

Please output the entries of the database tables panel_fpmdaemons and panel_phpconfigs 

Link to comment
Share on other sites

Thank you so much @d00p

TBH I'm not superfamilar with system administration. Just the basic stuff to make it work and install (or update) once every 3 years.

I only host my own domains (not that many).

I removed the 7.0 stuff in panel_fpdaemons.

Now it is:

 

*************************** 1. row ***************************
               id: 2
      description: Bionic Beaver
       reload_cmd: service php7.2-fpm restart
       config_dir: /etc/php/7.2/fpm/pool.d/
               pm: static
     max_children: 1
    start_servers: 20
min_spare_servers: 5
max_spare_servers: 35
     max_requests: 0
     idle_timeout: 30
 limit_extensions: .php
1 row in set (0.00 sec)

 

Regarding phpconfigs it's huge:

*************************** 1. row ***************************
                      id: 1
             description: Default Config
                  binary: /usr/bin/php-cgi
         file_extensions: php
       mod_fcgid_starter: -1
   mod_fcgid_maxrequests: -1
         mod_fcgid_umask: 022
             fpm_slowlog: 0
             fpm_reqterm: 60s
             fpm_reqslow: 5s
             phpsettings: allow_call_time_pass_reference = Off
allow_url_fopen = Off
asp_tags = Off
disable_classes =
disable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system
display_errors = Off
display_startup_errors = Off
enable_dl = Off
error_reporting = E_ALL & ~E_NOTICE
expose_php = Off
file_uploads = On
cgi.force_redirect = 1
gpc_order = "GPC"
html_errors = Off
ignore_repeated_errors = Off
ignore_repeated_source = Off
include_path = ".:{PEAR_DIR}"
log_errors = On
log_errors_max_len = 1024
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"
output_buffering = 4096
post_max_size = 16M
precision = 14
register_argc_argv = Off
register_globals = Off
report_memleaks = On
sendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"
session.auto_start = 0
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.cache_expire = 180
session.cache_limiter = nocache
session.cookie_domain =
session.cookie_lifetime = 0
session.cookie_path = /
session.entropy_file = /dev/urandom
session.entropy_length = 16
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.gc_probability = 1
session.name = PHPSESSID
session.referer_check =
session.save_handler = files
session.save_path = "{TMP_DIR}"
session.serialize_handler = php
session.use_cookies = 1
session.use_trans_sid = 0
short_open_tag = On
suhosin.mail.protect = 1
suhosin.simulation = Off
track_errors = Off
upload_max_filesize = 32M
upload_tmp_dir = "{TMP_DIR}"
variables_order = "GPCS"
;mail.add_x_header = On
;mail.log = "/var/log/phpmail.log"
opcache.restrict_api = "{DOCUMENT_ROOT}"

            fpmsettingid: 1
pass_authorizationheader: 0
*************************** 2. row ***************************
                      id: 2
             description: Froxlor Vhost Config
                  binary: /usr/bin/php-cgi
         file_extensions: php
       mod_fcgid_starter: -1
   mod_fcgid_maxrequests: -1
         mod_fcgid_umask: 022
             fpm_slowlog: 0
             fpm_reqterm: 60s
             fpm_reqslow: 5s
             phpsettings: allow_call_time_pass_reference = Off
allow_url_fopen = On
asp_tags = Off
disable_classes =
disable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system
display_errors = Off
display_startup_errors = Off
enable_dl = Off
error_reporting = E_ALL & ~E_NOTICE
expose_php = Off
file_uploads = On
cgi.force_redirect = 1
gpc_order = "GPC"
html_errors = Off
ignore_repeated_errors = Off
ignore_repeated_source = Off
include_path = ".:{PEAR_DIR}"
log_errors = On
log_errors_max_len = 1024
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
max_execution_time = 60
max_input_time = 60
memory_limit = 128M
output_buffering = 4096
post_max_size = 16M
precision = 14
register_argc_argv = Off
register_globals = Off
report_memleaks = On
sendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"
session.auto_start = 0
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.cache_expire = 180
session.cache_limiter = nocache
session.cookie_domain =
session.cookie_lifetime = 0
session.cookie_path = /
session.entropy_file = /dev/urandom
session.entropy_length = 16
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.gc_probability = 1
session.name = PHPSESSID
session.referer_check =
session.save_handler = files
session.save_path = "{TMP_DIR}"
session.serialize_handler = php
session.use_cookies = 1
session.use_trans_sid = 0
short_open_tag = On
suhosin.mail.protect = 1
suhosin.simulation = Off
track_errors = Off
upload_max_filesize = 32M
upload_tmp_dir = "{TMP_DIR}"
variables_order = "GPCS"
;mail.add_x_header = On
;mail.log = "/var/log/phpmail.log"
opcache.restrict_api = ""

            fpmsettingid: 1
pass_authorizationheader: 0
2 rows in set (0.00 sec)

 

Link to comment
Share on other sites

Oups!

You made me think.

I updated the id of panel_fpdaemons record so that it matched "fpmsettingid: 1"

update panel_fpdaemons set id =1;

I made some progress.

It now shows a froxlor screen with Just a couple of issues:

#8192 assert(): Calling assert() with a string argument is deprecated

The php PDO extension or PDO-MySQL driver is not available

 

Working on these issues now. Thanks again.

 

EDIT:

The pdo stuff may be related with this message I got while installing php-fpm:

 

(Reading database ... 88139 files and directories currently installed.)
Preparing to unpack .../php7.2-fpm_7.2.10-0ubuntu0.18.04.1_amd64.deb ...
Unpacking php7.2-fpm (7.2.10-0ubuntu0.18.04.1) ...
Selecting previously unselected package php-fpm.
Preparing to unpack .../php-fpm_1%3a7.2+60ubuntu1_all.deb ...
Unpacking php-fpm (1:7.2+60ubuntu1) ...
Setting up php7.2-fpm (7.2.10-0ubuntu0.18.04.1) ...
Not replacing deleted config file /etc/php/7.2/fpm/php.ini
php_invoke pdo_mysql: no action - module was disabled by maintainer for PHP 7.2 fpm sapi
NOTICE: Not enabling PHP 7.2 FPM by default.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Processing triggers for ureadahead (0.100.0-20) ...
Setting up php-fpm (1:7.2+60ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...

 

Link to comment
Share on other sites

13 minutes ago, lanbo said:

#8192 assert(): Calling assert() with a string argument is deprecated

That's just a deprecation warning, it's fixed in the current git-master.

Setting the fpm-daemon ID to 1 was the right move. It's not intended to manually delete entries in the database, we require to have a fpm Daemon config with id 1 (same for phpconfig)

For pdo driver, just install php-mysql

Link to comment
Share on other sites

Yeah, I don't care about that deprecation warning.

However I already have php-mysql installed. That's the first thing I checked.

I have restarted apache2, also restarted php7.2-fpm and  php /var/www/html/froxlor/scripts/froxlor_master_cronjob.php --force --debug.

I created a phpinfo.php so that I can run it on the froxlor vhost and get: 

PDO
PDO support	enabled
PDO drivers	no value

The message I got while it was being installed was:

php_invoke pdo_mysql: no action - module was disabled by maintainer for PHP 7.2 fpm sapi

I'm not sure what it means.

Thanks again @d00p

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...