Microsoft Virtualization Discussions

connect-shiftserver credentials issue

babar
9,382 Views

Hi all,

 

I am trying to set up SHIFT server in our lab and facing some challenges.

 

I have installed shift on windows 2012 server (virtualized on vmware). I am following the install doc step by step. When i finally trigger the connect-shiftserver command it asks for user credentials which were setup while installing the software. For some reason here it bombs out like this saying "bad credentials"

 

PS C:\Users\administrator.DEMO> connect-shiftserver

cmdlet Connect-ShiftServer at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
credential
Invoke-RestMethod : HTTP Status 401 - Bad credentials
type Status report
message Bad credentials
description This request requires HTTP authentication.
Apache Tomcat/7.0.55
At C:\Program Files (x86)\NetApp\OnCommand Shift\ShiftClient\ShiftClient.psm1:1860 char:15
+                 $result = Invoke-RestMethod -Uri $uri$appendstr -Method $method -TimeoutSec  ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
connect-shiftserver : Could not connect to the shift server
At line:1 char:1
+ connect-shiftserver
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-ShiftServer

 

Any help would be appreciated.

Regards,
Babar Haq
7 REPLIES 7

Shweta
9,356 Views

Are you using the same username(admin) and password as used in the installation ?

If you do not provide a hostname and port number to Connect-ShiftServer, it uses the default values, ie localhost and 8443. Is your shift server installed at the default host and port number ? 

babar
9,353 Views

Hi Shweta,

 

Thanks for your message. Yeah I am leaving everything as default. The port is listening and the software does repsond but keeps saying "bad credentials".I actually uninstalled and re-installed just to be sure that i didn't make a mistake while entering the passowrd. In fact I also used notepad to copy/paste the password just be sure that my keyboard (remote desktop) is not playing tricks on me 🙂

 

Regards,

Babar

Shweta
9,344 Views

Ok, then maybe there's something else going on. Here's a couple of things that you can try:

1) Try running Get-ShiftServerState, you should get the message "Shift server is running"

2) Use the verbose mode and check if you see any errors. Use "Connect-ShiftServer -verbose". Can you copy/paste the output here ?

 

babar
9,278 Views

Hi Shweta,

 

I am also attaching shift server log thinking it might help.

 

Get-ShiftServerState been retutning positive result since the begining.

PS C:\Users\administrator.DEMO> Get-ShiftServerState
Shift server is running

 

Verbose doesn't seem to be provide much info either. Below

 

PS C:\Users\administrator.DEMO> Connect-ShiftServer -verbose

cmdlet Connect-ShiftServer at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
credential
VERBOSE: Connecting to the shift server located at host:localhost and port:8443
VERBOSE: GET https://localhost:8443/Shift/api/v1/config/networks with 0-byte payload
Invoke-RestMethod : HTTP Status 401 - Bad credentials
type Status report
message Bad credentials
description This request requires HTTP authentication.
Apache Tomcat/7.0.55
At C:\Program Files (x86)\NetApp\OnCommand Shift\ShiftClient\ShiftClient.psm1:1860 char:15
+ $result = Invoke-RestMethod -Uri $uri$appendstr -Method $method -TimeoutSec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Connect-ShiftServer : Could not connect to the shift server
At line:1 char:1
+ Connect-ShiftServer -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-ShiftServer

 

Regards,

Babar Haq

 

Shweta
9,230 Views

Yeah, the verbose switch is not very useful in your case. Are you using any multibyte characters as your password ? Shift 1.0 is not i18n compliant, so you need to use english characters as your password. What's  the operating system of the shift server machine ?

diez
8,518 Views

i had the same issue after installation (the password defined did not work for me and i got the "invalid credentials"). I used the default password and then i was able to login

Shweta
8,507 Views

Also, make sure that there are no problems during installation. On the last step of the installer, you should see that "OnCommand Shift server is successfully installed". if you see a message like "Problem observed during Shift server installation" then the installation has issues.

Public