Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.3升级到2.3.0后,session_sticky参数不支持 #1283

Closed
liuyinmessi opened this issue Jun 5, 2019 · 8 comments
Closed

2.2.3升级到2.3.0后,session_sticky参数不支持 #1283

liuyinmessi opened this issue Jun 5, 2019 · 8 comments
Assignees

Comments

@liuyinmessi
Copy link

conf配置为:
session_sticky cookie=uid fallback=on path=/ mode=insert option=indirect;
session_sticky_hide_cookie upstream=app_list;

升级2.3.0后,执行关闭或者重载命令,报错:
nginx: [emerg] unknown directive "session_sticky" in /webapp/tengine/conf/confs/nginx_sichuan.conf:3
nginx: [emerg] unknown directive "cookie=uid" in /webapp/tengine/conf/confs/nginx_sichuan.conf:3
nginx: [emerg] unknown directive "session_sticky_hide_cookie" in /webapp/tengine/conf/confs/nginx_sichuan.conf:173

这是不支持了吗?
向各位大神求教,非常感谢。

@chobits
Copy link
Member

chobits commented Jun 5, 2019

from 2.3.0 具体升级细节可以参考:#1220

Tengine自身实现的模块,当前全部剥离到modules目录下,如果需要使用那个模块、则使用--add-module=modules/<module_name>的方式进行编译;

编译时候使用参数如下 ./configure --add-module=modules/ngx_http_upstream_session_sticky_module

@liuyinmessi
Copy link
Author

非常感谢,我自己先测试一下

@liuyinmessi
Copy link
Author

from 2.3.0 具体升级细节可以参考:#1220

Tengine自身实现的模块,当前全部剥离到modules目录下,如果需要使用那个模块、则使用--add-module=modules/<module_name>的方式进行编译;

编译时候使用参数如下 ./configure --add-module=modules/ngx_http_upstream_session_sticky_module

我按照您的方法更新升级成功了。再次请问一下,我只替换了sbin下面的nginx,原来2.2.3的module文件夹是空的,是应该把2.3.0make后生成的module文件夹一起拷贝到原来2.2.3的module文件夹里面吧?

@chobits
Copy link
Member

chobits commented Jun 10, 2019

再次请问一下,我只替换了sbin下面的nginx,原来2.2.3的module文件夹是空的,是应该把2.3.0make后生成的module文件夹一起拷贝到原来2.2.3的module文件夹里面吧?

不需要,tengine里面的modules是方代码的,2.3.0里make install后生成的路径里的文件已经是全的(即 configure --prefix=指定的路径),如果你动态安装模块会自动生成modules目录。

  • 动态安装模块是指 类似这样的编译参数:./configure --add-dynamic-module=./modules/ngx_http_reqstat_module/

@liuyinmessi
Copy link
Author

再次请问一下,我只替换了sbin下面的nginx,原来2.2.3的module文件夹是空的,是应该把2.3.0make后生成的module文件夹一起拷贝到原来2.2.3的module文件夹里面吧?

不需要,tengine里面的modules是方代码的,2.3.0里make install后生成的路径里的文件已经是全的(即 configure --prefix=指定的路径),如果你动态安装模块会自动生成modules目录。

* 动态安装模块是指 类似这样的编译参数:`./configure --add-dynamic-module=./modules/ngx_http_reqstat_module/`

再次感谢你的回答。
我想表达的是,我在2.3.0的时候,只使用了make命令,没有使用install,然后是把生成的objs目录里面的nginx替换掉原来的2.2.3sbin下面的nginx,这样就完成升级了。这个时候tengine目录里面的modules目录下面是空的,因为当时你还没有答复我,我就把2.3.0解压后modules下面的目录都拷贝到tengine里面来了。

@chobits
Copy link
Member

chobits commented Jun 10, 2019

然后是把生成的objs目录里面的nginx替换掉原来的2.2.3sbin下面的nginx,这样就完成升级了

如果没有安装动态模块,这是可以的,只要能够启动即可。

我就把2.3.0解压后modules下面的目录都拷贝到tengine里面来了。

这是不需要的。里面的目录都是source,对线上程序启动无影响。

@liuyinmessi
Copy link
Author

然后是把生成的objs目录里面的nginx替换掉原来的2.2.3sbin下面的nginx,这样就完成升级了

如果没有安装动态模块,这是可以的,只要能够启动即可。

我就把2.3.0解压后modules下面的目录都拷贝到tengine里面来了。

这是需要的。里面的目录都是source,对线上程序启动无影响。

感谢

@chobits
Copy link
Member

chobits commented Jun 10, 2019

刚刚回复出错了。应该是“不”需要

image

问题已经解决,close了,如果有问题可以reopen :)

@chobits chobits closed this as completed Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants