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

生产环境,JMS已经接受COCO和LUNA的注册,但仍然授权失败 #822

Closed
gengkeye opened this Issue Nov 22, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@gengkeye

gengkeye commented Nov 22, 2017

[简述你的问题]
JMS已经接受COCO和LUNA的注册,但仍然报错:App auth failed, Access key error or need admin active it

使用版本

JMS: V0.4
OS: CentOS7.4
env: Production

问题复现步骤
  1. git clone https://github.com/jumpserver/luna.git
  2. 执行yum install 和 pip install
  3. 修改配置文件config.py
  4. JMS应用程序-终端中接受注册,填写相关信息
具体表现[截图可能会更好些,最好能截全]

(py3) [seven@node2-jmp40-release luna]$ python run_server.py
ERROR:root:Load access key failed
Using access key 2fe39726-3867-4e48-a022-13344a7369b3:***
WARNING:luna.service:App auth failed, Access key error or need admin active it
WARNING:luna.service:App auth failed, Access key error or need admin active it

其他

config.py中的配置如下:

DEBUG = False
NAME = 'luna'
BIND_HOST = '0.0.0.0'
LISTEN_PORT = 5000
JUMPSERVER_ENDPOINT = 'http://0.0.0.0/'

@hellorocky

This comment has been minimized.

Show comment
Hide comment
@hellorocky

hellorocky Nov 22, 2017

Contributor

试试把keys目录下的.access_key隐藏文件删除, 然后再注册试试

Contributor

hellorocky commented Nov 22, 2017

试试把keys目录下的.access_key隐藏文件删除, 然后再注册试试

@gengkeye

This comment has been minimized.

Show comment
Hide comment
@gengkeye

gengkeye Nov 23, 2017

试试把keys目录下的.access_key隐藏文件删除, 然后再注册试试

这个试过了,没用

gengkeye commented Nov 23, 2017

试试把keys目录下的.access_key隐藏文件删除, 然后再注册试试

这个试过了,没用

@gengkeye

This comment has been minimized.

Show comment
Hide comment
@gengkeye

gengkeye Nov 23, 2017

补充-JMS日志报错:
[22/Nov/2017:22:26:36 -0500] "POST /api/applications/v1/terminal/heatbeat/ HTTP/1.1" 403 43 "-" "jms-sdk-py/luna"

我部署使用的是非root用户,是这个原因导致的吗?

gengkeye commented Nov 23, 2017

补充-JMS日志报错:
[22/Nov/2017:22:26:36 -0500] "POST /api/applications/v1/terminal/heatbeat/ HTTP/1.1" 403 43 "-" "jms-sdk-py/luna"

我部署使用的是非root用户,是这个原因导致的吗?

@gengkeye

This comment has been minimized.

Show comment
Hide comment
@gengkeye

gengkeye Nov 24, 2017

运行开发环境是可以的,但是生产环境就不行了。。我是用Apache+mod_wsgi部署的

gengkeye commented Nov 24, 2017

运行开发环境是可以的,但是生产环境就不行了。。我是用Apache+mod_wsgi部署的

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler

ibuler Nov 24, 2017

Member

JUMPSERVER_ENDPOINT = 'http://0.0.0.0/' ?这个地址?

Member

ibuler commented Nov 24, 2017

JUMPSERVER_ENDPOINT = 'http://0.0.0.0/' ?这个地址?

@gengkeye

This comment has been minimized.

Show comment
Hide comment
@gengkeye

gengkeye Nov 24, 2017

JUMPSERVER_ENDPOINT = 'http://0.0.0.0/' ?这个地址?

是的。生产环境是不用加端口号的,Apache会自动转向8080端口,这个地址是没问题的。
这是个BUG吗?感觉应该是,已经被这个问题困扰几天了。。
(尚未解决)

gengkeye commented Nov 24, 2017

JUMPSERVER_ENDPOINT = 'http://0.0.0.0/' ?这个地址?

是的。生产环境是不用加端口号的,Apache会自动转向8080端口,这个地址是没问题的。
这是个BUG吗?感觉应该是,已经被这个问题困扰几天了。。
(尚未解决)

@gengkeye gengkeye changed the title from JMS已经接受COCO和LUNA的注册,但仍然报错 to 生产环境,JMS已经接受COCO和LUNA的注册,但仍然报错 Nov 28, 2017

@gengkeye gengkeye changed the title from 生产环境,JMS已经接受COCO和LUNA的注册,但仍然报错 to 生产环境,JMS已经接受COCO和LUNA的注册,但仍然授权失败 Nov 28, 2017

@gengkeye

This comment has been minimized.

Show comment
Hide comment
@gengkeye

gengkeye Dec 1, 2017

服务器换成nginx+gunicorn之后,LUNA和COCO可以正常使用了。不知道是不是APACHE的配置出现了什么问题。

gengkeye commented Dec 1, 2017

服务器换成nginx+gunicorn之后,LUNA和COCO可以正常使用了。不知道是不是APACHE的配置出现了什么问题。

@ibuler ibuler closed this Jan 9, 2018

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler

ibuler Jan 9, 2018

Member

0.5.0打算release了,之前的 0.4.0一直没有release,请关注

Member

ibuler commented Jan 9, 2018

0.5.0打算release了,之前的 0.4.0一直没有release,请关注

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment