Closed leopaul36 closed 8 months ago
Just noticed I have so weird ssl errors by trying to run jhack fire
:
jhack fire validator01/0 update-status
ERROR:jhack.simulate_event:cmd juju ssh validator01/0 sudo /usr/bin/juju-exec -u validator01/0 JUJU_DISPATCH_PATH=hooks/update-status JUJU_MODEL_NAME=local-network JUJU_UNIT_NAME=validator01/0 ./dispatch terminated with 127
ERROR:jhack.simulate_event:stdout=b''
ERROR:jhack.simulate_event:stderr=b'ssh: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory\n'
Fired update-status on validator01/0.
I did tried this with no luck.
I'm assuming you're on a lxd model?
I think there's something wrong with juju ssh
. Can you shell into the unit? Can you juju scp
to the unit? I'd start by debugging from there: if that doesn't work, it's not an issue with jhack (aside possibly some better error surfacing)
you can set the LOGLEVEL
envvar to DEBUG
before your jhack commands to see if you catch some more error messages.
Hey @PietroPasotti, thanks for helping
Both juju ssh
and juju scp
work:
juju ssh validator01/0 date
Wed Jan 17 10:50:08 UTC 2024
Connection to fd42:77c2:c77f:12a9:216:3eff:fe1d:5ab5 closed.
juju scp validator01/0:/var/log/syslog .
head -n2 syslog
Jan 17 10:42:38 juju-a50ad2-0 keyboard-setup.sh[63]: Couldn't get a file descriptor referring to the console.
Jan 17 10:42:38 juju-a50ad2-0 keyboard-setup.sh[65]: Couldn't get a file descriptor referring to the console
Here's the output of LOGLEVEL=DEBUG jhack fire validator01/0 update-status
:
INFO:jhack:jhack running in snapped mode. Checking configuration...
INFO:jhack:juju command is b'/snap/jhack/277/bin/juju\n'
DEBUG:parse:format '{_}: {timestamp:ti} {_}' -> '(.+?): (?P<timestamp>(\\d{4}-\\d\\d-\\d\\d)((\\s+|T)(\\d{1,2}:\\d{1,2}(:\\d{1,2}(\\.\\d+)?)?))?(Z|\\s*[-+]\\d\\d:?\\d\\d)?) (.+?)'
DEBUG:parse:format '{_}: {timestamp:tt} {_}' -> '(.+?): (?P<timestamp>(\\d{1,2}:\\d{1,2}(:\\d{1,2}(\\.\\d+)?)?)?(\\s+[AP]M)?(\\s+[-+]\\d\\d?:?\\d\\d)?) (.+?)'
::= Verbose mode (DEBUG). =::
INFO:jhack.simulate_event:juju ssh validator01/0 sudo /usr/bin/juju-exec -u validator01/0 JUJU_DISPATCH_PATH=hooks/update-status JUJU_MODEL_NAME=local-network JUJU_UNIT_NAME=validator01/0 ./dispatch
ERROR:jhack.simulate_event:cmd juju ssh validator01/0 sudo /usr/bin/juju-exec -u validator01/0 JUJU_DISPATCH_PATH=hooks/update-status JUJU_MODEL_NAME=local-network JUJU_UNIT_NAME=validator01/0 ./dispatch terminated with 127
ERROR:jhack.simulate_event:stdout=b''
ERROR:jhack.simulate_event:stderr=b'ssh: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory\n'
Fired update-status on validator01/0.
What's weird is that running juju ssh validator01/0 sudo /usr/bin/juju-exec -u validator01/0 JUJU_DISPATCH_PATH=hooks/update-status JUJU_MODEL_NAME=local-network JUJU_UNIT_NAME=validator01/0 ./dispatch
manually does work...
Yeah probably something to do with jhack snap confinement... I assume you're using jhack from snap. If you're willing to install it from sources you should be able to use all commands more freely until I figure out what's going on.
For me it doesn't actually work manually either, which is fun.
Rescoped #113; closing this as duplicate as it seems to be the same issue
Yeah probably something to do with jhack snap confinement... I assume you're using jhack from snap. If you're willing to install it from sources you should be able to use all commands more freely until I figure out what's going on.
For me it doesn't actually work manually either, which is fun.
Installing via pip
did the trick. sync
is now working as expected.
Thanks again :+1:
It will also work again from snap once I release #123 which should be in a few minutes
I did find issue (https://github.com/canonical/jhack/issues/73) but I figured I should open a new one.
I can then see that the
/var/lib/juju/agents/unit-validator01-0/charm/src/charm.py
file has not changedI did re-install
jhack
a couple times, ran bothsudo snap connect jhack:dot-local-share-juju snapd
andsudo snap connect jhack:ssh-read snapd
but still with no luck.