1. Problem environment
virtual machine: VMware 16
Windows system: Windows 10
linux system: CentOS 7.6
interactive software: SecureCRT 8.7
2. Prompt
3. Solution
click “options”, select “session options”, as shown in the figure below, click “SSH2”, then modify “username”, and click “OK”
4. reconnect
connect successfully
Tag Archives: Operation and maintenance
[Solved] Mysql Build Error: [ERROR] Slave I/O for channel ‘‘: error connecting to master
Project scenario:
mysql5. 7 build dual master replication:
host a: 192.168.218.62:3306 production library
host B: 192.168.218.95:3307 create a new empty library
operating system: centos7
Problem description
tip: describe the problems encountered in the project here:
start slave on host B:
change master to master_ host=‘192.168.218.62’,master_ port=3306,master_ user=‘repl’,master_ password=‘*****’,master_ log_ file=‘mysql-bin. 000017’,master_ log_ pos=****;
start slave replication is normal;
Enable slave on host a:
change master to master_ host=‘192.168.218.95’,master_ port=3307,master_ user=‘repl’,master_ password=‘*****’,master_ log_ file=‘mysql-bin. 1234’,master_ log_ pos=****;
after start save, show slave status reports the following error:
error connecting to master‘ [email protected] : 3307 ‘- retry time: 60 retries: 6
check that there are no other meaningful logs under/var/log/messages
Cause analysis:
Troubleshooting route:
1 Log in to host B MySQL on host a: MySQL – U repl – p ‘*****’ – P 3307 – H 192.168.218.95 normal – eliminate account and password errors
2. Check the permission of the replication account on host B, show grants for repl @ ‘%’ and find that it has the permission of replication slave and replication client – eliminate the permission problem
I tried to create a new account, but it didn’t work to restart the service.
finally, it is found that SELinux is not related
check SELinux status:
[root@localhost ~]# getenforce
Enforcing(means selinux does not close)
Solution:
Close SELinux:
I Temporary shutdown
enter the command setenforce = 0 (it will be invalid after restarting the machine)
check SELinux status:
[root@localhost ~]# getenforce
Permissive(means close successfully)
II Permanently close
open the /etc/selinux/config file and modify SELINUX=DISABLED (the server needs to be restarted to take effect);
re-change master and then restart to copy successfully
[Solved]unpacking of archive failed: cpio: lstat failed – Not a directory
A strange CPIO error was reported when installing the RPM package on the company server today. (most errors can be solved by reinstalling CPIO or downloading RPM package again)
unpacking of archive failed: cpio: lstat failed - Not a directory
Solution:
After learning CPIO, I found a solution:
Step 1: check the directory required by the RPM package
rpm2cpio XXXX.rpm | cpio -idmv
Step 2: check the corresponding directory, and you will find that it really exists, and it is not a directory…
Step 3: delete this directory and reinstall successfully!!!!
Reference: https://access.redhat.com/solutions/6189481
[Solved] Heroku Error: Web process failed to bind to $PORT within 60 seconds of launch
Error description
If the set port number is less than 1000, an error will be reported, and there is no permission
2022-03-29T10:23:16.651636+00:00 heroku[web.1]: State changed from crashed to starting
2022-03-29T10:23:28.994173+00:00 heroku[web.1]: Starting process with command `python /code/server3.py`
2022-03-29T10:23:30.091143+00:00 app[web.1]: Traceback (most recent call last):
2022-03-29T10:23:30.091204+00:00 app[web.1]: File "/code/server3.py", line 247, in <module>
2022-03-29T10:23:30.091205+00:00 app[web.1]: serverSocket.bind(("127.0.0.1", serverPort))
2022-03-29T10:23:30.091208+00:00 app[web.1]: PermissionError: [Errno 13] Permission denied
2022-03-29T10:23:30.234919+00:00 heroku[web.1]: Process exited with status 1
2022-03-29T10:23:30.279569+00:00 heroku[web.1]: State changed from starting to crashed
If you set the port number to 8080, you will not be connected within 60 seconds
2022-03-29T10:53:34.400924+00:00 heroku[web.1]: State changed from crashed to starting
2022-03-29T10:53:49.432473+00:00 heroku[web.1]: Starting process with command `python /code/server3.py`
2022-03-29T10:53:33.432308+00:00 app[api]: Release v9 created by user ***@icloud.com
2022-03-29T10:53:33.432308+00:00 app[api]: Deployed web (350d1bd5740a) by user ***@icloud.com
2022-03-29T10:54:49.500818+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-03-29T10:54:49.587777+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-29T10:54:49.800462+00:00 heroku[web.1]: Process exited with status 137
If the port number in the environment variable is referenced dynamically, the acquisition fails
2022-03-29T11:12:03.984493+00:00 heroku[web.1]: State changed from crashed to starting
2022-03-29T11:12:19.984320+00:00 heroku[web.1]: Starting process with command `python /code/server3.py`
2022-03-29T11:12:21.706887+00:00 heroku[web.1]: Process exited with status 1
2022-03-29T11:12:21.536737+00:00 app[web.1]: Traceback (most recent call last):
2022-03-29T11:12:21.536756+00:00 app[web.1]: File "/code/server3.py", line 248, in <module>
2022-03-29T11:12:21.536757+00:00 app[web.1]: serverSocket.bind(("0.0.0.0", serverPort))
2022-03-29T11:12:21.536757+00:00 app[web.1]: TypeError: an integer is required (got type NoneType)
2022-03-29T11:12:21.769096+00:00 heroku[web.1]: State changed from starting to crashed
No matter the local address is not written,
ServerSocket Bind ((“”, serverport))
or 127.0.0.1
ServerSocket Bind ((“127.0.0.1”, serverport))
or write 0.0.0
ServerSocket Bind ((“0.0.0.0”, serverport))
doesn’t work
Solution (Python Project):
Dynamic binding port number is required
To write this in dockerfile, pass in $post
#Base image based on
FROM python:3.4
#code added to code folder
ADD . /pythonProject /code
# Set the code folder to be the working directory
WORKDIR /code
# Install support
#RUN pip install -r requirements.txt
CMD python /code/server3.py $PORT
Python file writing format, obtain through parameters in server.py
serverPort = int(sys.argv[1])
The complete structure is as follows
if __name__ == '__main__':
serverSocket = socket(AF_INET, SOCK_STREAM)
serverPort = int(sys.argv[1])
serverSocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
serverSocket.bind(("", serverPort))
serverSocket.listen(5)
print('The server is running')
# Main web server loop. It simply accepts TCP connections, and get the request processed in seperate threads.
while True:
# Set up a new connection from the client
connectionSocket, addr = serverSocket.accept()
# Clients timeout after 60 seconds of inactivity and must reconnect.
connectionSocket.settimeout(600)
# start new thread to handle incoming request
_thread.start_new_thread(process, (connectionSocket,))
Solution (Nodejs Project):
// production
config.port = process.env.PORT
app.listen(config.port, () => {
logger.info('Listening on port %d', config.port);
});
or
.listen(process.env.PORT || 5000)
or
production: {
server: {
host: '0.0.0.0',
port: process.env.PORT
}
}
[Solved] Centos error: collect2: fatal error: cannot find ‘ld‘
When executing a compiled file in Linux (. /configure) with collect2: fatal error: cannot find ‘ld’, which is also preceded by gcc: error: unrecognized command line option -V and configure: error: C compiler cannot create executables. When you find that your gcc and the corresponding dependency packages are installed, you still get the error. At this point you look under /usr/bin/ to see if there is an ld. which ld is not found, but you find a file called ld.gold under /usr/bin by running ls -l |grep ld.
Solution:
Copy ld.gold under /usr/bin/ (do not delete the original file) and rename it to ld. You can also create a soft connection.
Re-execute the compilation
Problem found solved!
Brief description.
gcc compiles the source code to .o, then linker links the .o to .so or executable, linker can use ld.bfd, ld.gold or lld.
[Solved] thrift failed error: The system cannot execute the specified program.
Error:
Apache IoTDB CI Error:
thrift failed output:
thrift failed error: The system cannot execute the specified program.
Reason:
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<os.classifier>windows-x86_64</os.classifier>
<thrift.download-url>http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe</thrift.download-url>
<thrift.executable>thrift-${thrift.version}-win-x86_64.exe</thrift.executable>
<thrift.skip-making-executable>true</thrift.skip-making-executable>
<thrift.exec-cmd.executable>echo</thrift.exec-cmd.executable>
<thrift.exec-cmd.args>"Do nothing"</thrift.exec-cmd.args>
</properties>
</profile>
The reason is that thrift has changed the download link, thrift.download-url
no executable file found:
http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe
Solution:
Just update the link
http://archive.apache.org/dist/thrift/${thrift.version}/thrift-${thrift.version}.exe
https://github.com/apache/iotdb/pull/5293/files
Ubuntu update source error: E: Problem executing scripts APT::Update::Post-Invoke-Success…
UBUNTU update source error:
E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’ E: Sub-process returned an error code
Solution:
apt-get purge libappstream3
apt-get update
Firewall Status View Error: service iptables status [How to Solve]
View firewall status service iptables status
iptables.service cannot be found, use the following command to install: yum install iptables-services
Check the firewall status again
linux(aarch64): How to Fix kettle Startup Error Issue
Because of the work requirements, recently have been engaged in kettle-related business, in the deployment environment is not known to be linux (in the standard Kirin), has been doing conversions and operations under windows, on the recent to deploy to production, the problem is also exposed, in the environment to start kettle when the error reported:
Solution.
According to the error message: SWT package could not be loaded, so go online and search for downloading swt.jar .
Place the downloaded jar package under the kettle path of the installation: data-integration/libswt/linux/aarch64/
If there is no aarch64 folder, create one and put it there.
Then modify the spoon.sh configuration information:
When you’re done, restart ./spoon.sh and you’re done!
Linux useradd Error: Creating mailbox file: File exists
If you get the error Creating mailbox file: File exists when you add a user with useradd under linux
It is possible that userdel xxx did not add -r when deleting the user, so only the user was deleted, but not the user’s configuration file
For example, the path of the configuration file is in /var/spool/mail/xxx
# userdel -r
Usage: userdel [options] LOGIN
Options:
-f, --force force some actions that would fail otherwise
e.g. removal of user still logged in
or files, even if not owned by the user
-h, --help display this help message and exit
-r, --remove remove home directory and mail spool
-R, --root CHROOT_DIR directory to chroot into
-Z, --selinux-user remove any SELinux user mapping for the user
Kylin arm64 linux configure: error: cannot guess build type; you must specify one
error
uname -m = aarch64
uname -r = 4.19.90-23.8.v2101.ky10.aarch64
uname -s = Linux
uname -v = #1 SMP Mon May 17 17:07:38 CST 2021
/usr/bin/uname -p = aarch64
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch = aarch64
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.19.90-23.8.v2101.ky10.aarch64
UNAME_SYSTEM = Linux
UNAME_VERSION = #1 SMP Mon May 17 17:07:38 CST 2021
configure: error: cannot guess build type; you must specify one
Solution:
./configure --build=aarch64-unknown-linux
effect
...
checking whether to include histogram support... no
checking whether to include dirty support... no
checking whether to include demo support... no
checking whether to include Unix-domain socket tests... no
checking whether to include DLPI tests... no
checking whether to include DCCP tests... no
checking whether to include OMNI tests... yes
checking whether to include XTI tests... no
checking whether to include SDP tests... no
checking whether to include ICSC-EXS tests... no
checking whether to include SCTP tests... no
checking whether to include paced send (intervals) support... no
checking whether paced sends should spin... no
checking whether to include initial burst support in _RR tests... yes
checking which CPU utilization measurement type to use... "procstat - auto"
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/netperf_version.h
config.status: creating src/Makefile
config.status: creating src/missing/Makefile
config.status: creating src/missing/m4/Makefile
config.status: creating doc/Makefile
config.status: creating doc/examples/Makefile
config.status: creating netperf.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Linux Use dtc generate dtb Error: “FATAL ERROR: Unable to parse input tree“
Error:
linux-5.10>$ dtc -I dts -O dtb arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts -o fsl-ls1046a-rdb.dtb
Error: fsl-ls1046a-rdb.dts:13.1-9 syntax error
FATAL ERROR: Unable to parse input tree
Solution:
linux-5.10>$ export ARCH=arm64
linux-5.10>$ export CROSS_COMPILE=aarch64-linux-gnu-
linux-5.10>$ make defconfig
linux-5.10>$ make dtbs or
linux-5.10>$ make freescale/fsl-ls1046a-rdb.dtb