当前位置:网站首页>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
边栏推荐
- CSP date calculation
- Audio-AudioRecord Binder通信机制
- Patch NTP server at the beginning of DDoS counterattack
- Fault analysis | analysis of an example of MySQL running out of host memory
- Data and Introspection__ dict__ Attributes and__ slots__ attribute
- MySQL advanced notes
- Redis SDS principle
- RobotFramework入门(三)WebUI自动化之百度搜索
- 微软语音合成助手 v1.3 文本转语音工具,真实语音AI生成器
- Introduction to robotframework (I) brief introduction and use
猜你喜欢
【Unity3D】GUI控件
[ruoyi] set theme style
Jenkins basic knowledge ----- detailed explanation of 03pipeline code
Misc (eternal night), the preliminary competition of the innovation practice competition of the National College Students' information security competition
JS regular filtering and adding image prefixes in rich text
QT release exe software and modify exe application icon
Apt installation ZABBIX
[unity3d] GUI control
淘宝焦点图布局实战
Linear programming matlab
随机推荐
深度解析链动2+1模式,颠覆传统卖货思维?
My C language learning records (blue bridge) -- files and file input and output
Pat 1084 broken keyboard (20 points) string find
技术分享 | undo 太大了怎么办
Referenceerror: primordials is not defined error resolution
Who is the winner of PTA
IPv6 jobs
[Chongqing Guangdong education] higher mathematics I reference materials of Southwest Petroleum University
Summary of Bible story reading
My C language learning record (blue bridge) -- under the pointer
Codeforces 5 questions par jour (1700 chacune) - jour 6
Redis SDS principle
OCR文字识别方法综述
Taobao focus map layout practice
Linear regression and logistic regression
2022工作中遇到的问题四
Codeworks 5 questions per day (1700 average) - day 6
Technology sharing | what if Undo is too big
Elimination games
Apt installation ZABBIX