Top Nav

Archive | Reliable Penguin

Linux and open-source solutions.

PayPal Certificate Upgrade

PayPal is upgrading the certificate for www.paypal.com to SHA-256. This endpoint is also used by merchants using the Instant Payment Notification (IPN) product.

A detailed FAQ has been provided here:

Merchant Security System Upgrade Guide

Also the microsite:

2015-2016 SSL Certificate Change

For most online store owners the primary concern is that your server has the correct new G5 certificate installed. Instructions for testing can be found here:

Cert Check For Linux

If you’re running CentOS or RedHat then the command is:

 

 

0

MariaDB on CentOS 7 – “Error in accept: Too many open files”

By default is seems the soft and hard open files limits on MariaDB in CentOS 7 are 1024 and 4096 respectfully. You can see these limits by first getting the process ID:

And then looking at the limits in the proc filesystem:

You’ll see something like this:

Notice the numbers for “Max open files”.

If you run into problems with MariaDB failing and you see errors like this in the log:

Then you need to increase the open files limits by editing:

and adding this line:

to the “[Service]” section. Then reload the systemctl daemon:

and restart the MariaDB service:

Now the limit will be increased.  For example:

UPDATE: We’ve seen similar problems with nginx. The solution is similar … increase the limits for the nginx service.

UPDATE: As noted by Bastiaan Welmers in the comments, it better to copy the service control file then to edit:

UPDATE: 

As describe here:

https://docs.fedoraproject.org/en-US/quick-docs/systemd-understanding-and-administering/#_modifying_existing_systemd_services

Create an override file with:

or:

Put the modified settings in the override file:

Reload systemd config:

And restart mariadb:

UPDATE:

On server with Plesk, view the current open files limit with:

 

 

 

 

 

 

4

XFS Requires “inode64” On Large Filesystems

Recently ran into a problem with a large distributed GlusterFS filesystem. All of a sudden we started getting errors about no free space on device when trying to write files. The individual bricks on the distributed GlusterFS filesystem were hosted on XFS formatted partitions. After some investigation we found that when the size of the brick’s XFS filesystem exceeded 16TB the “no free space” errors started.

The solution was to add “inode64” to the mount options for the XFS partition. The XFS FAQ states the following:

By default, with 32bit inodes, XFS places inodes only in the first 1TB of a disk. If you have a disk with 100TB, all inodes will be stuck in the first TB. This can lead to strange things like “disk full” when you still have plenty space free, but there’s no more place in the first TB to create a new inode. Also, performance sucks.
To come around this, use the inode64 mount options for filesystems >1TB. Inodes will then be placed in the location where their data is, minimizing disk seeks.

After adding “inode64” to /etc/fstab, we mounted and unmounted the filesystem and restarted Glusterd. Now the distributed partition is working correctly.

0

How To Clear btmp File

Running low on storage. Check the /etc/btmp file where failed login attempts are logged. This file may be very large:

The file can be cleared like this:

Credit for this goes to Tournas Dimitrios who has a great article on btmp:

https://tournasdimitrios1.wordpress.com/2010/12/28/how-to-clear-and-delete-last-logged-in-users-and-bad-login-attemps-log-wtmp-and-btmp/

2

Redirect Generator

Happened onto this “301 Redirect Generator” page today:

http://www.rapidtables.com/web/tools/redirect-generator.htm

What’s notable is that it can generate PHP, ASP, ASP.Net, .htaccess, HTML meta tag and Javascript redirects. I used it to generate some redirects on a Windows server in ASP.Net.

Noted too is the lack of support for Web.config HTTP Redirects and Nginx.

Anybody know of a better tool for generating redirects?

0