发布部署错误总结
序言
本节记录部署遇到的问题
1.idea问题
1.1There are test failures.
点击此按钮,打包跳过test模块
1.2打包start ,引入依赖,无法引入相关类
需要在start项目新增配置
1.3idea 提交代码无反应
文件编码不一致导致,需要进行设置
1.4git常见问题处理: Permanently added ‘github.com,13.229.188.59’ (RSA) to the list of known hosts.
需要重新生成rsa key,加入gitlab ssh key
C:\Users\guozhong>ssh-keygen -t rsa -C 178535@163.com
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\guozhong/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\guozhong/.ssh/id_rsa.
Your public key has been saved in C:\Users\guozhong/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:9ehpZKFXa/LDggBZjKDy1fuxcfP31j4yGXtgAHlHPfE 17853@163.com
The key's randomart image is:
+---[RSA 3072]----+
| .. o. . .....|
| . .+. o . . o.|
|o + . = o E|
|.. . . . o * . |
| . o S O = |
| o @ O + |
| + = * * .|
| . . B +o|
| +o+|
+----[SHA256]-----+
1.5idea 本地打包,引入本地其他项目,引入失败
新增如下配置
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<skip>true</skip>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
1.6 运行jar包报 no main manifest attribute
2.linux问题
2.1 /smh_local/erlang/make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
需要执行一下命令
然后再执行一次./configure命令,紧接着make && make install命令。即可成功安装erlang。
sudo yum install ncurses-devel.x86_64
3.ElasticSearch安装出现的问题
3.1不能以root权限启动
#创建用户:elasticsearch
adduser elasticsearch
# 创建用户密码,需要输入两次
passwd elasticsearch
#将对应的文件夹权限赋给该用户
chown -R elasticsearch elasticsearch-7.15.1
su elasticsearch
3.2exception during geoip databases update
在es配置文件中新增
ingest.geoip.downloader.enabled: false
3.3max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
vim /etc/security/limits.conf
#此处elasticsearch对应用户名
elasticsearch soft nofile 65536
elasticsearch hard nofile 65536
elasticsearch soft nproc 4096
elasticsearch hard nproc 4096
3.4max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
vim /etc/sysctl.conf
#新增配置
vm.max_map_count=262144