Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Failed to Start SAM

Solved Go to solution

Failed to Start SAM

Expert Contributor

Hi,

I installed HDF3.0 on an existing HDP2.6.0 cluster using Ambari 2.5.1. Installation was succeed, but failed to start SAM. My configuration uses Postgresql for SAM. I got the below error. Does anyone happen to see this before?

Exception in thread "main" com.hortonworks.streamline.storage.exception.StorageException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "ON"
  Position: 112
	at com.hortonworks.streamline.storage.impl.jdbc.provider.sql.factory.AbstractQueryExecutor$QueryExecution.executeUpdate(AbstractQueryExecutor.java:223)
	at com.hortonworks.streamline.storage.impl.jdbc.provider.sql.factory.AbstractQueryExecutor.executeUpdate(AbstractQueryExecutor.java:180)
	at com.hortonworks.streamline.storage.impl.jdbc.provider.postgresql.factory.PostgresqlExecutor.insertOrUpdateWithUniqueId(PostgresqlExecutor.java:150)
	at com.hortonworks.streamline.storage.impl.jdbc.provider.postgresql.factory.PostgresqlExecutor.insertOrUpdate(PostgresqlExecutor.java:69)
	at com.hortonworks.streamline.storage.impl.jdbc.JdbcStorageManager.addOrUpdate(JdbcStorageManager.java:81)
	at com.hortonworks.streamline.storage.cache.writer.StorageWriteThrough.addOrUpdate(StorageWriteThrough.java:37)
	at com.hortonworks.streamline.storage.CacheBackedStorageManager.addOrUpdate(CacheBackedStorageManager.java:68)
	at com.hortonworks.streamline.streams.catalog.service.StreamCatalogService.addOrUpdateTopologyVersionInfo(StreamCatalogService.java:262)
	at com.hortonworks.streamline.streams.service.StreamsModule.setupPlaceholderTopologyVersionInfo(StreamsModule.java:210)
	at com.hortonworks.streamline.streams.service.StreamsModule.setupPlaceholderEntities(StreamsModule.java:198)
	at com.hortonworks.streamline.streams.service.StreamsModule.getResources(StreamsModule.java:104)
	at com.hortonworks.streamline.webservice.StreamlineApplication.registerResources(StreamlineApplication.java:293)
	at com.hortonworks.streamline.webservice.StreamlineApplication.run(StreamlineApplication.java:100)
	at com.hortonworks.streamline.webservice.StreamlineApplication.run(StreamlineApplication.java:74)
	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
	at io.dropwizard.cli.Cli.run(Cli.java:75)
	at io.dropwizard.Application.run(Application.java:79)
	at com.hortonworks.streamline.webservice.StreamlineApplication.main(StreamlineApplication.java:78)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "ON"
  Position: 112
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at com.hortonworks.streamline.storage.impl.jdbc.provider.sql.factory.AbstractQueryExecutor$QueryExecution.executeUpdate(AbstractQueryExecutor.java:221)
	... 18 more
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Failed to Start SAM

@yjiang @Andres Koitmäe

@Jerry Johnson

This message is usually because you are using an unsupported database version, most commonly because you installed SAM against the Ambari Database - unfortunately at this time they do not support cross-compatible versions.

For your reference, the support matrices are here: https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_support-matrices/content/ch_matrices-hdf...

View solution in original post

7 REPLIES 7
Highlighted

Re: Failed to Start SAM

Hi,

I have exactly the same situation. Haven't find the solution yet.

Highlighted

Re: Failed to Start SAM

Experiencing same issue on a completely new installation. We did notice that the postgres database did contain tables, so connection is working.

Highlighted

Re: Failed to Start SAM

@yjiang @Andres Koitmäe

@Jerry Johnson

This message is usually because you are using an unsupported database version, most commonly because you installed SAM against the Ambari Database - unfortunately at this time they do not support cross-compatible versions.

For your reference, the support matrices are here: https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_support-matrices/content/ch_matrices-hdf...

View solution in original post

Highlighted

Re: Failed to Start SAM

Expert Contributor

After re-configured SAM against Postgresql 9.6, this error is gone. However, I got another error while starting SAM.

Exception in thread "main" com.hortonworks.streamline.storage.exception.StorageException: com.google.common.util.concurrent.UncheckedExecutionException: com.hortonworks.streamline.storage.exception.StorageException: org.postgresql.util.PSQLException: ERROR: relation "topology_version" does not exist
  Position: 15
	at com.hortonworks.streamline.storage.cache.impl.GuavaCache.get(GuavaCache.java:72)
	at com.hortonworks.streamline.storage.cache.impl.GuavaCache.get(GuavaCache.java:41)
	at com.hortonworks.streamline.storage.CacheBackedStorageManager.get(CacheBackedStorageManager.java:74)
	at com.hortonworks.streamline.streams.catalog.service.StreamCatalogService.getTopologyVersionInfo(StreamCatalogService.java:245)
	at com.hortonworks.streamline.streams.service.StreamsModule.setupPlaceholderTopologyVersionInfo(StreamsModule.java:202)
	at com.hortonworks.streamline.streams.service.StreamsModule.setupPlaceholderEntities(StreamsModule.java:198)
	at com.hortonworks.streamline.streams.service.StreamsModule.getResources(StreamsModule.java:104)
	at com.hortonworks.streamline.webservice.StreamlineApplication.registerResources(StreamlineApplication.java:293)
	at com.hortonworks.streamline.webservice.StreamlineApplication.run(StreamlineApplication.java:100)
	at com.hortonworks.streamline.webservice.StreamlineApplication.run(StreamlineApplication.java:74)
	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
	at io.dropwizard.cli.Cli.run(Cli.java:75)
	at io.dropwizard.Application.run(Application.java:79)
	at com.hortonworks.streamline.webservice.StreamlineApplication.main(StreamlineApplication.java:78)

Highlighted

Re: Failed to Start SAM

Expert Contributor

After manually executed /usr/hdf/current/streamline/bootstrap/sql/postgresql/create_tables.sql, I was able to start SAM successfully.

Highlighted

Re: Failed to Start SAM

@yjiang

Glad to hear it's working - there should be a couple of bash scripts in /usr/hdf/current/streamline/bootstrap that are better to use than the sql directly - as it also creates the UDFs and roles and whatnot. I'd suggest you run ./bootstrap-storage.sh drop-create and then ./bootstrap.sh to ensure you have a clean install.

Highlighted

Re: Failed to Start SAM

Expert Contributor

Thanks @Dan Chaffelson

Executed the scripts without error. Was able to start SAM and import an application. Cool!

Don't have an account?
Coming from Hortonworks? Activate your account here