Category Archives: Linux

[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.

Ubuntu: pdserving deployment output log.txt Error

Error message:

Changing the config.yaml path in the web_service.py file to an absolute path is also incorrect, and also tried unset https_proxy
unset http_proxy, but the error code is as follows:
More information: The
model is self-trained det (SAST) rec (EN_Number_Lite)
The configuration of the model corresponding to the depoly has also been modified

Traceback (most recent call last):
  File "web_service.py", line 159, in <module>
    uci_service.prepare_pipeline_config("config.yml")
  File "/home/dapeng/.local/lib/python3.7/site-packages/paddle_serving_server/web_service.py", line 65, in prepare_pipeline_config
    self._server.prepare_server(yaml_file)
  File "/home/dapeng/.local/lib/python3.7/site-packages/paddle_serving_server/pipeline/pipeline_server.py", line 172, in prepare_server
    yml_file=yml_file, yml_dict=yml_dict)
  File "/home/dapeng/.local/lib/python3.7/site-packages/paddle_serving_server/pipeline/pipeline_server.py", line 344, in load_server_yaml_conf
    conf = yaml.load(f.read())
TypeError: load() missing 1 required positional argument: 'Loader'

Solution:

vim /home/dapeng/.local/lib/python3.7/site-packages/paddle_serving_server/pipeline/pipeline_server.py
# At line 344, after the conf = yaml.load() brackets addLoader=yaml.FullLoaderv
conf = yaml.load(f.read(), Loader=yaml.FullLoader)

[Solved] Gitlab Error: gitlab-ctl reconfigure Error: STDERR: initdb: error: invalid locale settings; check LANG and L

The error report is shown in the figure

There was an error running gitlab-ctl reconfigure:

execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] (postgresql::enable line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.
STDERR: initdb: error: invalid locale settings; check LANG and LC_* environment variables
---- End output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
Ran /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 returned 1
                   Default character set issues

Ensure that there is more than 4G in the

Solution process:

vim /etc/profile
# Add the following to the end of the configuration file
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# reread the environment variables
[root@localhost src]# source /etc/profile
# Reload
[root@localhost src]# gitlab-ctl reconfigure
It is best to change the password the first time you enter
Details: > https://blog.csdn.net/weixin_46115601/article/details/120721246

[Solved] Keepalived Configurate Error: Unicast peers are not supported in strict mode

Unicast peers are not supported in strict mode

Error reporting information, reasons for error reporting, and exclusion of error digressions

Error message

Oct 14 19:18:45 ka1 Keepalived_vrrp[1306]: (Web_1) Strict mode does not support authentication. Ignoring.
Oct 14 19:18:45 ka1 Keepalived_vrrp[1306]: (Web_1) Unicast peers are not supported in strict mode
Oct 14 19:18:45 ka1 Keepalived_vrrp[1306]: Stopped - used 0.000000 user time, 0.001451 system time
Oct 14 19:18:45 ka1 Keepalived[1305]: Startup complete
Oct 14 19:18:45 ka1 Keepalived[1305]: pid 1306 exited with permanent error CONFIG. Terminating
Oct 14 19:18:45 ka1 Keepalived[1305]: CPU usage (self/children) user: 0.000000/0.000000 system: 0.001419/0.001747
Oct 14 19:18:45 ka1 Keepalived[1305]: Stopped Keepalived v2.2.4 (08/21,2021)

Error reporting reason

vrrp_Strict mode and unicast_src_IP conflicts cause keepalived startup failure
in addition, VRRP_Strict also conflicts with nopreempt and other configurations. It is recommended to delete or comment directly

Troubleshooting errors

vi /etc/keepalived/keepalived.conf

Comment or delete the following lines

#vrrp_strict

Restart keepalived after saving

systemctl restart keepalived

Digression

See other students’ keepalived help posts during troubleshooting
https://ask.csdn.net/questions/771124?Wechatoa =
although we don’t know the final reason, we also analyze the problem

The problem is divided into two steps
first, the automatic switching of VIP caused by preemption is mainly
1.43. When 43 is started, the virtual IP is switched to 43, which is caused by preemption mode.
solution: set keepalived to non gunfight mode, so that you stop 43, switch to 47, and start 43 again without forcing the VIP to switch back to 43.
VRRP_ Nopreempt
II. VIP is inaccessible on 43.
VIP is inaccessible. The specific phenomenon of “inaccessibility” described here is not well understood. It is speculated that there are three possibilities.
1vip cannot Ping through
look at the firewall configuration
systemctl stop firewalld & amp& amp; Iptables – f (please confirm the firewall configuration again and again to avoid losing some required configurations)
for the configuration of keepalived, theoretically you do not configure VRRP_ Strict is VRRP that does not need to be configured separately_ Iptables, but you didn’t mention the specific keepalived version. It doesn’t rule out some special bugs in the small version
Global_ Adding VRRP to defs_ Iptables
3. A service such as nginx or Apache cannot be accessed
3.1. Check the listen configuration item of the corresponding configuration file. The most brutal way is to set it to 0.0.0
3.2. SS – ntlp to check the listening of the corresponding port
3.3. Use tools such as curl to test 127.0.0.1 successively, server IP and VIP to see whether they return normally.
3.4. If the database is used, check the authorization of relevant accounts

CDH operation and maintenance: child node cloudera SCM agent starts Error

1.Startup Error:
./cloudera-scm-agent start
Error Screenshot:

2.Delete or backup to other corresponding pid files according to the error report
find/-name cloudera-scm-agent.pid
mv cloudera-scm-agent.pid cloudera-scm-agent.pid20211019
or rm -rf cloudera-scm-agent.pid
3.restart cloudera-scm-agent
./cloudera-scm-agent start
Done!

error while loading shared libraries [How to Solve]

When running the program, the following errors occur:

 error while loading shared libraries: libXXXXXXX.so.1: cannot open shared object file: No such file or directory

1. First open the/etc/ld.so.conf file

2. Add the directory where the dynamic library file is located: execute VI/etc/ld.so.conf, and add “/usr/local/lib” under “include LD.So.Conf.d/*.Conf”.

3. After saving, execute:/SBIN/ldconfig – V on the command line terminal; Its function is to cache the library files under the path listed in the file/etc/ld.so.conf to/etc/ld.so.cache for use. Therefore, when some library files are installed or/etc/ld.so.conf is modified to add a new search path for the library, it is necessary to run ldconfig to cache all library files into the file/etc/ld.so.cache. If it is not done, the newly installed library may not be found.

Docker Error: error invoking remote method ‘docker-start-container‘: error: (http code 500) server error –

Docker container cannot be started. An error is reported after startup:

error invoking remote method 'docker-start-container': error: (http code 500) server error - ports are not available: listen tcp 0.0.0.0:3306: bind: an attempt was made to access a socket in a way forbidden by its access permissions.

First restart the computer (host), and then execute it on the command line (or wsl2)

docker ps -a

Check the container ID that cannot be started, and then execute

docker restart Container ID

If it still cannot be started, try to allow the windows (Linux) firewall to pass through the port and make sure it is not blocked by the firewall

[Solved] MAC system brew install error: failure while executing

Error when installing Apache http server on Mac, brew install httpd
The error message is as follows:

==> Installing httpd dependency: nghttp2
==> Pouring nghttp2-1.44.0.big_sur.bottle.tar.gz
tar: Error opening archive: Failed to open ‘/Users/zhaopengkang/Library/Caches/Homebrew/downloads/727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz’
Error: Failure while executing; `tar –extract –no-same-owner –file /Users/zhaopengkang/Library/Caches/Homebrew/downloads/727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz –directory /private/tmp/d20211015-52303-1xq0k1l` exited with 1.

The error means: Error opening the archive file:

727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz,Then run the tar command to give you another backup.
All similar cases like this, directly install brew install XXX manually, and then re-execute the previous command.
I reported an error here run brew install nghttp2, re-execute brew install httpd, install successfully problem solved.

[Solved] Apex Install Error: ERROR: Command errored out with exit status 1

First of all, the most important thing is the version correspondence problem:
my environment
linux Ubuntu 16.04.7 lts
python = 3.7
python = 1.4
CUDA = 10.1
the versions of the above four should correspond. This can be found online.

This is the official installation procedure:

git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

If not, replace the installation statement with the following:

python setup.py install --cuda_ext --cpp_ext

Errors may be reported here:
filenotfounderror: [errno 2] no such file or directory: ‘:/usr/local/cuda-10.1/bin/nvcc’: ‘:/usr/local/cuda-10.1/bin/nvcc’

The problem here lies in “: /”, so we just need to specify
export cuda_home = {/usr/local/cuda-10.1} to remove the redundant “:”, and then run it again. We will report some warnings. Don’t worry.