Comments (9)
So going to need some more information.
What is timeout set to? How long does the script normally take to execute?
What version and sshaolin and paramiko are you using?
Can you add this to the start of your script to see what the log shows?
import logging;logging.root.addHandler(logging.StreamHandler());logging.root.setLevel(0)
from sshaolin.
Hello,
What is timeout set to? Timeout is set to 30 secs, I tried incresing to 60 secs as well, but it did not help
How long does the script normally take to execute?Script execution on local machine takes 5-6 secs
What version and sshaolin and paramiko are you using?sshaolin -> 0.0.6, paramiko-->2.7.1
Can you add this to the start of your script to see what the log shows?
**2020-04-02 10:13:10,183 [DEBUG] transport._log: starting thread (client mode): 0xf881e240
starting thread (client mode): 0xf881e240
2020-04-02 10:13:10,183 [DEBUG] transport._log: Local version/idstring: SSH-2.0-paramiko_2.7.1
Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-04-02 10:13:10,301 [DEBUG] transport._log: Remote version/idstring: SSH-2.0-OpenSSH_7.9
Remote version/idstring: SSH-2.0-OpenSSH_7.9
2020-04-02 10:13:10,302 [INFO] transport._log: Connected (version 2.0, client OpenSSH_7.9)
Connected (version 2.0, client OpenSSH_7.9)
2020-04-02 10:13:10,383 [DEBUG] transport._log: kex algos:['curve25519-sha256', '[email protected]', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group16-sha512', 'diffie-hellman-group18-sha512', 'diffie-hellman-group14-sha256', 'diffie-hellman-group14-sha1'] server key:['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ssh-ed25519'] client encrypt:['[email protected]', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '[email protected]', '[email protected]'] server encrypt:['[email protected]', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '[email protected]', '[email protected]'] client mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] server mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False
kex algos:['curve25519-sha256', '[email protected]', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group16-sha512', 'diffie-hellman-group18-sha512', 'diffie-hellman-group14-sha256', 'diffie-hellman-group14-sha1'] server key:['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ssh-ed25519'] client encrypt:['[email protected]', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '[email protected]', '[email protected]'] server encrypt:['[email protected]', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '[email protected]', '[email protected]'] client mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] server mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False
2020-04-02 10:13:10,383 [DEBUG] transport._log: Kex agreed: [email protected]
Kex agreed: [email protected]
2020-04-02 10:13:10,383 [DEBUG] transport._log: HostKey agreed: ssh-ed25519
HostKey agreed: ssh-ed25519
2020-04-02 10:13:10,384 [DEBUG] transport._log: Cipher agreed: aes128-ctr
Cipher agreed: aes128-ctr
2020-04-02 10:13:10,384 [DEBUG] transport._log: MAC agreed: hmac-sha2-256
MAC agreed: hmac-sha2-256
2020-04-02 10:13:10,384 [DEBUG] transport._log: Compression agreed: none
Compression agreed: none
2020-04-02 10:13:10,511 [DEBUG] transport._log: kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>
kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>
2020-04-02 10:13:10,512 [DEBUG] transport._log: Switch to new keys ...
Switch to new keys ...
2020-04-02 10:13:10,513 [DEBUG] transport._log: Adding ssh-ed25519 host key for 10.240.109.83: b'0c499b758e165a68dcadbca559b88c7a'
Adding ssh-ed25519 host key for 10.240.109.83: b'0c499b758e165a68dcadbca559b88c7a'
2020-04-02 10:13:10,675 [DEBUG] transport._log: userauth is OK
userauth is OK
2020-04-02 10:13:10,768 [INFO] transport._log: Authentication (password) successful!
Authentication (password) successful!
2020-04-02 10:13:10,769 [DEBUG] channel._log: [chan 0] Max packet in: 32768 bytes
[chan 0] Max packet in: 32768 bytes
2020-04-02 10:13:10,851 [DEBUG] transport._log: Received global request "[email protected]"
Received global request "[email protected]"
2020-04-02 10:13:10,851 [DEBUG] transport._log: Rejecting "[email protected]" global request from server.
Rejecting "[email protected]" global request from server.
2020-04-02 10:13:10,975 [DEBUG] channel._log: [chan 0] Max packet out: 32768 bytes
[chan 0] Max packet out: 32768 bytes
2020-04-02 10:13:10,976 [DEBUG] transport._log: Secsh channel 0 opened.
Secsh channel 0 opened.
2020-04-02 10:13:11,059 [DEBUG] channel._log: [chan 0] Sesch channel 0 request ok
[chan 0] Sesch channel 0 request ok
2020-04-02 10:13:11,081 [INFO] ssh_interface.connect: SSH Connection Established**
from sshaolin.
Adding some more information about command timeout
==========================================
CALL
------------------------------------------
execute_command args..........: ()
execute_command kwargs........: {'cmd': 'source ./run_ipc.sh', 'timeout': 20}
------------------------------------------
2020-04-02 10:21:47,006 [DEBUG] channel._log: [chan 0] EOF sent (0)
[chan 0] EOF sent (0)
2020-04-02 10:21:47,007 [CRITICAL] common.wrapper: Command timed out
Command timed out
2020-04-02 10:21:47,007 [INFO] common.wrapper:
==========================================
CALL
------------------------------------------
execute_command args..........: ()
execute_command kwargs........: {'cmd': 'cd /home/root', 'timeout': 20}
------------------------------------------
==========================================
CALL
------------------------------------------
execute_command args..........: ()
execute_command kwargs........: {'cmd': 'cd /home/root', 'timeout': 20}
------------------------------------------
2020-04-02 10:21:47,008 [CRITICAL] common.wrapper: 'SSHShell' object has no attribute 'channel'
'SSHShell' object has no attribute 'channel'**
from sshaolin.
So a few things, once a command timesout you can't use the shell object anymore because the command is still running and has hung. I am not sure why the command is hanging but is running locally. Some thoughts are
- run_ipc.sh doesn't have a #! as the first line and is running with the wrong shell and hanging
- the shell script requires a pty which sshaolin doesn't enable
- some other reason like opening a gui etc
Can you get the command to run with just ssh?
ssh username@server /path/run_ipc.sh
from sshaolin.
Hello,
After some debugging I find that its not shell script but the command mediapipe2
I separate this command from shell script and below error is seen
**==========================================
CALL
execute_command args..........: ()
execute_command kwargs........: {'cmd': 'mediapipe2', 'timeout': 30}
2020-04-02 20:13:58,701 [DEBUG] channel._log: [chan 0] Unhandled channel request "[email protected]"
2020-04-02 20:13:58,702 [DEBUG] channel._log: [chan 0] Unhandled channel request "[email protected]"
2020-04-02 20:14:11,396 [DEBUG] channel._log: [chan 0] EOF sent (0)
2020-04-02 20:14:11,397 [CRITICAL] common.wrapper: Command timed out
2020-04-02 20:14:11,397 [INFO] common.wrapper:**
Only mediapip2 command fails, all other command work fine. Also with each cmd output we get hexstring which mark the start and end of output
with mediapipe2 command
header is there b'ba79d3ebe567943fa81e9a9dc2b9dcaa9\nConfig file is config.jso
but ending marker is missing
from sshaolin.
Hi,
Any update on this issue and what can be the problem with ending marker?
from sshaolin.
from sshaolin.
This may be an internal tool, I will check and get back if we can share the installation procedure
Can you link how to install it and and a simple script I can test with that will reproduce the issue?
…
On Fri, Apr 3, 2020, 21:59 hashimx @.***> wrote: Hi, Any update on this issue and what can be the problem with ending marker? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HURYQKP54J4G6PTCVYQDRK25CXANCNFSM4LY74SXQ .
from sshaolin.
Closing this since no answer.
from sshaolin.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sshaolin.