Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses WHMCS

While activating a new account I could see an error

Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses

The issue was due to the server running out of spare dedicated IP address

The issue can be resolved in 2 ways

1) Adding additional IP address in server

2) By editing file  /var/cpanel/packages/abckhosting which is a package file which is assigned to customers.

SSH to server in question on which account is activated  and  edit the package file as mentioned

vi /var/cpanel/packages/abckhosting

The parameter IP=y needs to be changed to  IP=n to get account activated without adding new  IP address.

BWLIMIT=unlimited
CGI=y
CPMOD=paper_lantern
DIGESTAUTH=n
FEATURELIST=default
HASSHELL=n
IP=n
LANG=en
MAXADDON=5
MAXFTP=5
MAXLST=unlimited
MAXPARK=5
MAXPOP=unlimited
MAXSQL=10
MAXSUB=5
MAX_DEFER_FAIL_PERCENTAGE=unlimited
MAX_EMAIL_PER_HOUR=unlimited
QUOTA=100000
_PACKAGE_EXTENSIONS=

 

This did help in creating new account without adding additional IP address

 

How to fix invalid cPanel license error when the IP is in fact licensed

 

Was getting below error on cpanel server  even when cpanel license was assigned for main server IP address

root@server4 [/etc/sysconfig/network-scripts]# /usr/local/cpanel/cpkeyclt
Updating cPanel license…Done. Update Failed!
Error message:
The cPanel license server said that there was no license for your IP address.
For more information visit: http://www.cpanel.net/lic.html

The exact message was: Abort, Retry, Fail?

Building global cache for cpanel…Done

 

The issue was due to wrong entries in  /etc/hosts file

went ahead and set the correct hostname and IP in  /etc/hots file and  refreshed cpanel license

root@server4 [/etc/sysconfig/network-scripts]# /usr/local/cpanel/cpkeyclt
Updating cPanel license…Done. Update succeeded.
Building global cache for cpanel…Done
root@server4 [/etc/sysconfig/network-scripts]#

 

Ffmpeg on Centos 7 and Centos 6

Login to server via SSH

Below steps are for Centos 7

yum -y install epel-release

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

rpm -Uvh  http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release0-5.el7.nux.noarch.rpm

yum -y install ffmpeg ffmpeg-devel

 

Below steps are for Centos 6

yum -y install epel-release

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

wget https://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-1.el6.nux.noarch.rpm

rpm ivh  nux-dextop-release-0-1.el6.nux.noarch.rpm

yum -y install ffmpeg ffmpeg-devel

 

now we need to install ffmpeg-php to get it working using PHP

yum -y install git
git clone https://github.com/tony2001/ffmpeg-php.git

cd ffmpeg-php
/usr/local/cpanel/3rdparty/php/56/bin/phpize
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config

If you want to install on PHP 7 use

/opt/cpanel/ea-php7/root/usr/bin/phpize

 

[Usually before easyapache 4 only phpize would work] now as there are multiple version of PHP there is need to  phpize from above path.

The path would changes based on php version

if you are using PHP 7 path will be /opt/cpanel/ea-php70/root/usr/bin/phpize and

/opt/cpanel/ea-php70/root/usr/bin/php-config

You can find path using find command

[root@server ffmpeg-php]# find / -iname phpize
/opt/cpanel/ea-php55/root/usr/bin/phpize

/opt/cpanel/ea-php56/root/usr/bin/phpize

/opt/cpanel/ea-php70/root/usr/bin/phpize

 

Do not use path ./usr/local/cpanel/3rdparty/bin/phpize

 

Before compiling ffmpegphp

need to make sure all need files are in   /usr/include

When you install ffmpeg and ffmpeg-devel files get stored in  /usr/include/ffmpeg however ffmpeg while compiling looks for files in /usr/include/ so need to copy files to /usr/include using below command

scp -r /usr/include/ffmpeg/* /usr/include/

Now you can go ahead and compile

./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config

Note [Path /opt/cpanel/ea-php56/root/usr/bin/php-config will changed on which version you are installing ffmpeg]

[root@server ffmpeg-php]# find / -iname php-config

/opt/cpanel/ea-php55/root/usr/bin/php-config
/opt/cpanel/ea-php56/root/usr/bin/php-config
/opt/cpanel/ea-php70/root/usr/bin/php-config

 

now before making make and make install few things need to be modified.

mv /usr/include/libavutil/time.h /usr/include/libavutil/time.h_

now go ahead with make and make install

now   again need to rename the above file

mv  /usr/include/libavutil/time.h_    /usr/include/libavutil/time.h

 

 

ffmpeg modules will be installed in below path

root@server ffmpeg-php]# ls -al /opt/cpanel/ea-php56/root/usr/lib64/php/modules/
total 2712
drwxr-xr-x 2 root root 4096 Dec 7 07:07 .
drwxr-xr-x 4 root root 4096 Feb 22 2017 ..
-rwxr-xr-x 1 root root 32608 Feb 22 2017 bcmath.so
-rwxr-xr-x 1 root root 33792 Feb 22 2017 calendar.so
-rwxr-xr-x 1 root root 15584 Feb 22 2017 ctype.so
-rwxr-xr-x 1 root root 86928 Feb 22 2017 curl.so
-rwxr-xr-x 1 root root 180728 Feb 22 2017 dom.so
-rwxr-xr-x 1 root root 281640 Dec 7 07:07 ffmpeg.so
-rwxr-xr-x 1 root root 57792 Feb 22 2017 ftp.so

 

Now go ahead and add extension=ffmpeg.so to php.ini for the PHP version you need and restart apache

 

 

Secure Connection Failed while accessing IPMI

Secure Connection Failed

An error occurred during a connection to 216.1x.1xx.xxx. You have received an invalid certificate. Please contact the server administrator or email correspondent and give them the following information: Your certificate contains the same serial number as another certificate issued by the certificate authority. Please get a new certificate containing a unique serial number. Error code: SEC_ERROR_REUSED_ISSUER_AND_SERIAL

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

 

 

Firefox stores certificates separately from the Operating System. Sometimes the certificate store can become corrupt and won’t let you delete certificates. To solve this, you’ll have to reset it manually.

Go to Start > Run

Type %appdata% and click Ok.
Result: A folder should open up.

 

Now go to Mozilla, then Firefox, then Profiles, and choose your profile folder (it probably is named a random string of letters, often followed by .default).

 

Delete the file called “cert8.db”.

This should fix the issue .

 

IPAddress is already an active IP

While trying to change main IP of server was facing issue

Where was getting message IPAddress is already an active IP

On checking around found the below solution which worked

 

Make sure that the IP address you’re trying to add has been removed from these files:

/etc/hosts
/etc/ips
/etc/mail_reverse_dns

If you happen to also be trying to add back the IP that was previous the primary IP address, you will also need to update this file:

/var/cpanel/mainip

Now could add the IP address back in server

error reading information on service virtualizor: No such file or directory

While installing Virtualizor on one of the servers  which had linux Centos 7 was getting error

[root@ny7 ~]# ./install.sh email=xxx@gmail.com kernel=kvm

———————————————–
Welcome to Softaculous Virtualizor Installer
———————————————–

An existing installation of Virtualizor has been detected !
If you continue to install Virtualizor, the existing installation
and all its Data will be lost
Do you want to continue installing ? [y/N]y
1) Installing Libraries and Dependencies
2) Installing PHP, MySQL and Web Server
3) Downloading and Installing Virtualizor
error reading information on service virtualizor: No such file or directory

Warning: include_once(_universal.php): failed to open stream: No such file or directory in /usr/local/virtualizor/install.php on line 1368

Warning: include_once(): Failed opening ‘_universal.php’ for inclusion (include_path=’.:’) in /usr/local/virtualizor/install.php on line 1368

Notice: Undefined index: path in /usr/local/virtualizor/install.php on line 1373

Warning: include_once(/globals.php): failed to open stream: No such file or directory in /usr/local/virtualizor/install.php on line 1373

Warning: include_once(): Failed opening ‘/globals.php’ for inclusion (include_path=’.:’) in /usr/local/virtualizor/install.php on line 1373

Notice: Undefined index: mainfiles in /usr/local/virtualizor/install.php on line 1376

Warning: include_once(/functions.php): failed to open stream: No such file or directory in /usr/local/virtualizor/install.php on line 1376

Warning: include_once(): Failed opening ‘/functions.php’ for inclusion (include_path=’.:’) in /usr/local/virtualizor/install.php on line 1376
– Configuring Virtualizor

Fatal error: Call to undefined function generateRandStr() in /usr/local/virtualizor/install.php on line 1388

ERROR :
There was an error while installing Virtualizor
Please check /root/virtualizor.log for errors
Exiting Installer
[root@ny7 ~]#

 

The issue was due to wrong time zone in server

 

I went ahead and setup NTP and synced time to fix the issue

[root@ny7 ~]# yum install ntp
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.lga7.us.voxel.net
* extras: mirror.atlanticmetro.net
* updates: mirrors.lga7.us.voxel.net
Softaculous | 2.9 kB 00:00
Softaculous-extra | 2.9 kB 00:00
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
Resolving Dependencies
–> Running transaction check
—> Package ntp.x86_64 0:4.2.6p5-10.el6.centos.2 will be installed
–> Processing Dependency: ntpdate = 4.2.6p5-10.el6.centos.2 for package: ntp-4.2.6p5-10.el6.centos.2.x86_64
–> Running transaction check
—> Package ntpdate.x86_64 0:4.2.6p5-10.el6.centos.2 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================
Installing:
ntp x86_64 4.2.6p5-10.el6.centos.2 base 599 k
Installing for dependencies:
ntpdate x86_64 4.2.6p5-10.el6.centos.2 base 78 k

Transaction Summary
============================================================================================================================================================================================================
Install 2 Package(s)

Total download size: 678 k
Installed size: 1.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): ntp-4.2.6p5-10.el6.centos.2.x86_64.rpm | 599 kB 00:00
(2/2): ntpdate-4.2.6p5-10.el6.centos.2.x86_64.rpm | 78 kB 00:00
————————————————————————————————————————————————————————————————————
Total 2.9 MB/s | 678 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ntpdate-4.2.6p5-10.el6.centos.2.x86_64 1/2
Installing : ntp-4.2.6p5-10.el6.centos.2.x86_64 2/2
Verifying : ntp-4.2.6p5-10.el6.centos.2.x86_64 1/2
Verifying : ntpdate-4.2.6p5-10.el6.centos.2.x86_64 2/2

Installed:
ntp.x86_64 0:4.2.6p5-10.el6.centos.2

Dependency Installed:
ntpdate.x86_64 0:4.2.6p5-10.el6.centos.2

Complete!
[root@ny7 ~]# service ntpd start
Starting ntpd: [ OK ]
[root@ny7 ~]# chkconfig ntpd on
[root@ny7 ~]# rm -rf /etc/localtime
[root@ny7 ~]# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
[root@ny7 ~]# ntpdate pool.ntp.org
19 Sep 11:27:27 ntpdate[2345]: the NTP socket is in use, exiting
[root@ny7 ~]#
[root@ny7 ~]#
[root@ny7 ~]# date
Tue Sep 19 11:27:30 CDT 2017

Disable WordPress plugins from PHPmyadmin

You can easily disable all WordPress plugins directly from your database. This is useful when you have problems with your WordPress installation, such as not being able to log in to the admin Dashboard, or having blank pages on the website.

If you don’t know which is the database used by your WordPress website, you can check the DB_NAME variable in the WordPress configuration file – wp-config.php. This file is usually located in the document root directory of your application and can be opened via the File Manager in cPanel.

To disable all plugins, go to phpMyAdmin in cPanel and select your WordPress database from the menu on the left.

Browse the table wp_options and find the option active_plugins. Click the pencil icon to edit the table. Its content will vary, depending on what plugins you have enabled. For example, if you have the Akismet and Hello Dolly plugins enabled, the code there will be:

To disable all plugins, simply delete the code and click the Go button to save the change.

Please note that this table may have a different prefix instead of wp_. You will see the correct prefix of the database once you access the phpMyAdmin tool and select the the WordPress database.

Disabling the plugins in this way will not delete them from your WordPress application. They will simply be deactivated. You can easily activate them from your WordPress admin area at any time.

softacalous Blank Screen cPanel/WHM

While trying to access softacalous from WHM > Plugins >

I was just getting White Screen

The tried disabling and enabling ioncube loader from WHM > Tweak Settings,

However the issue persisted

So I went ahead and reinstalled using below steps

the Softaculous folder here:

 

root@server1 [/usr/local/cpanel]# rm -rf /usr/local/cpanel/whostmgr/docroot/cgi/softaculous

root@server1 [/usr/local/cpanel]# wget -N http://files.softaculous.com/install.sh
–2017-07-25 12:03:36– http://files.softaculous.com/install.sh
Resolving files.softaculous.com… 192.198.80.3
Connecting to files.softaculous.com|192.198.80.3|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 4920 (4.8K) [application/x-sh]
Saving to: `install.sh’

100%[==================================================================================================================================================================>] 4,920 –.-K/s in 0s

2017-07-25 12:03:36 (279 MB/s) – `install.sh’ saved [4920/4920]

root@server1 [/usr/local/cpanel]# chmod 755 install.sh

 

———————————————-
Welcome to Softaculous Apps Installer
———————————————–

ln: creating symbolic link `/usr/local/cpanel/base/frontend/paper_lantern/softaculous/enduser’: File exists
ln: creating symbolic link `/usr/local/cpanel/base/frontend/x3/softaculous/enduser’: File exists
///////////////////////////////
// INSTALLING SOFTACULOUS :
// 1) CONFIGURING universal.php
// 2) FETCHED A LICENSE
// 3) UPDATING Categories
// 4) UPDATING Scripts List
// 5) UPDATING Installed Scripts List
// 6) SETTING A CRON JOB
// 7) DOWNLOADING SCRIPTS
///////////////////////////////

Syntax OK

Now softaculous is working fine

 

Cloudflare with Engintron

We had a issue where domain which is using cloudflare and server had engintron those domains were not working correctly

Engintron does support Cloudflare . There are few custom rules which needs to be setup from

WHM > Plugin > Emgintron  > Edit your custom_rules for Nginx

For domains which have dedicated IP below is the rule which needs to be added

if ($host ~ “oxyxxxxx.com”) {
set $PROXY_DOMAIN_OR_IP “173.1xx.xx5.xxx”;

}

Where you need to set right domain name and  right IP associated with domain

 

If using a shared IP address below is the rule that needs to be added in

Edit yourcustom_rules for Nginx and add below statement

set $PROXY_DOMAIN_OR_IP “XXX.XXX.XXX.XXX”;

Where you need to set shared IP in above example