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

vim 个别文件会报错,然后终端直接断开,请作者帮忙看看,急急急!!! #836

Closed
shimeibing opened this Issue Dec 1, 2017 · 15 comments

Comments

Projects
None yet
3 participants
@shimeibing

shimeibing commented Dec 1, 2017

[简述你的问题]
vim 个别文件会报错,然后终端直接断开,请作者帮忙看看,急急急!!!

使用版本

[请提供你使用的Jumpserver版本 0.3.2 或 0.4.0]
0.3.2

问题复现步骤
  1. [步骤1]
    不是必现,偶尔会出险,用vim,cat,grep都会有这个错误,终端直接断开。
  2. [步骤2]
具体表现[截图可能会更好些,最好能截全]

堆栈信息:
2017-12-01 18:25:44,057 - connect.py - ERROR - ==> posix shell error: list assignment index out of range
Traceback (most recent call last):
File "/opt/jumpserver-0.3.2/connect.py", line 341, in posix_shell
termlog.write(x)
File "/opt/jumpserver-0.3.2/jlog/views.py", line 247, in write
self._stream.feed(msg)
File "/usr/lib/python2.7/site-packages/pyte/streams.py", line 378, in feed
return super(ByteStream, self).feed(chars)
File "/usr/lib/python2.7/site-packages/pyte/streams.py", line 166, in feed
send(char)
File "/usr/lib/python2.7/site-packages/pyte/streams.py", line 318, in _parser_fsm
dispatch("draw", char)
File "/usr/lib/python2.7/site-packages/pyte/streams.py", line 215, in dispatch
handler(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pyte/screens.py", line 448, in draw
line[self.cursor.x + 1] = self.cursor.attrs._replace(data=" ")
IndexError: list assignment index out of range

其他

[注:] 完成后请关闭 issue

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 1, 2017

我已经把termlog.write(x)这行代码注释掉了,但是历史记录功能就不能用了
now_timestamp = time.time()
#termlog.write(x)
termlog.recoder = False
log_time_f.write('%s %s\n' % (round(now_timestamp-pre_timestamp, 4), len(x)))
log_time_f.flush()
log_file_f.write(x)
log_file_f.flush()
pre_timestamp = now_timestamp
log_file_f.flush()

shimeibing commented Dec 1, 2017

我已经把termlog.write(x)这行代码注释掉了,但是历史记录功能就不能用了
now_timestamp = time.time()
#termlog.write(x)
termlog.recoder = False
log_time_f.write('%s %s\n' % (round(now_timestamp-pre_timestamp, 4), len(x)))
log_time_f.flush()
log_file_f.write(x)
log_file_f.flush()
pre_timestamp = now_timestamp
log_file_f.flush()

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing commented Dec 1, 2017

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 4, 2017

@ibuler ibul这个有办法解决吗?

shimeibing commented Dec 4, 2017

@ibuler ibul这个有办法解决吗?

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler
Member

ibuler commented Dec 4, 2017

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler

ibuler Dec 4, 2017

Member

注释掉应该也没有问题,你看看命令和回放应该都有

Member

ibuler commented Dec 4, 2017

注释掉应该也没有问题,你看看命令和回放应该都有

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 4, 2017

@ibuler 我发现是还有记录,是不是会少记录一些东西,关于VIM的记录,这个是因为什么buffer写满了吗?主要是在打开文件之后,搜索某行,然后定位到1行,就出险了,grep,和cat的时候也会有。不是必现。

shimeibing commented Dec 4, 2017

@ibuler 我发现是还有记录,是不是会少记录一些东西,关于VIM的记录,这个是因为什么buffer写满了吗?主要是在打开文件之后,搜索某行,然后定位到1行,就出险了,grep,和cat的时候也会有。不是必现。

@liuzheng

This comment has been minimized.

Show comment
Hide comment
@liuzheng

liuzheng Dec 6, 2017

Member

应该是录像的锅,录像暂时不耐抗,很容易撑爆内存

Member

liuzheng commented Dec 6, 2017

应该是录像的锅,录像暂时不耐抗,很容易撑爆内存

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 6, 2017

我记得我以前用低版本的时候,而且服务器和使用堡垒机的人要多很多,我这次用的新版本很少的机器,使用人也很少,发现有这个问题,这个问题有办法解决吗?

shimeibing commented Dec 6, 2017

我记得我以前用低版本的时候,而且服务器和使用堡垒机的人要多很多,我这次用的新版本很少的机器,使用人也很少,发现有这个问题,这个问题有办法解决吗?

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 6, 2017

低版本的时候没i有发现有这个问题

shimeibing commented Dec 6, 2017

低版本的时候没i有发现有这个问题

@liuzheng

This comment has been minimized.

Show comment
Hide comment
@liuzheng

liuzheng Dec 7, 2017

Member

@shimeibing 低版本是用直接写磁盘的,这个很考验磁盘性能,所以改成内存,内存的性能好,但是容量小,后期我会优化的

Member

liuzheng commented Dec 7, 2017

@shimeibing 低版本是用直接写磁盘的,这个很考验磁盘性能,所以改成内存,内存的性能好,但是容量小,后期我会优化的

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 8, 2017

@liuzheng 你好,那请问现在有什么好的解决办法吗,还是我直接将那行代码注释掉就可以了。

shimeibing commented Dec 8, 2017

@liuzheng 你好,那请问现在有什么好的解决办法吗,还是我直接将那行代码注释掉就可以了。

@liuzheng

This comment has been minimized.

Show comment
Hide comment
@liuzheng

liuzheng Dec 8, 2017

Member

需要重写录像的代码,在TODO list里,我先关了,不日会更新代码

Member

liuzheng commented Dec 8, 2017

需要重写录像的代码,在TODO list里,我先关了,不日会更新代码

@liuzheng liuzheng closed this Dec 8, 2017

@liuzheng

This comment has been minimized.

Show comment
Hide comment
@liuzheng

liuzheng Dec 8, 2017

Member

建议运维人员减少cat大文件以及tail大文件

Member

liuzheng commented Dec 8, 2017

建议运维人员减少cat大文件以及tail大文件

@shimeibing

This comment has been minimized.

Show comment
Hide comment
@shimeibing

shimeibing Dec 8, 2017

我现在注释的那行代码能解决问题吗?

shimeibing commented Dec 8, 2017

我现在注释的那行代码能解决问题吗?

@liuzheng

This comment has been minimized.

Show comment
Hide comment
@liuzheng

liuzheng Dec 13, 2017

Member

@shimeibing 那就没录屏

Member

liuzheng commented Dec 13, 2017

@shimeibing 那就没录屏

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