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

401 Authentification error #121

Open
willifehler opened this issue Dec 2, 2024 · 8 comments
Open

401 Authentification error #121

willifehler opened this issue Dec 2, 2024 · 8 comments

Comments

@willifehler
Copy link

willifehler commented Dec 2, 2024

Hello there,

has anybody seen the error that the switch does ask for an authentification again?

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: pyaoscx.exceptions.generic_op_error.GenericOperationError: 'GENERIC OPERATION ERROR: Unauthorized: Code: 401'

I'm using a loop to deploy interfaces. I've already increased the timeouts.

HTTPS Server Configuration
----------------------------
 VRF                     : mgmt

 REST Access Mode         : read-write

 Max sessions per user    : 8

 Session idle timeout     : 0

 Session absolute timeout : 480

My setup:

pyaoscx                2.6.0
arubanetworks.aoscx                      4.4.0
Python 3.12.7

Cheers - Willi

@alagoutte
Copy link
Contributor

Hi Willi,

What switch model and firmware version ?

do you are using local account or RBAC ? (RADIUS, MGMT ?)

What do you have on the switch log ?

what do you make on the playbook ?

@willifehler
Copy link
Author

Hi @alagoutte,

I'm using local accounts.

Vendor                 : Aruba
Product Name           : JL717C 8360-32Y4C v2 Switch
ArubaOS-CX Version     : LL.10.13.1040
sh logging

does not provide any hint. Shall I check another logfile?

My Playbook is quite simple, I'm configuring interfaces and lag interfaces.

Cheers - Willi

@alagoutte
Copy link
Contributor

Do you have try with

debug rest all

@tchiapuziowong
Copy link
Member

@willifehler how many interfaces are you configuring/looping through? Is there a certain amount of time that passes where this error occurs or is it random?

@willifehler
Copy link
Author

Hi,

thank you so much for your feedback. The error occurs pretty random. Sometimes even Ansible just hang.

I will execute debug rest all to check if I can see something.

Cheers - Willi

@tchiapuziowong
Copy link
Member

@willifehler also are you running on a single host or multiple hosts?

@willifehler
Copy link
Author

willifehler commented Dec 5, 2024

I added the parameter: ansible_command_timeout. For now the issue didn't came up again. But I'm not sure if this command is really related to API requests.

@tchiapuziowong
Copy link
Member

tchiapuziowong commented Dec 9, 2024

@willifehler can you confirm if you're using the aoscx_interface module? or share a snippet of the task? for ansible_command_timeout that's valid for both SSH and API connections, so it's valid that extending that could allow for additional time the Ansible control machine keeps the cookie and waits for a response from the switch - additionally I was curious if increasing the number of forks or parallel connections to devices would also improve your results

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