Author Archives: LinuxTech

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

 

 

 

 

mysqldump: Got error: 1017: Can’t find file: ‘wp_wfBadLeechers’ (errno: 2) when using LOCK TABLES

While making full backup of mysql using below command we got error

mysqldump: Got error: 1017: Can’t find file: ‘wp_wfBadLeechers’ (errno: 2) when using LOCK TABLES

# mysqldump –all-databases > /backup/all_databases.sql

The issue was due to some corrupt tables

Below is the fix used for  making a full dump of database ignoring error

mysqldump –skip-lock-tables -f –all-databases > /backup/all_databases.sql

Mysql backup was completed ignoring the corrupt tables.

 

 

 

 

 

Your server’s MySQL/MariaDB RPM target is set to “unmanaged”. cPanel

Was getting this error while trying to upgrade mysql in WHM/cPanel,

Your server’s MySQL/MariaDB RPM target is set to “unmanaged”. You cannot use the MySQL/MariaDB Upgrade feature while your server is in this state.

The issue was due to entry in file /var/cpanel/rpm.versions.d/local.versions set mysql to unmanaged

Went ahead and set it to managed and was able to upgrade mysql from WHM without any issues

 

 

 

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

 

 

 

FAILED to open PAM security session (Module is unknown)

Cron Jobs in server were not getting executed automatically

On investigating I could see error like

Jun 16 14:05:01 ok1110 crond[5913]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:05:01 ok1110 crond[5912]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:06:01 ok1110 crond[6021]: (root) FAILED to open PAM security session (Module is unknown)

On deeper investigating I found the issue was in file

 /etc/pam.d/crond

I went ahead and copied file from working server and fixed this issue.

  • PAM configuration is the default:
$ cat /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
auth       sufficient pam_env.so
auth       required   pam_rootok.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
session    required   pam_loginuid.so
session    include    system-auth


If this file is modified the crond does not work for any users.

 

 

 

E: Unable to locate package Ubuntu

While trying to install some new software in Ubuntu I was getting error

E: Unable to locate package Ubuntu

I tried updating using command sudo apt-get update

However it didnt work

sudo apt-get install anydesk_2.9.1-1_amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package anydesk_2.9.1-1_amd64.deb
E: Couldn’t find any package by glob ‘anydesk_2.9.1-1_amd64.deb’
E: Couldn’t find any package by regex ‘anydesk_2.9.1-1_amd64.deb’
home@home:~/Desktop/shraddha$ cd ..

 

You need to use command  sudo dpkg –install    filename.deb to get this installed

 

sudo dpkg –install anydesk_2.9.1-1_amd64.deb
Selecting previously unselected package anydesk.
(Reading database … 247265 files and directories currently installed.)
Preparing to unpack anydesk_2.9.1-1_amd64.deb …
Unpacking anydesk (2.9.1-1) …
Setting up anydesk (2.9.1-1) …
Processing triggers for gnome-menus (3.13.3-6ubuntu3) …
Processing triggers for desktop-file-utils (0.22-1ubuntu5) …
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) …
Rebuilding /usr/share/applications/bamf-2.index…
Processing triggers for mime-support (3.59ubuntu1) …
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) …
Processing triggers for man-db (2.7.5-1) …

 

 

 

 

IDN Addon Domain Issue

We had been working on adding an IDN addon domain in cPanel and received invalid domain name.

Internationalized domain name – Wikipedia
An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in software applications, in whole or in part, in a language-specific script or alphabet

Domain cannot be added directly in cPanel because domain contains at least one label

Domain Name : lamé.com

We need to use below converter to convert the IDN to ASCII

http://idna-converter.com/?decoded=lam%C3%A9.com&encoded=&doencode=Encode+%3E%3E

Unicode url/domain: lamé.com

ASCII/Punycode (ACE) : xn--lam-dma.com

Once domain is converted in ASC can be added in cPanel.