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

mcaDumpTimeout #108

Open
andymarden opened this issue Nov 11, 2023 · 5 comments
Open

mcaDumpTimeout #108

andymarden opened this issue Nov 11, 2023 · 5 comments

Comments

@andymarden
Copy link

Trying this out with an AC-lite.

I get the following error repeatedly in /tmp/mcaDumpShort.err:

Sat 11 Nov 08:01:29 UTC 2023 192.168.11.100
{ "at":"08:01:29", "r":"timeout (127)", "device":"192.168.11.100", "mcaDumpTimeout":"Error" }\n

I increased {$UNIFI_CHECK_TIMEOUT} to 30 but same issue.

I am using {$UNIFI_SSHPASS_PASSWORD_PATH}

@andymarden
Copy link
Author

Looking at this ecript, I need to have sshpass installed:

apt install sshpass

needs to be added to instructions (unless I missed it) and the error should be better since it doesn't timeout, it doesn't even connect.

Now I get:

Sat 11 Nov 08:13:30 UTC 2023 192.168.11.100
{ "at":"08:13:30", "r":"Remote pb: admin@192.168.11.100: Permission denied (publickey,password).", "device":"192.168.11.100", "mcaDumpError":"Error" }\n

@andymarden
Copy link
Author

OK - found the problem - the ssh call looks like this:

${SSHPASS_OPTIONS} ssh ${SSH_PORT} ${VERBOSE_SSH} ${HE_RSA_SSH_KEY_OPTIONS} ${BATCH_MODE} -o ConnectTimeout=5 -o StrictHostKeyChecking=accept-new ${PRIVKEY_OPTION} "${USER}@${TARGET_DEVICE}" "$command"

When I removed ${BATCH_MODE} from this - everything works fine.

Not sure why but at least for me this is what happens in ssh password mode (having to use that because the current unifi controller seems to be broken and won't allow a ssh key to be set - have raised with Unifi support.

Not doing a pull request because I dolt understand the wider implications of people running in key mode but someone who knows more can fix it. In the meantime, I am running with the locally-modified script.

@patricegautier
Copy link
Owner

So what kind of controller and firmware version are you hitting? what kind of device is 192.168.11.100? I don't use the password option myself so there certainly could be issues with that path..

@leodej
Copy link

leodej commented Nov 21, 2023

i have the same error with my switch USW 48 PoE

when i use this command:

sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.7.0.8 -u api -i /etc/sshkey/ -t SWITCH -p /etc/sshkey/senha.txt -v

i received this response:

{ "at":"00:22:54", "r":"timeout (127)", "device":"10.7.0.8", "mcaDumpTimeout":"Error" }

@leodej
Copy link

leodej commented Nov 21, 2023

OK - found the problem - the ssh call looks like this:

${SSHPASS_OPTIONS} ssh ${SSH_PORT} ${VERBOSE_SSH} ${HE_RSA_SSH_KEY_OPTIONS} ${BATCH_MODE} -o ConnectTimeout=5 -o StrictHostKeyChecking=accept-new ${PRIVKEY_OPTION} "${USER}@${TARGET_DEVICE}" "$command"

When I removed ${BATCH_MODE} from this - everything works fine.

Not sure why but at least for me this is what happens in ssh password mode (having to use that because the current unifi controller seems to be broken and won't allow a ssh key to be set - have raised with Unifi support.

Not doing a pull request because I dolt understand the wider implications of people running in key mode but someone who knows more can fix it. In the meantime, I am running with the locally-modified script.

I try this, but its not working with me

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

No branches or pull requests

3 participants