当前位置:网站首页>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
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-xdlpuFFe-1656927341298)(C:\Users\11244\AppData\Roaming\Typora\typora-user-images\image-20220430114248998.png)]](/img/70/6be3e5783df4c485a2c4bdb6dc9050.png)
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 :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-XmULh2c0-1656927341300)(C:\Users\11244\AppData\Roaming\Typora\typora-user-images\image-20220430114529006.png)]](/img/37/53ec6322564476830503bb681cdcf6.png)
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
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-WZojUK7k-1656927341300)(C:\Users\11244\AppData\Roaming\Typora\typora-user-images\image-20220704153839337.png)]](/img/66/3fefbf805e518e184893009fb095e1.png)
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 .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-By5SUlYc-1656927341301)(C:\Users\11244\AppData\Roaming\Typora\typora-user-images\image-20220704160037989.png)]](/img/27/f8b9b46cd5aeb301180d5345cdf4e8.png)
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
- [Chongqing Guangdong education] higher mathematics I reference materials of Southwest Petroleum University
- What are the principles of software design (OCP)
- 不赚钱的科大讯飞,投资价值该怎么看?
- Spherical lens and cylindrical lens
- Detailed use of dbutils # yyds dry goods inventory #
- 2345 file shredding, powerful file deletion tool, unbound pure extract version
- 有没有完全自主的国产化数据库技术
- MySQL learning notes-10-tablespace recycling
- jsscript
猜你喜欢

全国大学生信息安全赛创新实践赛初赛---misc(永恒的夜)

Modeling specifications: naming conventions

Linear programming matlab

微软语音合成助手 v1.3 文本转语音工具,真实语音AI生成器

1. Dynamic parameters of function: *args, **kwargs

电机控制反Park变换和反Clarke变换公式推导

建模规范:命名规范
![BUUCTF刷题笔记——[极客大挑战 2019]EasySQL 1](/img/37/c38a933ce7fa5d2b8fa597965ffcb2.png)
BUUCTF刷题笔记——[极客大挑战 2019]EasySQL 1

Jenkins basic knowledge ----- detailed explanation of 03pipeline code

Is there a completely independent localization database technology
随机推荐
BUUCTF刷题笔记——[极客大挑战 2019]EasySQL 1
jsscript
What are the principles of software design (OCP)
How does yyds dry inventory deal with repeated messages in the consumption process?
Sign SSL certificate as Ca
Pure QT version of Chinese chess: realize two-man, man-machine and network games
Add one to non negative integers in the array
CobaltStrike-4.4-K8修改版安装使用教程
JS regular filtering and adding image prefixes in rich text
Modeling specifications: naming conventions
4. File modification
纯Qt版中国象棋:实现双人对战、人机对战及网络对战
DDoS attacks - are we really at war?
1003 emergency (25 points), "DIJ deformation"
Introduction to robotframework (III) Baidu search of webui automation
Classic interview question [gem pirate]
Introduction to robotframework (I) brief introduction and use
[pointer training - eight questions]
继承day01
Redis skip table