Giter Club home page Giter Club logo

Comments (7)

pythonzm avatar pythonzm commented on August 24, 2024

主机登录日志是直接通过资产管理中设置的管理账号登录的记录,也就是管理员的登录记录。
连接管理登录日志是通过分配的账号登录的记录,也就是堡垒机的操作记录
执行命令断开的问题看console有什么报错没?或者自己修改过什么东西?

from ops.

hx-2020 avatar hx-2020 commented on August 24, 2024

没有修改过什么设置,console打印显示websocket连接成功后过了几秒异常disconect,错误代码1010

尝试更换channels,channels-redis高版本还是不行

我用的环境是Ubuntu16.04 python3.5

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

使用的chrome浏览器么?

from ops.

hx-2020 avatar hx-2020 commented on August 24, 2024

Chrome和firefox我都测试过了都一样报错code 1010

websocket disconnected:1011
(index):111

CloseEvent {isTrusted: true, wasClean: false, code: 1011, reason: "", type: "close", …}
isTrusted: true
wasClean: false
code: 1011
reason: ""
type: "close"
target: WebSocket {url: "ws://192.168.216.152:8000/ws/webssh/1/?remote_ip=192.168.216.145&width=120&height=21", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
currentTarget: WebSocket {url: "ws://192.168.216.152:8000/ws/webssh/1/?remote_ip=192.168.216.145&width=120&height=21", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
eventPhase: 0
bubbles: false
cancelable: false
defaultPrevented: false
composed: false
timeStamp: 10857.3800008744
srcElement: WebSocket {url: "ws://192.168.216.152:8000/ws/webssh/1/?remote_ip=192.168.216.145&width=120&height=21", readyState: 3, bufferedAmount: 0,

之前Pip install安装相关依赖包的时候有提示asig-redis版本不兼容, 尝试更换相应的版本websocket都没有办法建立连接
ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 2.3.2 which is incompatible

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

连上之后,不执行命令会自动断开吗?

from ops.

hx-2020 avatar hx-2020 commented on August 24, 2024

连上去不操作也会断,下面是打印连上后服务器端返回的信息
[2020/04/09 15:20:36] HTTP GET /assets/ssh/2/ 200 [0.08, 192.168.216.145:57040]
[2020/04/09 15:20:36] HTTP GET /static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css 304 [0.04, 192.168.216.145:57040]
[2020/04/09 15:20:36] HTTP GET /static/jquery-confirm/dist/jquery-confirm.min.css 304 [0.04, 192.168.216.145:57042]
[2020/04/09 15:20:36] HTTP GET /static/bootstrap-fileinput/js/fileinput.min.js 304 [0.03, 192.168.216.145:57045]
[2020/04/09 15:20:36] HTTP GET /static/AdminLTE/bower_components/jquery/dist/jquery.min.js 304 [0.04, 192.168.216.145:57043]
[2020/04/09 15:20:36] HTTP GET /static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js 304 [0.04, 192.168.216.145:57044]
[2020/04/09 15:20:36] HTTP GET /static/js/xterm.js 304 [0.04, 192.168.216.145:57046]
[2020/04/09 15:20:36] HTTP GET /static/jquery-confirm/dist/jquery-confirm.min.js 304 [0.03, 192.168.216.145:57042]
[2020/04/09 15:20:36] HTTP GET /static/js/fit.js 304 [0.04, 192.168.216.145:57040]
[2020/04/09 15:20:36] HTTP GET /static/css/xterm.css 200 [0.03, 192.168.216.145:57043]
[2020/04/09 15:20:36] HTTP GET /static/bootstrap-fileinput/css/fileinput.min.css 200 [0.03, 192.168.216.145:57045]
[2020/04/09 15:20:36] WebSocket HANDSHAKING /ws/webssh/2/ [192.168.216.145:57047]
163 40
[2020/04/09 15:20:36] WebSocket CONNECT /ws/webssh/2/ [192.168.216.145:57047]
the connect is ok
the self ip is %s 172.16.103.155
the str_data is Last login: Thu Apr 9 03:15:55 2020 from 172.16.41.22
the str_data is [root@sh-fa-02 ~]#
[2020/04/09 15:20:46] WebSocket DISCONNECT /ws/webssh/2/ [192.168.216.145:57047]

from ops.

pythonzm avatar pythonzm commented on August 24, 2024

redis是不是设置密码了?

from ops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.