当前位置:网站首页>Problems encountered in 2022 work IV
Problems encountered in 2022 work IV
2022-07-06 03:03:00 【The moonlight is beautiful tonight】
1、 request 60s Overtime
The phenomenon : Colleagues request to appear 60s Overtime , Local Normal , The production environment has exceeded 60s Report timeout error , Tips 504 gateway timeout
reason :nginx The default backend server processing request timeout ( Page waiting for server response time )60s
resolvent : Set the appropriate timeout for the backend server to process requests
nginx Of conf The configuration file , stay location / {} Add proxy_read_timeout 600;( Don't forget to add a semicolon ) As shown below :
location / {
...
proxy_read_timeout 150; # second
...
}
2、gitlab The port to take up
modify puma web Application port
vim /var/opt/gitlab/gitlab-rails/etc/puma.rb
bind 'tcp://127.0.0.1:9109'
gitlab The configuration file /etc/gitlab/gitlab.rb
puma['listen'] = '127.0.0.1'
puma['port'] = 9109 # Default 8080, And `puma.rb` Configure the same port in
puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
puma['somaxconn'] = 1024
nginx['listen_port'] = 8083 # Modify the built-in nginx Port used , Default 80, Avoid conflicts with the original nginx Port conflict
restart gitlab service
gitlab-ctl reconfigure
gitlab-ctl restart
3、 Inquire about oracle Primary key constraint
select * from dba_constraints where constraint_name='PK_WM_CONTRL_MATERIAL_RECEIVE_PRICE';
4、jenkins Integration migration to git
1. Server installation git
yum install git
2.jenkins The source code management in the project is changed to git, Input gitlab Warehouse address and account number , And specify the Automated Deployment Branch
3. If it is a back-end project, you need to give the script startup.sh Add execute permission
chmod +x ./bin/startup.sh
Such as :
5、git pull Report errors
error: Your local changes to the following files would be overwritten by merge:
resolvent :
git stash
git pull origin spd-dev
git stash pop
6、 see oracle constraint
SELECT * FROM DBA_CONSTRAINTS WHERE constraint_name like '%FK_CERT_CHA_REFERENCE_BASE_CER%';
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME like '%BASE_CERT%';
7、sql Error report in execution ParserException
ExecutorException: Error preparing statement. Cause: com.alibaba.druid.sql.parser.ParserException: TODO : pos 293, line 4, column 27, token ON
Enter source code view statement Medium sql sentence , Find out sql normal
org.apache.ibatis.executor.statement.PreparedStatementHandler#query
public <E> List<E> query(Statement statement, ResultHandler resultHandler) throws SQLException {
PreparedStatement ps = (PreparedStatement) statement;
ps.execute();
return resultSetHandler.handleResultSets(ps);
}
Breakpoint discovery is a parsing error when encapsulating the result set
8、 Cascade query error
Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'id' from result set. Cause: com.alibaba.fastjson.JSONException: syntax error, expect {, actual int, pos 15, line 1, column 16220526000012424
Cascading query code :
<collection property="detailList" ofType="com.xxxDetail"
select="com.xxxDetailMapper.list" column="id"/>
Through the source code analysis found that , When cascading subqueries mybatis hold id As json analysis , So the above error message appears
public T getNullableResult(ResultSet rs, String columnName) throws SQLException {
String sqlJson = rs.getString(columnName);
if (null != sqlJson) {
return JSONObject.parseObject(sqlJson, clazz);
}
return null;
}
Cause analysis , The subquery contains multiple condition parameters , therefore mybatis Need to put column As json Only by parsing can we know id Which condition parameter .
resolvent , Modify the cascading query code :
<collection property="detailList" ofType="com.xxxDetail"
select="com.xxxDetailMapper.list" column="{backId=id}"/>
9、oracle simulation drop if exists
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE abc';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
/
CREATE TABLE abc
(
ID VARCHAR2(128) NOT NULL,
TASK_STATUS NUMBER(2) NOT NULL,
SURGERY_CODE VARCHAR2(50)
);
10、 Connect seata Report errors can not register RM
linux Server startup Seata after ,Spring cloud Project to connect seata Report errors :
can not connect to 192.168.122.1:8091 cause:can not register RM,err:can not connect to services-server
Check seata stay nacos Registered service information discovery in ,seata Registered in nacos The address in is 192.168.122.1, Local ping or telnet None of them were successful ,spring cloud The project is obtained through the service name ip Later, due to 192.168.122.1 The Internet is not working , So wrong reporting can not connect to services-server
192.168.122.1 come from virbr0 network card , This is because the system is installed with libvirt A service will generate something .virbr0 yes KVM The default creation is Bridge, Its function is to connect
Virtual machine network card provides NAT Access to the Internet .
virbr0 One is assigned by default IP 192.168.122.1, It also provides support for other virtual network cards connected to it DHCP service .
resolvent , Specify the external network when starting ip, Do not use 127.0.0.1
./seata-server.sh -h 192.168.xxx
边栏推荐
- Elimination games
- Era5 reanalysis data download strategy
- [ruoyi] enable Mini navigation bar
- 电机控制反Park变换和反Clarke变换公式推导
- Referenceerror: primordials is not defined error resolution
- 原型图设计
- Summary of Bible story reading
- My C language learning record (blue bridge) -- under the pointer
- 07 单件(Singleton)模式
- Self made CA certificate and SSL certificate using OpenSSL
猜你喜欢
Misc (eternal night), the preliminary competition of the innovation practice competition of the National College Students' information security competition
Universal crud interface
【Unity3D】GUI控件
[kubernetes series] learn the exposed application of kubernetes service security
解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
Gifcam v7.0 minimalist GIF animation recording tool Chinese single file version
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
XSS challenges bypass the protection strategy for XSS injection
[ruoyi] enable Mini navigation bar
随机推荐
2345文件粉碎,文件强力删除工具无捆绑纯净提取版
如何做好功能测试
[ruoyi] enable Mini navigation bar
The difference between sizeof and strlen in C language
会员积分营销系统操作的时候怎样提升消费者的积极性?
原型图设计
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
Who is the winner of PTA
Game theory matlab
Software design principles
Universal crud interface
CSP numeric sort
多态day02
全国大学生信息安全赛创新实践赛初赛---misc(永恒的夜)
继承day01
Single instance mode of encapsulating PDO with PHP in spare time
OCR文字識別方法綜述
Microsoft speech synthesis assistant v1.3 text to speech tool, real speech AI generator
tcpdump: no suitable device found
【若依(ruoyi)】ztree 自定义图标(iconSkin 属性)