backup restore | proc_nice(): Only a super user may attempt to increase ...

Dear all,

We have 6 year old interworx installation ( Centos 5, PHP 5.2, … ).
We want migrate this server to Centos 7, PHP 5.4, etc …

I make backup on old iworx, with backup.pex or siteworx backup function
Or if i use nodeworx import over SSH function.

If we use this backups, some domain import is failed (not all, we have 300+ domain, 20-30 have a problem)
proc_nice(): Only a super user may attempt to increase the priority of a process
A system error has occurred. Please try your request again in a few minutes.
If the error persists, please contact support.
Reverting Backup Directory : xxxxxx

what is the problem ?

Hi quash

Welcome to IW forums

Are your IW-cp versions the same

Are any of the siteworx accounts which failed,

Large
Use static IP

Have you tried FTP the siteworx backup to new server, unpacking it to tar (gunzip filename), then telling import to use this file on local system

Can you create a structure only back up, restore this structure to create the siteworx account, then login to the siteworx account, then perform the restore from the unpacked tar backup held locally

I hope it helps but if needed quickly, I would open a support ticket with your license provider

Many thanks

John

Dear John,

thx, your fast reply!

I found it one interesting …
those backups do not run, in what there is an SQL backup.
All backups (small or large) is done if does not contain SQL database.
If backup have SQL database, backup dont finish.

system informations:

old system:
Centos 5.11 (XenServer 6 VM)
iworx 5.1.13
mysql Ver 14.12 Distrib 5.0.95

new system:
Centos 7 (LXC container - proxmox host, ZFS FS)
iworx 5.1.13
mysql Ver 15.1 Distrib 5.5.47-MariaDB

iworx.log:
2016-05-21 00:59:38.58440 [l9mw1b-nvvu-oesl-CLI] [INFO] : COPYING OVER MAIL CONTENTS : import.php
2016-05-21 00:59:38.59520 [l9mw1b-nvvu-oesl-CLI] [WARN] : WARNING: Could not find mail box postmaster : import.php
2016-05-21 00:59:38.60235 [l9mw1b-nvvu-oesl-CLI] [INFO] : importing alias: hostmaster => dnshuadmin01@n…com : import.php
2016-05-21 00:59:38.61263 [l9mw1b-nvvu-oesl-CLI] [INFO] : importing alias: postmaster => dnshuadmin01@n…com : import.php
2016-05-21 00:59:38.62300 [l9mw1b-nvvu-oesl-CLI] [INFO] : importing FTP account: ftp@b…hu : import.php
2016-05-21 00:59:38.63357 [l9mw1b-nvvu-oesl-CLI] [INFO] : importing MySQL database: barbara : import.php
2016-05-21 00:59:38.69683 [l9mw1b-nvvu-vwza-CLI] [INFO] : script begin : mysql.php
2016-05-21 00:59:38.69704 [l9mw1b-nvvu-vwza-CLI] [NOTICE]: mysql.php --chgrp --gid 1109 --database b…_barbara : mysql.php
2016-05-21 00:59:38.70724 [l9mw1b-nvvu-vwza-CLI] [INFO] : script end : mysql.php
2016-05-21 00:59:38.72282 [l9mw1b-nvvu-oesl-CLI] [INFO] : importing MySQL SQL data: /tmp/siteworxImport0xJ6Gl/b…/var/b…hu/mysqldump/barbara.sql => barbara : import.php
2016-05-21 00:59:38.78965 [l9mw1b-nvvu-6o83-CLI] [INFO] : script begin : mysql.php
2016-05-21 00:59:38.78986 [l9mw1b-nvvu-6o83-CLI] [NOTICE]: mysql.php --chgrp --gid 1109 --database b…_barbara : mysql.php
2016-05-21 00:59:38.80038 [l9mw1b-nvvu-6o83-CLI] [INFO] : script end : mysql.php
2016-05-21 00:59:39.42363 [l9mw1b-nvvu-oesl-CLI] [EMERG] : ERROR: /usr/local/interworx/include/IWorxExec.php(219): proc_nice(): Only a super user may attempt to increase the priority of a process : import.php
2016-05-21 00:59:39.42415 [l9mw1b-nvvu-oesl-CLI] [EMERG] : ----- DEBUG STACKTRACE BEGIN ----- : import.php
2016-05-21 00:59:39.42424 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/IWorxDebug.php getStackTrace (167) : import.php
2016-05-21 00:59:39.42434 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/IWorxExec.php errorHandler (219) : import.php
2016-05-21 00:59:39.42443 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/Command.php exec (598) : import.php
2016-05-21 00:59:39.42452 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/Command.php _executeCommand (97) : import.php
2016-05-21 00:59:39.42461 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/drivers/db/MySQL.php exec (234) : import.php
2016-05-21 00:59:39.42470 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/import/Import.php importSqlFile (3731) : import.php
2016-05-21 00:59:39.42478 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/import/Import.php _importMySQLFiles (1074) : import.php
2016-05-21 00:59:39.42487 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/CLI/Import.php importArchive (227) : import.php
2016-05-21 00:59:39.42496 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/CLI.php _default (340) : import.php
2016-05-21 00:59:39.42505 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/include/CLI.php _execRun (276) : import.php
2016-05-21 00:59:39.42514 [l9mw1b-nvvu-oesl-CLI] [EMERG] : /usr/local/interworx/bin/import.php run (41) : import.php
2016-05-21 00:59:39.42523 [l9mw1b-nvvu-oesl-CLI] [EMERG] : ----- DEBUG STACKTRACE END ----- : import.php
2016-05-21 00:59:39.45695 [l9mw1b-nvvu-oesl-CLI] [INFO] : saving backup directory: b…hu : import.php
2016-05-21 00:59:39.47336 [l9mw1b-nvvu-oesl-CLI] [INFO] : script end : import.php

Hi quash

Many thanks

I had a similar issue when mass importing and a few would not complete at first, but IW resolved it very quickly

I think your import would work as expected if you create a structure only backup, then create the siteworx account on the new server, login to the siteworx account, restore structure only backup, then restore full backup, or partial backup

I think this is where the issue is, as it is looking for the siteworx user as the superuser and not root

I could be wrong so I apologise in advance

Many thanks

John

Hi Quash,

If you do a ulimit command this shows if any limit thats been set on processes, This can be a value from 0 to 40, the greater that number, the higher the priority a user can set for a process

Mine shows

ulimit

unlimited

Hi inodecloud

I’m thinking that the process should not be set higher on a siteworx user, which is why I think it’s a permission issue on access

I could be wrong though, so apologise in advance

Many thanks

John

Hi John,

By default Centos/Redhat has a limit of 1024 or 4096 - which is pretty low, if a large import is happening this should probably be set to something higher.

If you do a ulimit -n it will show the current limit.

If you want to increase it to (lets say to 40000).

  1. You need to edit “/etc/sysctl.conf” and put fs.file-max=40000.
    fs.file-max = 40000
  2. You also need to edit /etc/security/limits.conf and updated hard (Hn) and soft values (Sn).
    Added following lines in /etc/security/limits.conf:
  • soft    nofile          40000
    
  • hard    nofile          40000
    
  1. add following line in /etc/pam.d/su-
    session required pam_limits.so

After making all these changes reboot the server.

Hope that makes sense

Hi inodecloud

Kudos, another great post but I remember this from a few years ago, and thought centos/RHEL unlimited this back then.

I did a quick check in a few new centos servers, and all show as unlimited

Many thanks

John

Thanks John,

By default RHEL/CentOS from what i remember had 1024 by default but changed it to 4096 later. There are some server images that have the image configured the ulimit to unlimited, so it depends really.

Hi inodecloud

Apologies, you are still correct, and I checked wrong ulimit, checked again and it was set to 1024, which we have now changed.

I think some images have been set as you say though

Kudos to you

Many thanks

John

Hey Quash,

Can you submit a support ticket regarding this issue?

https://support.interworx.com/index.php?_m=tickets&_a=submit

Hi Nathan,

This is not a issue :confused:

Just a default CentOS thing.

Dear All,

Thx your reply !!!

We tried the proposed CentOS settings:

default ulimit:

ulimit -n

1024

after edit limits.conf:

ulimit -n

40000

its okay.

This did not solve the problem unfortunately
, import is failed:

Database was imported : barbara
proc_nice(): Only a super user may attempt to increase the priority of a process
A system error has occurred. Please try your request again in a few minutes.
If the error persists, please contact support.

Very important, we run interworx in LXC container!
e.g: do not modify fs.file-max kernel parameter, but, file-max is kernel setting is ok:

sysctl -a | grep file-max

fs.file-max = 3283152

In LXC container we dont have any problem with interworx (or other stuff)
Proxmox 4.2, current kernel: 4.4.8-1

If I have time, i make simple test, we make this test system on KVM virtualization (non LXC), if import ok, this is LXC generated problem. (we waiting demo interworx licenc key)

Regards,
Gabor

Hi Gabor

I do think it is permission based issue

I would let IW have a quick look if your next test fails

I know IW worked on proxmox when I tried it, but that was pre centos 7 era, running centos 6

Appreciate if you could update your post when you test non lxc

Many thanks

John

LXC + Centos 6 = error

We make simple fast test:

  • LXC container
  • Centos 6
  • current iworx stable version (Demo licenc)
  • more soft/hard limit

not working, the result it then an Centos 7:

Database was imported : barbara

InterWorx Error Report:

FILE: /usr/local/interworx/include/IWorxExec.php
LINE: 219
MESSAGE: proc_nice(): Only a super user may attempt to increase the priority of a process

----- DEBUG STACKTRACE BEGIN -----
/usr/local/interworx/include/IWorxExec.php errorHandler (219)
/usr/local/interworx/include/Command.php exec (598)
/usr/local/interworx/include/Command.php _executeCommand (97)
/usr/local/interworx/include/drivers/db/MySQL.php exec (234)
/usr/local/interworx/include/import/Import.php importSqlFile (3731)
/usr/local/interworx/include/import/Import.php _importMySQLFiles (1074)
/usr/local/interworx/include/CLI/Import.php importArchive (227)
/usr/local/interworx/include/CLI.php _default (340)
/usr/local/interworx/include/CLI.php _execRun (276)
/usr/local/interworx/bin/import.php run (41)
----- DEBUG STACKTRACE END -----

I make KVM test :slight_smile:

KVM + Centos 7 = OK

Bad news for me :frowning:

We install Centos 7 on KVM:

  • KVM VM
  • Centos 7
  • current iworx stable (demo licenc)

and backup import is successfully.
No errors, and not stopped.

We use many applications on LXC container, without problems.
What may be the trouble ?
if i turn on full debug on iworx, no more information whats wrong.

we have little time to migration sites from old iworxs installations to new servers and installs. by hand import is not good.

Hi Gabor

I would strongly advise you act on Nathan request and open a support ticket

IW are following this thread, and think your issue is a problem on elevation of permission to root

Clearly, not fully knowing your setup, I cannot give any help, and we do not use proxmox latest version sorry, so best advise is open the ticket

Lastly, are you garbor my friend and reregistered on IW or are you a new user

Many thanks

John

We found it the solution | LXC sys_nice capabilities

Dear John!

We found it the solution ! ( new day, clear head :slight_smile: )

In default LXC CentOS template, sys_nice capabilities is disabled:


grep nice  /usr/share/lxc/config/centos.common.conf
  lxc.cap.drop =[B] sys_nice[/B] sys_pacct sys_rawio

if we enabled this capabilities, backup import is successfully done.

Thx your (and all) help, and fast reply !

I am new user in this forum,
We use interworx CPs 5-6 years, this is the first heavy problem ! :slight_smile:

Regards Gabor,

I know the feels of fixing something thats you’ve been stuck with for a while! haha.

Well Done! :smiley: