Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Invalid JSON primitive: The.

I was experiencing the same "Invalid JSON error" on an environment where the hostname alias setting is not being used. So it sounds like my issue could be a IIS configuration issue.

 

I will need to look into hbm's suggestion around checking IIS permissions to see if this is the cause for the environment.

Super Contributor
Posts: 383
Registered: ‎10-12-2015

Re: Invalid JSON primitive: The.

I ended up adding a microsoft loopback adapter and assigning the external IP address to that adapter - external IP address now resolves externally and internally, was able to update the hostname and its still working.

Staff
Posts: 294
Registered: ‎11-05-2015

Re: Invalid JSON primitive: The.

Ah, so the external IP wasn't actually owned by the node in question.

One of the checks that the Portals' AdminService does is to check whether the request's originating IP is configured on any of the machine's network interfaces. By adding a loopback configured to this IP you did exactly what the security of Admin Service expects.

 

Fun fact: the same can be achieved without adding a new loopback network interface, as the Windows configuration allows to set multiple IP addresses on a single interface, although I don't think this is available through any of the standard GUI, only command line/registry hacking.

 

I'm very curious whether Colin checked if this applies to his configurations.

Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Invalid JSON primitive: The.

I recently worked on the environment where I've seen this issue before and did not experience it whilst setting a new starting workspace (I've made no changes to IIS configuration).

 

I should add that Shaun is working on the Amazon Cloud which is very different to the systems I work on which are run internally on customer networks with no public access so we aren't affected by a machine not knowing its public IP address. Having setup a implementation of GeoMedia WebMap and Geospatial Portal in the Amazon Cloud I know it offers some unique challenges.

Contributor
Posts: 62
Registered: ‎11-17-2015

Re: Invalid JSON primitive: The.

I had the same problem after configuring WebMap in an internal server that is exposed to the web. I set the Hostname aliases to the public DNS, that is recognized inside and outside the VM but I was not able to configure a Geospatial Portal instance outside it, it always was retrieving the AdminConsole error.

 

Based on the solution pointed out by ShaunF, I remembered to set the DNS to localhost IP (127.0.0.1) in the hosts file at C:\windows\system32\drivers\etc. And it is now working correctly!

Super Contributor
Posts: 383
Registered: ‎10-12-2015

Re: Invalid JSON primitive: The.

Another variation.

Client server setup for SSL only. 

In C:\Program Files\Common Files\Hexagon\Administration Console Service\log was showing SSL error

 

2019-03-04 14:11:47,765 [8] WARN ErrorHandler [(null)] - A communication exception was encountered: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
2019-03-04 14:11:47,765 [8] ERROR ErrorHandler [(null)] - The service encountered an unhandled exception
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ----> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 c...).

 

All other htttps related services appeared to be operational. This was an apollo server - adminconsole, adminportal, apollo data manager, apollo core console etc all operational over ssl except for ability to assign workspace in adminportal. The server resolved public name / IP address etc on the server itself. Just to make sure added the public name to localhost file uisng 127.0.0.1 - still no go.

 

For this environment got it going by changing IIS site binding for https so that hostname was populated with the public name- matching the public name specifiec in adminconsole 'hostname alias' - and enabling 'Require Server Name Indication'.

IIS-http-binding2.png

Then started assigning workspace to portals.

Highlighted
Super Contributor
Posts: 383
Registered: ‎10-12-2015

Re: Invalid JSON primitive: The.

"One of the checks that the Portals' AdminService does is to check whether the request's originating IP is configured on any of the machine's network interfaces. By adding a loopback configured to this IP you did exactly what the security of Admin Service expects."

 

I have not tested, but came across this that might work better than adding the microsoft loopback adaptor:

-- Add second public IP address to server network adapter (first IP address is typically actual IP address for internal server name). Identify name of adapter (InterfaceAlias) from ipconfig or similar.
New-NetIPAddress –IPAddress 202.49.127.109 –InterfaceAlias "Ethernet" –SkipAsSource $True
-- Rollback - remove it.
Remove-NetIPAddress –IPAddress 202.49.127.109 –InterfaceAlias "Ethernet" –SkipAsSource $True

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.