Author Archives: Robins

Linux Log Error: cannot update mailbox /var/mail/root for user root. error writing messa ge: File too large

When checking the server in the morning, I accidentally found this log error in tail – F/var/log/message,

cannot update mailbox /var/mail/root for user root. error writing messa ge: File too large

Earlier today while looking into an issue on a CentOS Linux server I noticed an error message in the maillog file. The mail server running on this Linux server is Postfix and it appeared to have been complaining of the size of root’s mailbox located at /var/mail/root. When I first started investigating I figured I was going to see root’s mailbox at a size of 1GB or 2GB but I was surprised when looking into the issue that root’s mailbox was only about 48MB in size so at first I thought there might be another problem. After some digging around in /etc/postfix I figured out that Postfix limits the size of local mailboxes to 51200000 bytes or 48.8MB. Below is information on how I discovered the issue as well as how to modify the size that Postfix limits local mailboxes to.
You can use postconf -n to view the relevant configuration information, as follows;

[root@localhost ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

The main reason for this problem is that in the postfix configuration file main.cf.default

mailbox_size_limit = 51200000(50M)

That is, when the size of the user’s corresponding/var/mail/username file cannot exceed 50m, if it exceeds this value, it may be unacceptable to send.

Solution:

Yes, reset  postfix main.cf.default the corresponding mailbox in the configuration file_size_limit=51200000

If change to mailbox_size_imit = 0, there is no limit

Or:

[root@localhost ~]# postconf -e mailbox_size_limit=0

After modifying postfix maincf You need to reload postfix # service # postfix # reload when deafault configuration file is

[Solved] php -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory

Currently from PHP5 6 when upgrading to PHP 7.4, directly replace the compiled installation package. When entering PHP – V, an error will be reported: error while loading shared libraries: libonig so.5:cannot open share directory

#php -v
#php: error while loading shared libraries: libonig.so.5:cannot open share directory

Solution:

Step 1

Modify /ECT/LD.so.conf and add the following line:

#vim /etc/ld.so.conf
include ls.so.conf.d/*.conf
/usr/local/lib
/usr/local/x264/lib
/usr/local/openssl/lib
/usr/local/python3.7.1/lib

After saving, execute ldconfig

#ldconfig

Step 2:

Install oniguruma lirary

Download:

https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-6.8.2-1.el7.x86_64.rpm

https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-6.8.2-1.el7.x86_64.rpm

oniguruma-6.8.2-1.el7.x86_64.rpm

oniguruma-devel-6.8.2-1.el7.x86_64.rpm

Use the following commands to install

#rpm -ivh oniguruma-devel-6.8.2-1.el7.x86_64
#rpm -ivh oniguruma-6.8.2-1.el7.x86_64

Then run the command PHP – V to display it perfectly

In case of installation error

Generating autotools files.
./autogen.sh: line 6: autoreconf: command not found

Solution:

[root@yjweb oniguruma-6.9.4]# yum install autoconf automake libtool

Error:Rule can only have one resource source [How to Solve]

 ERROR  Error: Rule can only have one resource source (provided resource and test + include + exc
lude) in {
“type”: “javascript/auto”,
“include”: [
{}
],
“use”: []
}

If NPM I – D webpack is directly installed, the webpack@5 However, Vue cli depends on webpack@4, so it will report an error.

Solution:

NPM un – D webpack uninstall webpack

Or install the version directly in package JSON: “webpack”: “4.23.0”

[Solved] MySQL Fail to Start Error: Error number 28 means ‘No space left on device’

Error Messages:
InnoDB: Write to file ./ib_logfile1failed at offset 1333788672, 1048576 bytes should have been written, only 786432 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 28 means ‘No space left on device’
[ERROR] InnoDB: Cannot set log file ./ib_logfile1 to size 2048 MB
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[ERROR] Plugin ‘InnoDB’ init function returned error.
[ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize builtin plugins.
[ERROR] Aborting

Cause:
Insufficient hard disk space

Solution:
Clear the hard disk space and restart MySQL service.

[Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid

Restart the server, access the web service and find that you can’t browse! After logging in to the server, I went to nginx and used. /nginx -s reload to re-read the configuration file, and found that nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory), went to the logs file and found that there was no nginx.pid file
[root@localhost sbin]# . /nginx -s reload
nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)

Solution:
[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
Use the nginx -c argument to specify the location of the nginx.conf file
[root@localhost nginx]# cd logs/
[root@localhost logs]# ll
Total usage 12
-rw-r–r– 1 root root 1246 Dec 9 18:10 access.log
-rw-r–r– 1 root root 516 Dec 10 15:39 error.log
-rw-r–r– 1 root root 5 Dec 10 15:38 nginx.pid
Look at the nginx.pid file already.

How to fix VirtualBox session error: Call to NEMR0InitVMPart2 failed VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED)

How to fix VirtualBox session error: Call to NEMR0InitVMPart2 failed VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED)
Learn how to fix this error that prevents Virtual Machines from starting in VirtualBox.

After a couple of months without working with Virtual Machines, I tried to launch an old ubuntu 20.04 machine in VirtualBox to test some stuff. Curiously, I got a kernel panic error, whose “solution” ended up causing the exception that I’m going to solve in this article. I updated VirtualBox 6.1.16 to the 6.1.28 version and tried to launch the machine again but without success.
After some research and applying the solution that I’m going to show in this article, the virtual machines were able to work again as usual.
How to fix

bcdedit /set hypervisorlaunchtype off

Then run this one:

DISM /Online /Disable-Feature:Microsoft-Hyper-V

Finally, be sure to restart your computer, try launching your virtual machine once again and voila! It should work now.
Notes about this problem
Normally, this will only appear the first time that you work with VirtualBox. However, if the problem reappears a couple of months later after installing a new version of VirtualBox, you may be probably using Docker Desktop as well in your computer. Am I right?:

In case you’re not using Docker, if you decide to use it, you will enter into this error cycle whenever you want to work one day with VirtualBox and the other day with docker, as for Docker in order to properly work, HyperV, Virtual Machine Platform, Windows Subsystem for Linux and the Windows Sandbox features must be enabled in your system (check docker docs). So, if you’re done with VirtualBox for today and want to work tomorrow with Docker, be sure to enable the services again:

bcdedit /set hypervisorlaunchtype auto 

And this one:

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

And restart for the changes to take effect.
Happy coding ❤️!

[Solved] Emqx – /usr/lib/emqx/bin/cuttlefish: error while loading shared libraries: libtinfo.so.5: cannot ope

linux Install EMQX error: error while loading shared libraries: libtinfo.so.5
/usr/lib/emqx/bin/cuttlefish: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

When we installed Emqx on Linux, we found that always at boot time (. /emqx console), it reported an error: /usr/lib/emqx/bin/cuttlefish: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory; at first I thought it was a version problem, I tried various versions on the EMQ website, as well as binary packages and zip packages, but there was no way to avoid the above error message, and the startup failed.

Solution:
# find/-name libtinfo.so
/usr/lib64/libtinfo.so
# ll /usr/lib64/ |grep libtinfo.so
-rwxr-xr-x  1 root root   179264 Sep 19  2019 libtinfo.so.6.0
# sudo ln -s /usr/lib64/libtinfo.so.6.0 /usr/lib64/libtinfo.so.5
lrwxrwxrwx  1 root root       26 Oct 26 07:32 libtinfo.so.5 -> /usr/lib64/libtinfo.so.6.0

[Solved] Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize “”: no matches for kind “CustomResourceDefinition” in version “apiextensions.k8s.io/v1beta1”

My problem is that this error is reported when installing} Prometheus operator in k8s cluster

Cause of the problem

My cluster version is too high, version 1.22, and the name of the version after Prometheus operator has been changed. The old version is incompatible,

┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm  search repo prometheus-operator
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
ali/prometheus-operator         8.7.0           0.35.0          Provides easy monitoring definitions for Kubern...
azure/prometheus-operator       9.3.2           0.38.1          DEPRECATED Provides easy monitoring definitions...
┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm install liruilong  ali/prometheus-operator
Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
┌──[[email protected]]-[~/ansible/k8s-helm-create]

Solution:

With the new version of chart, GitHub’s address is:

https://github.com/prometheus-community/helm-charts/releases/download/kube-prometheus-stack-30.0.1/kube-prometheus-stack-30.0.1.tgz

Then, after all nodes are OK, change the SVC type and you can access it on the host

[Solved] An error occurred while updating the entries. See the inner exception for details.

Error message:

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'StatusId'.

There is an error updating the database. The field StatusId is invalid

Solution:

After checking, it is found that the data model in the program is StatusId, and the actual database field has been changed to statusvalues

You just need to determine which field to use, make synchronous modifications and use the same field.

[Solved] Error type 3 Error: Activity class {com.example.xxxxxx/com.example.xxxx.MainActivity} does not exist

The following errors are reported when your software is installed on the real machine for the second time

Error type 3 Error: Activity class {com.example.xxxxxx/com.example.xxxx.MainActivity} does not exist

Solution:

1. Check whether the package in AndroidManifest.xml and the applicationId in build.grade are consistent (where most of the problems are), modify them and try again after the inconsistency
2. Try to uninstall the original software adb uninstall packagename (replace it with your own)
Sometimes even if you manually uninstall, adb uninstall will still Success, should not be successful uninstall or uninstallation problems, and use pm to see no results at all