Jump to content
Welcome to our new Citrix community!

NetScaler 12.1 49.23 issue logging in via REST /nitro/v1/config/login


Nivo Hoffmann

Recommended Posts

Hi,

 

we use a powershell script to check for netscaler ha state (in sync etc.). This script is written in powershell and works fine with NetScaler firmware 10.5 up to 12.0 (tested). But if I connect to the 12.1 49.23 appliance I get:

 

Invoke-RestMethod : { "errorcode": 354, "message": "Invalid username or password", "severity": "ERROR" }

 

 

The script basically does login like that:

$payload = @{"login" = @{"username"=$nsuser;"password"=$nspass}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/login" -Body $payloadjson -Method POST -SessionVariable saveSession -ContentType application/json

 

The nitro.log for 12.0 looks like:

Oct 12 12:09:19 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }{ "login": { } }
Oct 12 12:09:19 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }{ "login": { } }   - Status "Success"
Oct 12 12:09:20 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User #TOKENUSER# - Remote_ip 10.110.5.111 - Method GET - Command { "params": { "filter": [ ] } }{ "HAnode": { } }
Oct 12 12:09:20 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User #TOKENUSER# - Remote_ip 10.110.5.111 - Method GET - Command { "params": { "filter": [ ] } }{ "HAnode": { } }   - Status "Success"
Oct 12 12:09:20 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User #TOKENUSER# - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }{ "logout": { } }
Oct 12 12:09:20 <local5.info> vacnsvdi31 httpd: Netscaler_ip 172.31.3.142 - User #TOKENUSER# - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }{ "logout": { } }   - Status "Success"

 

The nitro.log for 12.1 looks like:

Oct 12 12:10:35 <local5.info> vacnstst31 httpd: Netscaler_ip 172.31.3.164 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }
Oct 12 12:10:35 <local5.info> vacnstst31 httpd: Netscaler_ip 172.31.3.164 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } } - Status "{ "errorcode": 354, "message": "Invalid username or password", "severity": "ERROR" }"
Oct 12 12:10:35 <local5.info> vacnstst31 httpd: Netscaler_ip 172.31.3.164 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } }
Oct 12 12:10:35 <local5.info> vacnstst31 httpd: Netscaler_ip 172.31.3.164 - User (null) - Remote_ip 10.110.5.111 - Method POST - Command { "params": { "format": "json", "httpheaders": "yes" } } - Status "{ "errorcode": 1026, "message": "Not logged in", "severity": "ERROR" }"

 

Username/password are correct, I can login to that appliance with Username/Password used in the script.

 

Has anyone seen this? Is anyone facing this issue?

 

Thanks,

Regards,

Nico

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...