Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Rising Star

Affected versions:

1.2.x, 1.3.0

Symptoms:

Standalone Gateway is up and running. But still there is a failure pop up when trying to upload a bundle. Error details are provided in logs below:

##hst-server.log

Caused by:
com.hortonworks.smartsense.gateway.client.GatewayClientException:
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1
column 7
at com.hortonworks.smartsense.gateway.client.GatewayHttpsClient.uploadBundle(GatewayHttpsClient.java:249)
at com.hortonworks.support.tools.gateway.UploadRunnable.uploadBundle(UploadRunnable.java:100)... 12 more
Caused by: com.google.gson.JsonSyntaxException:
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1
column 7
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:761)
at com.google.gson.Gson.fromJson(Gson.java:710)
at com.google.gson.Gson.fromJson(Gson.java:682)
at com.hortonworks.smartsense.gateway.client.security.ClientCertificateManager.reqSignCert(ClientCertificateManager.java:159)
at com.hortonworks.smartsense.gateway.client.security.ClientCertificateManager.checkSecuritySetup(ClientCertificateManager.java:190)
at com.hortonworks.smartsense.gateway.client.https.HttpsClientFactory.verifyTwoWaySSLSetup(HttpsClientFactory.java:80)
at com.hortonworks.smartsense.gateway.client.https.HttpsClientFactory.getSSLHttpClient(HttpsClientFactory.java:114)
at com.hortonworks.smartsense.gateway.client.https.HttpsClientFactory.getHttpsClient(HttpsClientFactory.java:69)
at com.hortonworks.smartsense.gateway.client.GatewayHttpsClient.uploadBundle(GatewayHttpsClient.java:190)... 13 more

Caused by:
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1
column 7
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)

##hst-gateway.log

17 Oct 2016 14:13:39,820 INFO
qtp1898155970-67 GatewaySecurityFilter:71 - Filtering
https://770745-hadoopmaster03.abcxyz.com:9450/certs/770745-hadoopmaster03.abcxyz.com
for security purposes17 Oct 2016 14:13:39,821 WARN
qtp1898155970-67 GatewaySecurityFilter:125 - Request
https://770745-hadoopmaster03.abcxyz.com:9450/certs/770745-hadoopmaster03.abcxyz.com
doesn't match any pattern.17 Oct 2016 14:13:39,821 WARN
qtp1898155970-67 GatewaySecurityFilter:77 - This request is not allowed on this
port:
https://770745-hadoopmaster03.abcxyz.com:9450/certs/770745-hadoopmaster03.abcxyz.com

##Popup while clicking on "upload".

Unable to connect to the
on-premise SmartSense Gateway (host: 770745-hadoopmaster03.abcxyz.com, port:
9451). Please verify the gateway.host and gateway.port properties in the HST
Server configurations are set correctly and the on-premise SmartSense Gateway
is up and running.

Reason:

Gateway had a filter which would reject any requests if the host url started with a number.

Solution:

The pattern matcher for host in the url is fixed in 1.3.1. Upgrade to 1.3.1 or rename the gateway host to remove the preceding numbers and restart the gateway. SmartSense 1.3.1 upgrade documents : http://docs.hortonworks.com/HDPDocuments/SS1/SmartSense-1.3.1/bk_installation/content/upgrade_scenar...

964 Views
0 Kudos