2
votes

Ship returning 404 when trying to install update package. Here is the script i'm trying for.

Invoke-WebRequest -Uri "http://mydomain/services/package/install" -Method Post -ContentType "application/x-www-form-urlencoded" -Body @{"path"="@D:\Users\Parsh\Desktop\test.update";"DisableIndexing"=$true} -UseBasicParsing -TimeoutSec 5000

And i'm getting below error. `

    404 - NotFound
    The resource you have requested cannot be found.
    We're sorry :-(




  Graphics courtesy of the awesome Matthew Inman
At line:1 char:1

Invoke-WebRequest -Uri "http://mydomain/services/package/inst ...
  + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
 eption
  + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand`

I'm using .net framework 4.6.2 and Sitecore 8.2 initial release. also doubled checked all the configuration, everything looks fine,

Appreciate your support.

Update : Attached screenshot:

enter image description here

1
Do you get an error when browsing to /services/about on the server (link to documentation). It's working on 8.1u3, but I heard there are issues on 8.2. It's also possible that if you have a custom 404 handler that it is being too aggressive and you need to ignore these routes. - jammykam
I see Sitecore.Ship - version 0.4.0.0 , when i browse /services/about - PaRsH
Seems to be working ok then... where are you calling Ship from? Are you using Octopus deploy or something so the Powershell script is invoked on the server itself? Otherwise, did you enable remote packageInstallation and whitelist your server? - jammykam
I have tried it in octopus first, did't worked. Then i tried toexecute the same command in local machine in the powershell. Did't worked. Attached the screenshot. - PaRsH
@jammykam Enabled remote packageInstallation and whitelist server also. - PaRsH

1 Answers

1
votes

It took some time to debug the issue as it was returning 404. Initially i thought that, resource itself not available.Later debugging the Sitecore.Ship framework i found that, 404 throwing bcz the path was not found. See screenshot below.

enter image description here

When i changed the location of the update file it worked.