Error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0

We are using the latest Octopus Tentacle and Server (2.6.0.778)

Running the Tentacle Setup Wizard,Trying to set up a “Polling” tentacle.

Entering in the Octopus Server URL, Username and Password.

Clicking the “Verify Credentials” button, then the following error log is output:

Connecting to server: http://octopus.silver-bear.info/
Error: Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Octopus.Client.Exceptions.OctopusExceptionFactory.CreateException(WebException webException, HttpWebResponse response) in y:\work\refs\heads\release\source\Octopus.Client\Exceptions\OctopusExceptionFactory.cs:line 42
at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse) in y:\work\refs\heads\release\source\Octopus.Client\OctopusClient.cs:line 425
at Octopus.Client.OctopusClient.EstablishSession() in y:\work\refs\heads\release\source\Octopus.Client\OctopusClient.cs:line 286
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Octopus.Client.OctopusClient.get_RootDocument() in y:\work\refs\heads\release\source\Octopus.Client\OctopusClient.cs:line 58
at Octopus.Tools.TentacleConfiguration.SetupWizard.TentacleSetupWizardModel.VerifyCredentials(ILog logger) in y:\work\refs\heads\release\source\Octopus.Tools\TentacleConfiguration\SetupWizard\TentacleSetupWizardModel.cs:line 266

Any suggestions?

I am able to browse to the octopus server using that URL (http://octopus.silver-bear.info/) from the machine where the tentacle setup wizard is running so i don’t think its a problem with the server URL :slight_smile:

Hi Darrell,

Thanks for getting in touch! What we believe we are seeing is HTML output when JSON is expected. Generally when this happens something like a proxy is in the way. Its very possible the browser has a remembered setting, where the API calls do not. To troubleshoot this I would suggest running octo.exe from that machine and just running a simple command such as list-projects. This will provide an API call and hopefully give you the exact html page error that is being seen by the wizard.

Please let me know how you get along.
Vanessa

I have the same problem after migrating from 2.6 to 3.1. List-projects just show the same exception.

Hi,

Thanks for reaching out. This is most likely because either the URL or the API Key are incorrect. Do you use port 8442 to connect to the Octopus web portal? you should use the exact same url you use for the web portal.

Regards,

Dalmiro.

I had the same problem. I was trying to use base server URL in --server http://myserver/ per example here: http://docs.octopusdeploy.com/display/OD/Jenkins

We are running our Dev app and CI servers on the same machine, so http://myserber is really a Dev app server.

What solved the issue was adding /octopus/: http://myserver/octopus/