开发者社区> 问答> 正文

openresty添加tengine的nginx_upstream_check_?报错

公司使用了openresty 版本号是1.9.3

因业务需要 现在给它添加淘宝技术团队的健康检查模块 nginx_upstream_check_module

参考网上各大教程,基本都是通过打补丁的方式来实现

wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master

获取之后 解压后文件ginx_upstream_check_module-master

进去nginx源码目录


patch p1 < ../ginx_upstream_check_module-master/check_1.9.2+.patch

打完补丁包在 重新.configure 然后要带上上次编译的参数(已经编译安装过得话)

但是

但是我在打补丁包的时候 一直报错啊

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git src/http/modules/ngx_http_upstream_hash_module.c src/http/modules/ngx_http_upstream_hash_module.c
|index 1e2e05c..44a72e2 100644
|--- src/http/modules/ngx_http_upstream_hash_module.c
|+++ src/http/modules/ngx_http_upstream_hash_module.c


蛋疼啊,下载了nginx去打补丁包 没有问题 怎么openresty就不行了呢?

有成功给openresty添加过此模块的吗?




展开
收起
爱吃鱼的程序员 2020-06-10 09:54:54 1487 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    楼主成功了吗回复<aclass='referer'target='_blank'>@火星小刘:你先下载个compare对比文件。补丁里替换的文件只有5个。只要对比下tengine和openresty这5个文件内容之间的不同之处,然后给openresty加上,最后再给openresty打补丁。回复<aclass='referer'target='_blank'>@RyanMe:大神帮帮忙把回复<aclass='referer'target='_blank'>@RyanMe:我的397055203劳驾指点一二对比openresty和tengine要替换的C源文件,进行了修改,添加成功了。

    你好,请问该问题解决了吗 

    遇到相同的问题了

    你好,请参考上个人跟我的对话,没找到好的解决方法,最后通过手动对比不同之处,修改了源文件,进行了编译

    2020-06-10 09:55:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里Tengine网关最佳实践 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载