首页 > 其他分享 >k8s推送代码至gitlab报错error: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up unexpect

k8s推送代码至gitlab报错error: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up unexpect

时间:2023-08-19 15:44:07浏览次数:45  
标签:HTTP directive etc gitlab unexpectedly nginx 报错 conf 1032

# git push -u origin main
Username for 'http://gitlab.wjl.net': root
Password for 'http://[email protected]': 
Counting objects: 1032, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (871/871), done.
error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
Writing objects: 100% (1032/1032), 48.53 MiB | 11.68 MiB/s, done.
Total 1032 (delta 179), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date

报错

error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly

由于gitlab是部署在k8s集群上的,所以gitlab需要通过ingress发布出去,后面的pull,push操作都是经过nginx的

解决方法
修改ingress-nginx的默认http上传文件大小(默认文件大小不能超过1MB),导致上传失败,出现了413问题。

# kubectl exec -it ingress-nginx-controller-rgf4j -n ingress-nginx -- bash
bash-5.1$ 
bash-5.1$ nginx -t
2023/08/19 07:31:22 [warn] 858#858: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:144
nginx: [warn] the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:144
2023/08/19 07:31:22 [warn] 858#858: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:145
nginx: [warn] the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:145
2023/08/19 07:31:22 [warn] 858#858: the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /etc/nginx/nginx.conf:146
nginx: [warn] the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /etc/nginx/nginx.conf:146
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
bash-5.1$ 
bash-5.1$ cp /etc/nginx/nginx.conf{,.bak20230819}
bash-5.1$ vi /etc/nginx/nginx.conf
找到如下字段修改为300m
client_max_body_size                    300m;
···
编辑nginx.conf后执行nginx -t检查配置文件
没问题执行nginx -s reload

再次推送

# git push -u origin main
Username for 'http://gitlab.wjl.net': root
Password for 'http://[email protected]': 
Counting objects: 1032, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (871/871), done.
Writing objects: 100% (1032/1032), 48.53 MiB | 13.02 MiB/s, done.
Total 1032 (delta 180), reused 0 (delta 0)
remote: Resolving deltas: 100% (180/180), done.
To http://gitlab.wjl.net/root/ruo-yi-cloud.git
 * [new branch]      main -> main
分支 main 设置为跟踪来自 origin 的远程分支 main

标签:HTTP,directive,etc,gitlab,unexpectedly,nginx,报错,conf,1032
From: https://www.cnblogs.com/chuyiwang/p/17642547.html

相关文章

  • 免费HTTP代理IP使用须知
       免费的HTTP代理IP可以用于一些基本的网络爬虫、数据采集、简单的网页浏览等业务。但是需要注意的是,由于免费的HTTP代理IP质量不稳定,可能会被封禁或者速度较慢,不适合一些对稳定性和速度要求较高的业务,例如在线视频播放、在线游戏等。对于一些需要高质量代理IP的业务,建议选......
  • 启动mysql时报错"/etc/init.d/mysqld: Permission denied"
    问题描述:启动mysql时报错"/etc/init.d/mysqld:Permissiondenied",如下所示:数据库:mysql5.5.18系统:rhel6.51、异常重现[root@MySQL5518-Master~]#servicemysqldstartenv:/etc/init.d/mysqld:Permissiondenied2、解决步骤[root@MySQL5518-Master~]#ll/etc/init.d......
  • Socks5、IP代理在爬虫开发与HTTP通信中的应用
    随着互联网的不断发展,代理服务器成为网络工程师和数据爬虫开发者的关键工具。本文将深入探讨Socks5代理、IP代理以及它们在网络安全、爬虫开发和HTTP通信中的重要作用。1.代理服务器:保障隐私与安全的中间人代理服务器是位于客户端与目标服务器之间的中间服务器,用于传递网络请求。......
  • torch tensor,boxes[:][:2] -= boxes[:][:2]/2 报错
    因为在PyTorch中进行切片操作时,不支持使用[:][:2]的方式进行多次切片。正确的方式是将两次切片操作合并成一次。在你的代码中,你可能想要对所有的boxes进行操作,对每个box的前两个元素进行减法操作。以下是正确的代码示例:importtorch#假设boxes是一个包含多个box......
  • vue3 vite后台管理模板项目打包报错 Some chunks are larger than 500 KiB after mini
    ​ 1、错误原因分析:超过块大小限制,块大小默认500KB2、解决办法:在vite.config.js中增加output配置项build:{chunkSizeWarningLimit:1500,//调整包的大小rollupOptions:{output:{//最小化拆分包manualChunks(id){......
  • httpGet和httpPost区别
    简单讲讲:Get一般用于从服务器取数据,而且不改变原来的内容;Post一般用于向服务器传递数据,这需要改变服务器的内容。从安全性上考虑,Get的安全性要稍微差点,因为它会把信息直接在地址栏显示出来。但如果对信息的安全性要求比较高的话,优先考虑使用Post。综合,如果没有特殊需要,用Get,......
  • 记录Python调用企业微信报错"errcode":44004,"errmsg":"Warning: wrong json format.
    1.通过单独的文件调用接口发送消息无异常;2.通过嵌套调用接口报错:"errcode":44004,"errmsg":"Warning:wrongjsonformat.;3.检查json文本格式无异常;4.怀疑json文本赋值有问题,增加trycache捕获,没有报错,但是可以正常调用接口!!5.打印json文本,比对trycatch的区别,发现多了个空格,依葫......
  • iwebsec-sql注入 05 报错型注入
    01、题目分析:三大盲注中的报错型注入,02、sqlmap工具注入:一把梭python.\sqlmap.py-u"http://www.bdrwmy.cn:8001/sqli/05.php?id=1"--current-db--dump--batch03、手工注入:盲注,简单的来讲就是无论你输入什么内容,页面都不会出现错误提示,如果查询结果正确就显示类似......
  • npm加参数--host启动报错 Could not auto-determine entry point from rollupOptions
    参考:https://blog.csdn.net/qq_41664096/article/details/118961381使用以下命令启动npm只能本机访问npmrundev如果需要网络访问则需要加参数--hostnpmrundev--host0.0.0.0会报错(!)Couldnotauto-determineentrypointfromrollupOptionsorhtmlfilesandt......
  • burpsuite靶场----SQL注入13----oracle的CAST报错注入
    burpsuite靶场----SQL注入13----oracle的CAST报错注入靶场地址https://portswigger.net/web-security/sql-injection/blind/lab-sql-injection-visible-error-based正式开始1.通过在TrackingId=JBhlRizkqfo87Hq8后面添加'和''(两个单引号)猜测是oracle数据库添加'报错,添加''......