2017-08-14 56 views
0

我开始通过Ignite.sh点燃2.1无法执行操作和配置是使用JDBC连接持久性:因为簇是无效的

<property name="persistentStoreConfiguration"> 
     <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"> 
      <property name="persistentStorePath" value="/tools/ignite/ignite-save/presisent/"></property> 
      <property name="walStorePath" value="/tools/ignite/ignite-save/wal/"/> 
     </bean> 
    </property> 
</bean> 

我用JDBC连接它,有一个错误,activeOnStart是无用的,我怎样才能激活节点?如果我使用主类开始点燃并设置点燃激活,这是好的,我怎么能点燃节点通过ignite.sh ??

Exception in thread "main" java.sql.SQLException: Failed to query Ignite. 
     at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:123) 
     at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeUpdate(JdbcThinStatement.java:129) 
     at org.apache.ignite.examples.datagrid.JdbcExample.main(JdbcExample.java:50) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:606) 
     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) 
    Caused by: class org.apache.ignite.IgniteCheckedException: Error server response: [req=JdbcQueryExecuteRequest [schemaName=null, pageSize=1024, maxRows=0, sqlQry=CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) WITH "template=replicated", args=null], resp=JdbcResponse [res=null, status=1, err=class org.apache.ignite.internal.processors.query.IgniteSQLException: Unexpected DLL operation failure: Can not perform the operation because the cluster is inactive. Note, that the cluster is considered inactive by default if Ignite Persistent Store is used to let all the nodes join the cluster. To activate the cluster call Ignite.activate(true).]] 
     at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.sendRequest(JdbcThinTcpIo.java:253) 
     at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.queryExecute(JdbcThinTcpIo.java:227) 
     at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:109) 
     ... 7 more 
+0

你为什么认为activeOnStart是无用的? –

+0

我将activeOnStart添加到配置中,它不起作用 – user7387815

+0

当您激活群集时,您可以共享日志和代码段吗? –

回答

1

您可以使用$ IGNITE_HOME/bin/control.sh脚本来激活/取消激活集群。