Forum Discussion

zzhang39's avatar
zzhang39
Icon for Altostratus rankAltostratus
Jun 22, 2024

Error in REST https call to get the Auth token v15.1.8

Hi All,

We upgraded F5 on May 18,2024 from v12.1.3 to v15.1.8
we trying to get auth token from 
/mgmt/shared/authn/login
But getting 401 error, please find the detailed error message. Can any one help me with this issue. It was working fine on v12.1.3

{"code":401,"message":"Authentication failed.","referer":"172.28.24.61","restOperationId":106134247,"kind":":resterrorresponse"}

 

  • Are you including "loginProviderName": "tmos" in your POST? Maybe /var/log/restjavad.0.log has some additional info about the failure.

  • Here's the scipt which works at 12.1.3, we do use loginProviderName toms.

    Can you advice where to check "/var/log/restjavad.0.log"?

     

    F5url="https://<example.com>/mgmt/shared/authn/login"

    response=$(curl -X POST $F5url \

    -H "Content-Type: application/json" \

    -d "{

      \"username\": \"$username\",

      \"password\": \"$password\",

      \"loginProviderName\": \"tmos\"

    }" -k -s)

    echo "Response from server:"

    echo "$response"

  • The REST subsystem in BIG-IP can sometimes suffer from low user space RAM, especially with large configurations. Also there is an upgrade process that occurs immediately after booting into a new version.

    It may help to change Management Provisioning to Large:

     

    Restjavad can sometimes get into a "stuck" state where the worker processes suffer continuous timeout errors. The log files (/var/log/restjavad*) offer evidence of this behavior: search for the term "timeout" in those files.