Error : Export Reports of Deployments using Octo.exe

Hi Team,

I am facing an error while trying to export the deployments in an xml using the below command

octo.exe dump-deployments --server http:/ --apiKey API- --filePath=Deployments.xml

Octo.exe version : 2.5.10

ERROR :

Handshaking with Octopus server: https://
Error from Octopus server (HTTP 504):

Error reported by FreeProxy

Error reported by FreeProxy

 

Tue

16 Jun 2015 14:44:58


Error Message :

Timeout waiting to connect to the web site.

 

Your Information:

IP Address: 172.50.1.7

 

Action:

Retry the action, using a valid Web address. It is possible that host "octo pus.rsc-uat.org" does not exist.


Help desk contact information:

 

 

 

Hi Jaydeep,

Thanks for reaching out. There seems to be a problem with the URL you are passing down to the --server parameter. Can you double check that you can browse that exact URL from your machine?

Also, just to be sure run the parameters with the = sign and the values between " like

octo.exe dump-deployments --server="" --ApiKey="" --filePath=""

Thanks,

Dalmiro

Hi Dalmiro,

The URL that I passed is correct , its just I did not mention it in my issue.

I tried by running the command adding = sign and the values in " and got the below error

Below is the command that I executed

octo.exe dump-deployments --server=“http://octopus.rsc-uat.org” --apiKey=“API-MY-API-KEY” --filePath=Deployments.xml

Handshaking with Octopus server: http://octopus.rsc-uat.org
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while pars
ing value: <. Path ‘’, line 0, position 0.

Server stack trace:
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(Jso
nReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Jso
nReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type
objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, Jso
nSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSeriali
zerSettings settings)
at Octopus.Client.Exceptions.OctopusExceptionFactory.CreateException(WebExcep
tion webException, HttpWebResponse response)
at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusReq
uest request, Boolean readResponse)
at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParame
ters)
at Octopus.Client.OctopusClient.EstablishSession()
at System.Lazy`1.CreateValue()

Exception rethrown at [0]:
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(Jso
nReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Jso
nReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type
objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, Jso
nSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSeriali
zerSettings settings)
at Octopus.Client.Exceptions.OctopusExceptionFactory.CreateException(WebExcep
tion webException, HttpWebResponse response)
at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusReq
uest request, Boolean readResponse)
at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParame
ters)
at Octopus.Client.OctopusClient.EstablishSession()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy`1.get_Value()
at Octopus.Client.OctopusClient.get_RootDocument()
at OctopusTools.Commands.ApiCommand.Execute(String[] commandLineArguments)
at OctopusTools.Program.Main(String[] args)
Exit code: -3

Hi Jaydeep,

Thanks for the info. The 2nd error indicates that the command received an unwanted type of data that starts with “<” instead of JSON

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while pars 
ing value: <. Path '', line 0, position 0.

This usually happens when a proxy gets in the middle of the request and returns an HTML page with some error message to the program. The best thing you could do to troubleshoot this would be to setup a web debugging tool like Fiddler, try to run the command again and check the full HTML response you get back.

Regards,

Dalmiro

Hi Dalmiro,

I have overcome the connectivity issue now but found one more issue.
Attached is the screenshot for your reference.
It seems the Octo.exe command line tool that I have downloaded is the latest version and the Octopus Deploy that is currently deployed is a bit older version.
Is there a way to export the list of deployments of all the projects configured using the old version of Octo.exe. Current version of Octo.exe that I am using is

1.1.17.62

Hi,

What version of the Octopus Server are you running exacly? That’ll decide which version of Octo.exe you should use.

You can check the version of the Octopus Server on the Web UI at the left bottom of the screen (see screenshot)

Thanks,

Dalmiro

version.JPG

Hi Dalmiro,

The current version of Octopus Server that we are using is 1.6.1.1718.

I got to know that this version of octopus Server does not support the octo.exe that I am using. However is there way where I can get the latest release of all the projects deployed in a single command with the old version of Octo.exe

Hi Team,

Need your help here .

Hi Jaydeep,

I am sorry to say that you cannot use a more current octo.exe with an older version of Octopus Deploy. It hooks into the API, so if the functionality doesn’t exist it will error. There is no way for you to get the information that you want with a 1.6 Octopus Server as it was not a function of 1.6.

Is there a specific reason you are still using 1.6 ?

Vanessa