Skip to content
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

oxs --timeout error #27

Open
jguida opened this issue Nov 6, 2018 · 3 comments
Open

oxs --timeout error #27

jguida opened this issue Nov 6, 2018 · 3 comments
Labels

Comments

@jguida
Copy link

jguida commented Nov 6, 2018

Works ok:
[oxidized@zabbix oxidized]$ oxs -m ios -x comandos/ios 10.11.1.99
Building configuration...

Current configuration : 15075 bytes
!
! Last configuration change at 09:44:27 GMT Sun Nov 4 2018 by jguida
! NVRAM config last updated at 09:44:29 GMT Sun Nov 4 2018 by jguida
!
version 15.4
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone

But if i set --timeout fail:
I work in a bash script with oxs, but is a device is offline, the script don't continue of a device offline.

#!/bin/bash
while read -r line; do
/usr/local/bin/oxs -v -d -m ios -x comandos/ios $line
done < "$1"

[oxidized@zabbix oxidized]$ oxs -m ios --timeout 120 -x comandos/ios 10.11.1.99
unable to connect
/usr/local/share/gems/gems/oxidized-script-0.5.1/lib/oxidized/script/script.rb:113:in connect': unable to connect (Oxidized::Script::NoConnection) from /usr/local/share/gems/gems/oxidized-script-0.5.1/lib/oxidized/script/script.rb:92:in initialize'
from /usr/local/share/gems/gems/oxidized-script-0.5.1/lib/oxidized/script/cli.rb:122:in new' from /usr/local/share/gems/gems/oxidized-script-0.5.1/lib/oxidized/script/cli.rb:122:in connect'
from /usr/local/share/gems/gems/oxidized-script-0.5.1/lib/oxidized/script/cli.rb:37:in run' from /usr/local/share/gems/gems/oxidized-script-0.5.1/bin/oxs:5:in <top (required)>'
from /usr/local/bin/oxs:23:in load' from /usr/local/bin/oxs:23:in

'

@laf
Copy link
Contributor

laf commented Nov 8, 2018

Yeah it's never worked as far as I know. Most likely a simple fix but I've never taken a look.

@laf laf added the bug label Nov 8, 2018
@8zero2
Copy link

8zero2 commented Jul 9, 2019

How to make the script not timeout from certain commands? is there any alternative?

@ancorrus
Copy link

ancorrus commented Mar 24, 2020

So far as even industry standard automation tools gave up on my case of authenticating by password, i came to your oxidized-script and it just did what i told it to, great job! :)

However...

This command
oxs --verbose --debug --threads 10 --regex ^100 --commands /opt/oxidized/cmds_for_oxs/add_user_zabbix
outputs
Forking 100.99.83.1 We had the following error on node 100.99.83.1: execution expired
for every host I feed to it.

But when I check the host manually, I see that the commands provided have worked and taken effect.

This was the command file:
configure delete system login user backup set system login user zabbix set system login user zabbix level admin set system login user zabbix authentication plaintext-password "pswd" commit loadkey zabbix /home/admin/id_rsa.pub save exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants