Hi! I'm trying to use the bbssh pod for scripting SSH, but I've run into a problem.
When I try to start a session inside a task defined in bb.edn:
(bbssh/ssh "t9" {:username "***" :identity "***" :silence-messages true})
I get the following error:
error {:ex-message "Pod quit unexpectedly", :ex-data {}}`
Interestingly, the same code works perfectly when I run it in a JVM REPL.
(bbssh/ssh "t9" {:username "***" :identity "***" :silence-messages true})
=> :com.jcraft.jsch/Session-j33qieqdq4fdbqzo
Any idea how I can troubleshoot this or find out what exactly is going wrong?can you test with an older version of babashka?
in bb version 1.12.201 there was a change around pods which may affect pods that do something invalid with regards to the "done" status. I had to fix another pod that did this too.
If you can test with an older bb to see if that's the issue, then we can file an issue against the pod and hope that @retrogradeorbit can take a look
I'm not sure if that's the issue though, but maybe with some logging etc we can figure it out
I think it throws because of this change: https://github.com/babashka/pods/commit/8ab7f688c265942bec0e98a4fd8b11392fd77aa7 but in the case of async ops which keep running in an infinite loop this behavior may not be desired
This may fix the issue: https://github.com/babashka/pods/pull/76
In 10 minutes there is a new dev build available that you could try:
bash <(curl ) --dev-build --dir /tmp Thanks for the quick fix! It works fine with the new build.
Amazing, thanks
@sergey89 I made a new release: https://clojurians.slack.com/archives/C015AL9QYH1/p1754169940758599
No I think bbssh does the right thing
ok great thanks
@borkdude thanks for fixing this. "which may affect pods that do something invalid with regards to the "done" status". Do I need to do something in bbssh to make it more compliant? I have long running blocking pod calls that don't tie up the main pod thread, then the pod continues to handle other messages, and the final done message may come back much later. https://github.com/epiccastle/bbssh/blob/main/src/clj/bbssh/impl/pod.clj#L216-L236