我开发了几个交换矩阵脚本,使我的web应用程序在J弹性环境中的部署自动化。这些脚本每次都运行得很完美,直到今天。这个问题让我感到困惑,因为自从上次成功执行以来,我的脚本和环境都没有改变;唯一值得注意的变化是,我的J弹性提供者(ServNet,墨西哥)现在正在运行4.9版的J弹性平台。
我当地的环境:
在另外两台机器上,我也遇到了完全相同的问题,包括MacOS塞拉利昂和等效的Python安装,但使用的是旧版本的Fabric包(及其依赖项),几天前运行得还不错。
在Fabric之外,通过PuTTY (在Windows上)和终端(MacOS)进行的SSH访问正常工作。最近发生了变化的一件事是,在远程会话开始时会显示一个身份验证横幅(警告SSH访问的危险,如下所示)。我怀疑这和我的问题有什么关系。
按照推荐的通过Fabric文档中的此故障排除页面,我为fab命令启用了--show=debug标志,并为Paramiko启用了日志记录。命令窗口上的输出如下所示(我省略了一些可能被认为是私有和敏感的行,据我所知,这些行没有为当前问题提供相关信息):
Command line prompt>fab --show=debug my_task
Using fabfile '<path_to_fabric_script>'
Commands to run: my_task
Parallel tasks now using pool size of 0
<sensitive information omitted>
Parallel tasks now using pool size of 10
<sensitive information omitted>
[<jelastic_node>] run: /bin/bash -l -c "cd /var/lib/jelastic/backup && rm -f <file_to_delete>"
DEBUG:paramiko.transport:starting thread (client mode): 0x3cd61d0L
DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.1.1
DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-JSSHProxy
INFO:paramiko.transport:Connected (version 2.0, client JSSHProxy)
DEBUG:paramiko.transport:kex algos:[u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-gcm@openssh.com', u'arcfour256', u'arcfour128'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-gcm@openssh.com', u'arcfour256', u'arcfour128'] client mac:[u'hmac-sha1', u'hmac-sha1-96'] server mac:[u'hmac-sha1', u'hmac-sha1-96'] client compress:[u'none'] server compress:[u'none'] client lang:[u''] server lang:[u''] kex follows?False
DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group1-sha1
DEBUG:paramiko.transport:Cipher agreed: aes128-ctr
DEBUG:paramiko.transport:MAC agreed: hmac-sha1-96
DEBUG:paramiko.transport:Compression agreed: none
DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1>
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Adding ssh-rsa host key for [gate.jl.serv.net.mx]:3022: <key>
DEBUG:paramiko.transport:Trying SSH agent key <key>
DEBUG:paramiko.transport:userauth is OK
INFO:paramiko.transport:Auth banner:
Welcome to Jelastic shell
This shell will assist you in managing Jelastic applications.
============================== ATTENTION ==============================
Shell access is rather powerful and you can accidentally damage your application.
So please pay special attention to the actions you perform here.
============================== ATTENTION ==============================
INFO:paramiko.transport:Authentication (publickey) successful!
DEBUG:paramiko.transport:[chan 0] Max packet in: 32768 bytes
DEBUG:paramiko.transport:[chan 0] Max packet out: 32768 bytes
DEBUG:paramiko.transport:Secsh channel 0 opened.
DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok织物任务就挂在这一点上。没有进一步的输出,没有任何类型的成功或失败消息,没有超时,也没有任何可能发生的迹象。而Fabric任务的命令本身也不会运行,因为预期的效果不会在Fabric任务所针对的J弹性节点上产生(我所拥有的最简单的任务应该是用rm命令删除一些备份文件;我开发的其他任务更详细,它们也不会运行)。
我倾向于认为,这个问题要么与新的(4.9) J弹性版本有关,要么与其在我的J弹性提供者的基础设施上的特殊部署有关。不幸的是,当我要求他们在这个问题上提供帮助时,我的提供者并没有提供帮助。
关于可能发生的事情,我希望有任何线索。
发布于 2017-01-28 17:26:54
您可以尝试使用选项-保持活着=5.10
发布于 2017-01-29 06:26:29
这可能是参数库的问题,您可以检查问题这里。
发布于 2017-02-03 21:50:10
这种行为是由ssh欢迎横幅的错误处理引起的。但是我们有一个解决办法:编辑/etc/ssh/sshd_config并注释如下行:
Banner /etc/jmotd然后,重新启动sshd守护进程:
service sshd restart如果您将面临任何困难,请随时与我们在support@jelastic.com联系。
向你问好,弹力支援队
https://stackoverflow.com/questions/41905832
复制相似问题