Category Archives: Linux

Linux being one of the most widely used system now a days we shared tips here which user may find useful
The commands and tricks being shared are already implemented on production servers
which you can use without any worries.

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

 

One of the client was getting error while accessing Dell IPMi

Secure Connection Failed

The connection to 198.1xx.x.xxx was interrupted while the page was loading.

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.

The issue can be resolved using below steps

By executing below commands in server via cli

SSH to concerned server  and reset IPMI using

yum install OpenIPMI OpenIPMI-tools

modprobe ipmi_msghandler

modprobe ipmi_devintf

modprobe ipmi_si

ipmitool  mc reset cold

This fixed the issue.

 

error connection dropped by imap server. query capability

Was getting the error for squirrel mail on cpanel server

On Investigating could see issue was in Dovecot

Below is the fix I used

It’s possible that this can be rectified by increasing “Maximum Size of a Mail Process (MB)” under
Main >> Service Configuration >> Mailserver Configuration in WHM.

Once I did it the squirrel mail start working like a charm 🙂

 

 

 

ssh_exchange_identification: Connection closed by remote host

Was getting error while trying to SSH  to one of  the server on port 22

ssh_exchange_identification: Connection closed by remote host

The issue is due to too many excessive connections on port 22

You can fix it by below change  in SSH config

 MaxStartups variable in /etc/ssh/sshd_config to ,

port 2222 or any port you need to  and  
MaxStartups 100

Restart the SSH service ,

service sshd restart

W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

 

While trying to run an update  in Ubuntu 14.04 was getting an error

sudo apt-get update

 

Hit http://security.ubuntu.com trusty-security InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:1 http://ppa.launchpad.net precise Release.gpg [836 B]
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise Release
Hit http://security.ubuntu.com trusty-security/restricted Sources
Ign http://ppa.launchpad.net precise/main amd64 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/universe Sources
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Ign http://ppa.launchpad.net precise/main Translation-en_US
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty InRelease
Hit http://nl.archive.ubuntu.com trusty-updates InRelease
Hit http://nl.archive.ubuntu.com trusty Release.gpg
Hit http://nl.archive.ubuntu.com trusty-updates/main Sources
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://nl.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nl.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://nl.archive.ubuntu.com trusty Release
Hit http://nl.archive.ubuntu.com trusty/main Sources
Hit http://nl.archive.ubuntu.com trusty/restricted Sources
Hit http://nl.archive.ubuntu.com trusty/universe Sources
Hit http://nl.archive.ubuntu.com trusty/multiverse Sources
Hit http://nl.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty/main Translation-en
Hit http://nl.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 836 B in 19s (43 B/s)
Reading package lists… Done
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

The way to fix this error is by adding a key

Below is the step to add keys

sudo apt-key adv –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD

Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –homedir /tmp/tmp.z6Pp5ZKvEp –no-auto-check-trustdb –trust-model always –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD
gpg: requesting key 4A1DB3CD from hkp server ha.pool.sks-keyservers.net
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD: public key “Launchpad PPA for Roman Koblov” imported

 

Now apt-get update work fine without any errors