ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vldpyat...@gmail.com>
Subject Re: Simple connect to gridgain via java for taken data
Date Tue, 06 Sep 2016 11:11:52 GMT
In general, Ignite supports compatibility for minor versions, but do not
for new major release.

You can use REST API for the purpose [1].
If you want to configure REST, all you need to do, add dependency to
ignite-rest-http on server side.

[1]: https://apacheignite.readme.io/docs/rest-api

On Tue, Sep 6, 2016 at 1:03 PM, warorc <warorc@ngs.ru> wrote:

> Hi, thank you for your answer!
>
> The problem that I don't know which version use developers. And when they
> will change version to new one, I still don't be known what version they
> use. I can't afford update version every time when developers change their.
>
> So I asked about alternative simple way connecting to gridgain nodes
> without
> starting client node on test machine and doesn't depend on gridgain
> version?
>
>
> vdpyatkov wrote
> > Hi,
> >
> > Are you sure to use same Ignite version on server and client, where are
> > you
> > using Ignite JDBC connection?
> > The message:
> > *Remote node has cache affinity assignment mode different from local*
> > look like you apply different configuration on client and on server.
> >
> > Also, you can access to date using jcache API through Ignite client node
> > [1,2].
> > [1]: https://apacheignite.readme.io/docs/clients-vs-servers
> > [2]: https://apacheignite.readme.io/docs/jcache
> >
> > On Tue, Sep 6, 2016 at 12:06 PM, warorc &lt;
>
> > warorc@
>
> > &gt; wrote:
> >
> >> Hello, everyone.
> >>
> >> I need simple task. Somewhere our developers which use gridgain.
> >>
> >> I try to test that data correct inserted to this gridgain stacks. So I
> >> just
> >> want to connect to this node, which I don't know anything and get data
> >> from
> >> that.
> >>
> >> I tried to do it by jdbc:driver, but seen that such method is deprecated
> >> in
> >> version 1.7.0, so I started doing it as written in docs via spring and
> >> xml
> >> file. But now I can't connected to gridgains nodes with strange error.
> I
> >> lost 2 days and can't resove this problem.
> >>
> >> My xml:
> >>
> > <beans xmlns="http://www.springframework.org/schema/beans"
> >>
> >         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>        xsi:schemaLocation="
> >>         http://www.springframework.org/schema/beans
> >>         http://www.springframework.org/schema/beans/spring-beans.xsd">
> >>
> >>
> > <bean id="visor"
> >>
> >  class="org.apache.ignite.plugin.security.SecurityCredentials">
> >>
> > <constructor-arg value="visor"/>
> >>
> > <constructor-arg value="q12345678"/>
> >>
> > </bean>
> >>
> >>
> > <bean id="ignite.cfg"
> >>
> >  class="org.apache.ignite.configuration.IgniteConfiguration">
> >>
> >>
> > <property name="clientMode" value="true"/>
> >>
> >>
> > <property name="peerClassLoadingEnabled" value="true"/>
> >>
> >>
> >>
> > <property name="discoverySpi">
> >>
> > <bean
> >>
> >  class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
> >>
> > <property name="ipFinder">
> >>
> > <bean
> >>
> >  class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.
> >> TcpDiscoveryVmIpFinder">
> >>
> > <property name="addresses">
> >>
> > <list>
> >>
> >>
> > <value>
> > 10.116.146.201
> > </value>
> >>
> >>
> > <value>
> > 10.116.146.202
> > </value>
> >>
> > </list>
> >>
> > </property>
> >>
> > </bean>
> >>
> > </property>
> >>
> > </bean>
> >>
> > </property>
> >>
> > <property name="pluginConfigurations">
> >>
> > <list>
> >>
> > <bean
> >>
> >  class="org.gridgain.grid.configuration.GridGainConfiguration">
> >>
> > <property value="true" name="rollingUpdatesEnabled"/>
> >>
> > <property name="securityCredentialsProvider">
> >>
> > <bean
> >>
> >  class="org.apache.ignite.plugin.security.SecurityCredentialsBasicProvid
> >> er">
> >>
> > <constructor-arg ref="visor"/>
> >>
> > </bean>
> >>
> > </property>
> >>
> > </bean>
> >>
> > </list>
> >>
> > </property>
> >>
> > </bean>
> >>
> > </beans>
> >>
> >> Exception:
> >>
> >> SEVERE: Failed to start manager: GridManagerAdapter [enabled=true,
> >> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
> >> class org.apache.ignite.IgniteCheckedException: Remote node has cache
> >> affinity assignment mode different from local [locId8=3c48b04b,
> >> locDelayAssign=true, rmtId8=4d888c0f, rmtLateAssign=false,
> >> rmtAddrs=[os-sbt-oaabs-006.ca.sbrf.ru/10.116.144.202, /127.0.0.1]]
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.
> >> checkAttributes(GridDiscoveryManager.java:1124)
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.
> GridDiscoveryManager.start(
> >> GridDiscoveryManager.java:701)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.startManager(
> >> IgniteKernal.java:1571)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:901)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(
> >> IgnitionEx.java:1739)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(
> >> IgnitionEx.java:1589)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516)
> >>                 at org.apache.ignite.Ignition.start(Ignition.java:322)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> >> getIgnite(JdbcConnection.java:190)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> > <init>
> > (
> >> JdbcConnection.java:151)
> >>                 at
> >> org.apache.ignite.IgniteJdbcDriver.connect(IgniteJdbcDriver.java:361)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:664)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:270)
> >>                 at ru.sbt.qa.pu.Main.main(Main.java:39)
> >>
> >> сен 06, 2016 3:07:55 PM org.apache.ignite.logger.java.JavaLogger error
> >> SEVERE: Got exception while starting (will rollback startup routine).
> >> class org.apache.ignite.IgniteCheckedException: Failed to start
> manager:
> >> GridManagerAdapter [enabled=true,
> >> name=org.apache.ignite.internal.managers.discovery.
> GridDiscoveryManager]
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.startManager(
> >> IgniteKernal.java:1576)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:901)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(
> >> IgnitionEx.java:1739)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(
> >> IgnitionEx.java:1589)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516)
> >>                 at org.apache.ignite.Ignition.start(Ignition.java:322)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> >> getIgnite(JdbcConnection.java:190)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> > <init>
> > (
> >> JdbcConnection.java:151)
> >>                 at
> >> org.apache.ignite.IgniteJdbcDriver.connect(IgniteJdbcDriver.java:361)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:664)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:270)
> >>                 at ru.sbt.qa.pu.Main.main(Main.java:39)
> >> Caused by: class org.apache.ignite.IgniteCheckedException: Remote node
> >> has
> >> cache affinity assignment mode different from local [locId8=3c48b04b,
> >> locDelayAssign=true, rmtId8=4d888c0f, rmtLateAssign=false,
> >> rmtAddrs=[os-sbt-oaabs-006.ca.sbrf.ru/10.116.144.202, /127.0.0.1]]
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.
> >> checkAttributes(GridDiscoveryManager.java:1124)
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.
> GridDiscoveryManager.start(
> >> GridDiscoveryManager.java:701)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.startManager(
> >> IgniteKernal.java:1571)
> >>                 ... 13 more
> >>
> >> [15:07:56] Ignite node stopped OK
> >> [name=ignite-jdbc-driver-35559313-f8a2-4a36-b914-194022fcf9b1,
> >> uptime=00:00:06:227]
> >> Exception in thread "main" java.sql.SQLException: Failed to start Ignite
> >> node.
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> > <init>
> > (
> >> JdbcConnection.java:162)
> >>                 at
> >> org.apache.ignite.IgniteJdbcDriver.connect(IgniteJdbcDriver.java:361)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:664)
> >>                 at
> >> java.sql.DriverManager.getConnection(DriverManager.java:270)
> >>                 at ru.sbt.qa.pu.Main.main(Main.java:39)
> >> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
> >> start
> >> manager: GridManagerAdapter [enabled=true,
> >> name=org.apache.ignite.internal.managers.discovery.
> GridDiscoveryManager]
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.startManager(
> >> IgniteKernal.java:1576)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:901)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(
> >> IgnitionEx.java:1739)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(
> >> IgnitionEx.java:1589)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569)
> >>                 at
> >> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516)
> >>                 at org.apache.ignite.Ignition.start(Ignition.java:322)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> >> getIgnite(JdbcConnection.java:190)
> >>                 at
> >> org.apache.ignite.internal.jdbc2.JdbcConnection.
> > <init>
> > (
> >> JdbcConnection.java:151)
> >>                 ... 4 more
> >> Caused by: class org.apache.ignite.IgniteCheckedException: Remote node
> >> has
> >> cache affinity assignment mode different from local [locId8=3c48b04b,
> >> locDelayAssign=true, rmtId8=4d888c0f, rmtLateAssign=false,
> >> rmtAddrs=[os-sbt-oaabs-006.ca.sbrf.ru/10.116.144.202, /127.0.0.1]]
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.
> >> checkAttributes(GridDiscoveryManager.java:1124)
> >>                 at
> >> org.apache.ignite.internal.managers.discovery.
> GridDiscoveryManager.start(
> >> GridDiscoveryManager.java:701)
> >>                 at
> >> org.apache.ignite.internal.IgniteKernal.startManager(
> >> IgniteKernal.java:1571)
> >>                 ... 13 more
> >>
> >> How I can in simple way via java just connect to caches and get
> >> information
> >> from them?
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context: http://apache-ignite-users.
> >> 70518.x6.nabble.com/Simple-connect-to-gridgain-via-java-
> >> for-taken-data-tp7539.html
> >> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
> > Vladislav Pyatkov
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Simple-connect-to-gridgain-via-java-
> for-taken-data-tp7539p7545.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Vladislav Pyatkov

Mime
View raw message