The solution to the error “Another app is currently holding the xtables lock”

Recently noticed on one server with the billing system ABillS, that when the script /etc/ppp/ip-up is executed in bulk, an error occurs:

Another app is currently holding the xtables lock. Perhaps you want to use the -w option?

Having looked at the script code, I found that there are two rules among the iptables rules that can slow down the work, namely, the search for ipoe interfaces by two commands:

IPTABLES="/sbin/iptables"
EXIST=`${IPTABLES} -t nat -L PREROUTING -v | grep "${IFNAME} ";  ${IPTABLES} -L -v | grep DROP | grep "${IFNAME} "`

To raise 3000 sessions, it took more than 30 minutes and some rules could not be added at all or deleted by the script.
By default, if the -L option is used, iptables resolves the IP addresses and tries to display DNS names instead of them, which takes a long time, and so that this does not happen, you need to add the -n option, and just in case I added the -w 20 switch, which will cause the new rules to be postponed until 20 seconds if iptables is already busy executing another command:

IPTABLES="/sbin/iptables"
IPTABLES_WAIT="-w 20"
EXIST=`${IPTABLES} $IPTABLES_WAIT -t nat -n -L PREROUTING -v | grep "${IFNAME} ";  ${IPTABLES} $IPTABLES_WAIT -n -L -v | grep DROP | grep "${IFNAME} "`

After that, the script with iptables rules began to work out instantly.
Since the old rules are not all fulfilled, I checked this by counting some by the team:

iptables -n -L -t nat -v | grep DNAT | wc -l

And I checked with the number of sessions, the rules were obviously smaller, so I had to clear all rules and restart the session so that the /etc/ppp/ip-up script worked correctly, this time at 3000 sessions it did its job in less than a minute.

How I closed the account in Polish Pecao Bank

Once a friend from Ukraine asked me to help her with the closing of the account in the Polish bank Pecao.
She was not going to go to Poland and therefore could not visit the bank, so I started correspondence with employees by email, which was specified in the contract, and also is on the official website.

In the first message, I asked how you can close the bank account and the employee replied that you need to visit the bank for this, but you can also write a written request and send it along with the bank card by the postal service to the bank branch where the account was opened.

Continue reading How I closed the account in Polish Pecao Bank

The problem with pink video distortion in Adobe Premiere

Once I made a project in Adobe Premiere and I had to pull out the video card, after I pulled it out, I started using the integrated Intel HD Graphics 630 and I had a problem with the image. The video became distorted, most often with pink and green stripes.
Just in case, I exported the project to a video file and wanted to continue it on another computer, but the video file turned out to be also with these distortions.
I tried to reinstall Adobe Premiere, but it did not help.

Continue reading The problem with pink video distortion in Adobe Premiere

Accel-ppp installation

In this article, I’ll give an example of how to build and install accel-ppp in Ubuntu Server.

The accel-ppp requirements are:
A modern Linux distribution
Kernel 2.6.25 or later
cmake is not younger than version 2.6
libcrypto-0.9.8+ (openssl-0.9.8)
libpcre
net-snmp-5.x (for snmp)
liblua5.1 (for IPoE DHCP option 82)

Continue reading Accel-ppp installation

Solution “Internal Server Error” when opening Nextcloud

Recently moved Nextcloud from one server to another and when it opened, noticed the following error in the browser:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

In my case, the error occurred because of a damaged MySQL database, so I restored it from another backup and Nextcloud opened.
I assume that the same error can occur when the Nextcloud database exists, but is empty.

See my article:
Install Nextcloud in Ubuntu

Solution MySQL ERROR 1055 (42000)

Recently performed the necessary SQL queries and noticed the following error:

ERROR 1055 (42000): Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_name.table_name.column_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Continue reading Solution MySQL ERROR 1055 (42000)

How to see the process of importing a SQL file?

In order to see the process of importing SQL files, I use the Pipe Viewer utility.
Pipe Viewer is very useful especially when the SQL file is large, allows you to roughly estimate the remaining time before the import of the file is completed, displays the import process in percent and the time passed.

You can install the Pipe Viewer in Ubuntu/Debian using the command:

sudo apt install pv

In Fedora:

yum install pv

Suppose earlier we imported a sql file and did not see the process:

mysql -u root DATABASE_NAME < dump.sql

Now, to see the process, we will perform the import using the Pipe Viewer:

pv dump.sql | mysql -u root DATABASE_NAME

Configuring Huawei Quidway S3900 Switches

For example, take the switch Huawei Quidway S3928P-EI, the settings are essentially suitable for the entire Huawei Quidway S3900 series, but may differ slightly depending on the firmware version. If something fails to register, then you can see the options for the teams by typing a question mark after a space after any command.

At me at switching-on of the switch, through the console the following characteristics were displayed:

Creation date: Aug 25 2006
CPU type: BCM4704
CPU Clock Speed: 200MHz
BUS Clock Speed: 33MHz
Memory Size: 64MB

Let’s see the current configuration with the command:

display current-configuration

To enter the configuration mode, type:

system-view

Continue reading Configuring Huawei Quidway S3900 Switches