Tag Archives: linux

Solution to Tomcat’s broken pipe error

         Broken pipe means that a pipe is broken. It is simply understood that there may be an IO or network problem between Tomcat’s server and client, resulting in one end being closed. Often occurs when the verification code cannot be displayed.

        Solution: enter the Linux environment variable file configuration parameters and configure them in/etc/profile.

        Set parameters at the end of the document:    export _ JAVA_ SR_ SIGNUM=12

export _ JAVA_ SR_ Signum = 12, 12 can be replaced by 16

Note: this method may solve the symptoms but not the root cause, or it should solve the problem code, or it is the wrong connection method. It’s best to tune the JVM. I hope you can give me some advice.

Runtime error – [xcodeproj] unknown object version. [How to Solve]

Error during pod install:

### Error

“`
RuntimeError – [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.15.0/lib/xcodeproj/project.rb:227:in `initialize_from_file’
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.15.0/lib/xcodeproj/project.rb:112:in `open’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1177:in `block (2 levels) in inspect_targets_to_integrate’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1176:in `each’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1176:in `block in inspect_targets_to_integrate’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1171:in `inspect_targets_to_integrate’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:106:in `analyze’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in `install!’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run’
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run’
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>’
/usr/local/bin/pod:23:in `load’
/usr/local/bin/pod:23:in `<main>’
“`

Reason: Xcode version and CocoaPods version do not match, need to update CocoaPods
Solution.
Enter the command in the terminal

gem install cocoapods --pre

Error Messages:

ERROR:  While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

Plus permissions:

sudo gem install cocoapods --pre

Execute pod install again successfully!

Error: loading shared libraries: cannot open shared object file: No such file or directory

Error : loading shared libraries: cannot open shared object file: No such file or directory

1. Problem Description:

The program s needs the support of Library L1 and Library L2 to run Library L1/L2 after installation, when executing software s, Library L2 shared object cannot be loaded, prompting that the file or path does not exist

**2. Solution:**

When the library is dynamic library, you need to indicate the path of the dynamic library for the operating system when running the program s.

2.1 determine the path of Library :
$ sudo find/-name library_name.so
2.2 determine whether the dynamic library path exists in the environment variable (ld_library_path) 
$ echo $LD_LIBRARY_PATH 
2.3 assign the dynamic library path to the environment variable (ld_library_path)
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/the/lib
$ export LD_LIBRARY_PATH

You can run the program.

expand:

**1. Library files in linux System: * *
library is a collection of precompiled code segments called functions. Libraries contain common functions that together form a package called a library. Functions are blocks of code that are reused throughout the program. Calling these code fragments repeatedly in the program can save time. You can avoid rewriting code multiple times. For programmers, libraries provide reusable functions, data structures, classes, and so on.

Libraries are not executable, which is the key difference between processes and applications. Libraries work at run time or compile time. In C programming language, there are two types of Libraries: dynamic library and static library.

**Dynamic and static libraries: * *
dynamic or shared libraries appear as independent files other than executable program files. Therefore, the program only needs one copy of the dynamic/shared library file at run time. The static libraries are locked in the program.

**2. linux system environment variables: * *
environment variables and shell variables:

Environment variables are managed by the shell. The difference between environment variables and regular shell variables is that shell variables are local variables of specific instances of shell, such as shell scripts, while environment variables are “inherited” by any program you start, including another shell. In other words, the new process obtains copies of its own variables. It can read and modify these variables and pass them to its child processes in turn. In fact, every UNIX process (not just shell) passes its environment variables to its child processes.

Environment variables are globally available in programs and their subroutines. Shell variables are only available in the current shell. Environment variables like $shell are valid system wide. In the current bash shell, $bash points to the execution path of bash, while $shell points to the shell (its value may be the same) defined as Default.

#Define the shell variable VAR and its value
[biocodee@localhost ~]$ VAR="This is a variable"
[biocodee@localhost ~]$ echo $VAR
This is a variable
# See if the shell variable exists in the environment variable env
[biocodee@localhost ~]$ env | grep VAR
# Convert a shell variable to an environment variable
[biocodee@localhost ~]$ export VAR
[biocodee@localhost ~]$ env | grep VAR
VAR=This is a variable

[Solved] Linux: downloading arXiv papers using WGet: error 403: forbidden

Use command

wget https://arxiv.org/pdf/The_papers_you_need_to_download.pdf

from vengeance.”

Resolution arxiv.org (arxiv.org)…128.84.21.199
Connecting to arxiv.org (arxiv.org)|128.84.21.199|:443… Available403 Forbidden
2021-10-22 13:57:11 ERROR 403: Forbidden

The solution is:

Modified:

wget -U NoSuchBrowser/1.0 https://arxiv.org/pdf/The_papers_you_need_to_download.pdf

You can download it successfully

Some error occurred error: listen eaddinuse: address already in use 127.0.0.1:3000

In this case, the port is occupied
solution:
window + R open run input CMD open DOS command window

Input: netstat - ano view port

the red mark indicates that the port is occupied,

Enter the TCP number corresponding to taskkill/F/T/im in CMD to turn off the occupied port
and then NPM run serve can be run normally

How to Solve Fatal error stdatomic in C/C++ Compilation

Fatal error: stdatomic. H: no such file or directory

Under Linux, errors are reported when compiling the source code using gcc

fatal error: stdatomic.h: No such file or directory
 #include <stdatomic.h>
                       ^
compilation terminated.

The reason is that the version of GCC 4.8 is too low and requires a higher version of GCC. How to safely upgrade the GCC version?

The devtoolset package can be installed through CentOS release SCL source

yum install centos-release-scl
yum install devtoolset-8

Or add your own source to install it (I’ll take centos7 as an example)

vi /etc/yum.repos.d/CentOS-SCLo-scl.repo
[centos-sclo-sclo]
name=CentOS-7 - SCLo sclo
baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/
#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-sclo
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

Activate the GCC version to make it effective

scl enable devtoolset-8 bash

or

source /opt/rh/devtoolset-8/enable

At this time, you can see through the GCC — version command that the GCC version has changed to 8.X.x. it is worth noting that this only takes effect in the current bash. If it needs to take effect permanently, you can add environment variables yourself.

rsync error: error allocating core memory buffers

1、 Problem description

When using Rsync file transfer, the same two servers transfer the same file. One succeeds and the other reports the following error. It is obvious that there is insufficient memory

[root@sss085080 ~]# rsync -atvu /alauda/new/* /alauda/data/
sending incremental file list
ERROR: out of memory in flist_expand [sender]
rsync error: error allocating core memory buffers (code 22) at util2.c(106) [sender=3.1.2]
ERROR: out of memory in flist_expand [receiver]
rsync error: error allocating core memory buffers (code 22) at util2.c(106) [receiver=3.1.2]

2、 Process analysis

Successful server

  Failed server

  3、 Solution

It can be seen from the above server parameters that the successful server has enabled swap. If the memory is insufficient, swap will be used. However, if the failed server is not enabled, exceptions will be thrown directly when the memory is insufficient. Therefore, in this case, the two solutions are available

1. Turn on swap
2. Expand the memory of the machine

Linux Error: Failed to connect to ::1: No route to the host

When I started es on Linux today, it showed that I did not find the route of the host, and I reported similar errors before, because the port was not configured in Alibaba cloud security group configuration, and this problem was solved after configuration. Today, this problem arises again. I can’t help but let people think about it. Later, it was found that kenneng was caused by insufficient memory automatically allocated to the JVM when ES was started. Therefore, we need to modify the default memory parameters.

We go to jvm.options under config in the ES folder

Since the memory of the server you bought is only 2G, 218m is allocated (Note: – XMS and no space between numbers)

[Ubuntu] How to Solve dpkg Error: dpkg: error: failed to open package info file ‘/usr/local/var/lib/dpkg/status’ for reading: No such file or directory

Error Message:
dpkg: error: failed to open package info file ‘/usr/local/var/lib/dpkg/status’ for reading: No such file or directory
dpkg: error: failed to open package info file ‘/usr/local/var/lib/dpkg/available’ for reading: No such file or directory

Solution:
cp -a /var/lib/dpkg/status-old /usr/local/var/lib/dpkg/status
cp -a /var/lib/dpkg/available /usr/local/var/lib/dpkg/available
dpkg --configure -a

Error report after installing Oracle GoldenGate monitor agent oggmon-20603

Problem phenomenon: after the Oracle Golden Gate monitor agent is installed normally, check that the jagent process already exists in info all, and the process can also be started normally, but the Ogg component can not be found in the automatic search of the OEM’s Ogg plug-in;

Troubleshooting: how to run jagentdebug.jar debug script to help with golden gate monitoring issues (OEM/Ogg monitor server)?Jagentdebug.jar debug in (DOC ID 2410209.1), the installation of the entire Ogg monitor client is also normal; After troubleshooting, the logs of Ogg Monitor reported errors such as oggmon-20603 and oggmon-20609. After further analysis and troubleshooting, patch 29684138 needs to be installed (when Ogg monitor monitors Ogg versions above 18C, Ogg 19.1.0.0.210720 is used this time)   Version), after installing this patch, you can search Ogg from oem13.2 and add monitoring;

Log information of Ogg monitor client:

[2021-10-15T10:29:53.650+08:00] [JAGENT] [ERROR] [OGGMON-20603] [com.goldengate.monitor.jagent.comm.ws.ManagerService] [tid: MessageCollector] [ecid: 0000Nm1gtXy0rm^_xTs1yW1XQE8n000002,0] RESTful Web Service with name messages/last has become unresponsive
[2021-10-15T10:29:58.607+08:00] [JAGENT] [ERROR] [OGGMON-20494] [com.goldengate.monitor.jagent.comm.ws.NotificationsCollector] [tid: StatusCollector] [ecid: 0000Nm1gtXx0rm^_xTs1yW1XQE8n000001,0] Error occurred while registering the OGG process. Exception: [[
 source parameter must not be null 
]]
[2021-10-15T10:29:58.651+08:00] [JAGENT] [ERROR] [OGGMON-20609] [com.goldengate.monitor.jagent.comm.ws.ManagerService] [tid: MessageCollector] [ecid: 0000Nm1gtXy0rm^_xTs1yW1XQE8n000002,0] Unsuccessful connection response from Message Web Service. Query String: messages/last ; Response Code: 404 ; Response Message: Not Found
[2021-10-15T10:29:58.652+08:00] [JAGENT] [ERROR] [OGGMON-20603] [com.goldengate.monitor.jagent.comm.ws.ManagerService] [tid: MessageCollector] [ecid: 0000Nm1gtXy0rm^_xTs1yW1XQE8n000002,0] RESTful Web Service with name messages/last has become unresponsive
[2021-10-15T10:29:58.652+08:00] [JAGENT] [ERROR] [OGGMON-20609] [com.goldengate.monitor.jagent.comm.ws.ManagerService] [tid: MessageCollector] [ecid: 0000Nm1gtXy0rm^_xTs1yW1XQE8n000002,0] Unsuccessful connection response from Message Web Service. Query String: messages/last ; Response Code: 404 ; Response Message: Not Found

Patching process:

GGSCI (oracle12c) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
JAGENT      STOPPED                                           
PMSRVR      STOPPED                                           
EXTRACT     RUNNING     EXT1        00:00:00      00:00:00    
EXTRACT     RUNNING     PUMP1       00:00:00      00:00:04    


Close the JAGNET process first, so that there is no active process in the OGG MONITOR directory, you can ps -ef to confirm, and then you can patch it, the same reason as ORACLE database software patching.
$export ORACLE_HOME=/oracle/wls ===>> To set the OGG installation path

[oracle@oracle12c:/home/oracle/29684138]$/oracle/wls/OPatch/opatch lsinv
Oracle Interim Patch Installer version 13.9.1.0.0
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/wls
Central Inventory : /oracle/oraInventoryogg
   from           : /oracle/wls/oraInst.loc
OPatch version    : 13.9.1.0.0
OUI version       : 13.9.1.0.0
Log file location : /oracle/wls/cfgtoollogs/opatch/opatch2021-10-15_13-37-51PM_1.log


OPatch detects the Middleware Home as "/oracle/wls"

Lsinventory Output file location : /oracle/wls/cfgtoollogs/opatch/lsinv/lsinventory2021-10-15_13-37-51PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oracle12c
ARU platform id: 226
ARU platform description:: Linux x86-64


Interim patches (6) :

Patch  22754279     : applied on Thu Oct 14 21:09:29 CST 2021
Unique Patch ID:  20383951
Patch description:  "One-off"
   Created on 9 Jul 2016, 00:36:58 hrs UTC
   Bugs fixed:
     22754279

Patch  21663638     : applied on Thu Oct 14 21:09:02 CST 2021
Unique Patch ID:  20477024
Patch description:  "One-off"
   Created on 31 Aug 2016, 21:01:13 hrs UTC
   Bugs fixed:
     21663638

Patch  19795066     : applied on Thu Oct 14 21:08:34 CST 2021
Unique Patch ID:  19149348
Patch description:  "One-off"
   Created on 16 Jul 2015, 15:51:43 hrs UTC
   Bugs fixed:
     19795066

Patch  19632480     : applied on Thu Oct 14 21:08:08 CST 2021
Unique Patch ID:  19278519
Patch description:  "One-off"
   Created on 25 Aug 2015, 07:19:43 hrs UTC
   Bugs fixed:
     19632480

Patch  19154304     : applied on Thu Oct 14 21:07:41 CST 2021
Unique Patch ID:  19278518
Patch description:  "One-off"
   Created on 25 Aug 2015, 07:10:13 hrs UTC
   Bugs fixed:
     19154304

Patch  19030178     : applied on Thu Oct 14 21:07:14 CST 2021
Unique Patch ID:  19234068
Patch description:  "One-off"
   Created on 4 Aug 2015, 05:40:22 hrs UTC
   Bugs fixed:
     19030178



--------------------------------------------------------------------------------

OPatch succeeded.


[oracle@oracle12c:/home/oracle/29684138]$/oracle/wls/OPatch/opatch apply
Oracle Interim Patch Installer version 13.9.1.0.0
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/wls
Central Inventory : /oracle/oraInventoryogg
   from           : /oracle/wls/oraInst.loc
OPatch version    : 13.9.1.0.0
OUI version       : 13.9.1.0.0
Log file location : /oracle/wls/cfgtoollogs/opatch/opatch2021-10-15_13-38-00PM_1.log


OPatch detects the Middleware Home as "/oracle/wls"

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   29684138  

Do you want to proceed?[y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/wls')


Is the local system ready for patching?[y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '29684138' to OH '/oracle/wls'

Patching component oracle.ogg.monitor.agent, 12.2.1.2.0...

Patching component oracle.ogg.monitor.agent, 12.2.1.2.0...
Patch 29684138 successfully applied.
Log file location: /oracle/wls/cfgtoollogs/opatch/opatch2021-10-15_13-38-00PM_1.log

OPatch succeeded.