-
Notifications
You must be signed in to change notification settings - Fork 49
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
当使用TIMEOUT_FOREVER时,发生死锁 #19
Comments
com.github.cverges expect4j 1.9 我使用的是这个版本。 |
Hi, I apologize, but do not speak the language of your message, and Google Translate did not do a good job of translating. If you know another language, may I ask you to retry? Thanks
|
Sorry to get u into trouble , I'm a Chinese,and the former comment is my Mother Language. I have fork this repo in my space.Here the link. U can replace the servers with yours,run the GetUserLogFromRest .The class write for doing these things below: In step three , the grep operation may take a lot of time,so I set the timeout in the SSHClient class to let the client wait the server response forever. Unfortunately, the program looks like dead lock. I have tracked the code and debug the problem several times. But I didn't solve this problem finally, I thought the Perl5Pattern.java's code <if (matcher.contains(input, pattern))> works bad or something other make the problem. Could u help?Thanks.My email is bigmazhiyu@126.com. |
当Expect4j在调用consumer.waitForBuffer(singleTimeOut);的时候,BlockingConsumer似乎一直wait,而Expect4j所在的线程也一直无法运行。
Log:
2015-10-21 17:31:56,196 [pool-1-thread-1] DEBUG log.SSHClient: ----------Running commands are listed as follows:----------
2015-10-21 17:31:56,196 [pool-1-thread-1] DEBUG log.SSHClient: ssh root@10.16.35.114
2015-10-21 17:31:56,196 [pool-1-thread-1] DEBUG log.SSHClient: egrep 'ppag867871a15fab' /data/logs/filter.log
2015-10-21 17:31:56,196 [pool-1-thread-1] DEBUG log.SSHClient: ----------End----------
2015-10-21 17:31:56,197 [pool-1-thread-1] DEBUG expect4j.Expect4j: Timeout set to -1 milliseconds, expires at 1445419916196
2015-10-21 17:32:01,239 [pool-1-thread-1] DEBUG expect4j.Expect4j: Finding first match using >>><<< as the haystack
2015-10-21 17:32:48,196 [Thread-1] DEBUG expect4j.BlockingConsumer: BlockingConsumer expect4j.BlockingConsumer@546aa225 appending 71 characters to the buffer
2015-10-21 17:32:48,196 [Thread-1] DEBUG expect4j.BlockingConsumer: Adding to buffer: Last login: Wed Oct 21 17:13:29 2015 from 10.2.25.75\r\r\n[@zw_76_156 ~]$
2015-10-21 17:32:54,734 [pool-1-thread-1] DEBUG expect4j.Expect4j: Finding first match using >>>Last login: Wed Oct 21 17:13:29 2015 from 10.2.25.75\r\r\n[@zw_76_156 ~]$ <<< as the haystack
The text was updated successfully, but these errors were encountered: