2017-08-14 13 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が役に立たない、どうすればノードをアクティブにすることができますか?メインクラスを使って着火を開始し、アクティブな着火を設定すると、ok、どうすれば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スクリプトを使用して、クラスタをアクティブ/非アクティブにできます。