Ingite node in SpringBoot App

classic Classic list List threaded Threaded
22 messages Options
12
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Ingite node in SpringBoot App

Hello!

For me, it looks as follows:

~/Downloads/spring-boot/ignite-client% mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.gpc.rpm:ignite-client >----------------------
[INFO] Building ignite-client 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) > test-compile @ ignite-client >>>
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ ignite-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ ignite-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ ignite-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/gridgain/Downloads/spring-boot/ignite-client/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ ignite-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) < test-compile @ ignite-client <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) @ ignite-client ---
[INFO] Attaching agents: []

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.0.RELEASE)

2019-10-30 13:31:52.584  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : Starting IgniteClientApplication on deathcap with PID 22569 (/home/gridgain/Downloads/spring-boot/ignite-client/target/classes started by gridgain in /home/gridgain/Downloads/spring-boot/ignite-client)
2019-10-30 13:31:52.586  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : No active profile set, falling back to default profiles: default
2019-10-30 13:31:53.470  INFO 22569 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9090 (http)
2019-10-30 13:31:53.481  INFO 22569 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-10-30 13:31:53.481  INFO 22569 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2019-10-30 13:31:53.550  INFO 22569 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-10-30 13:31:53.550  INFO 22569 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 921 ms
Ignite exception:Ignite cluster is unavailable
2019-10-30 13:31:53.736  INFO 22569 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-10-30 13:31:53.827  INFO 22569 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090 (http) with context path ''
2019-10-30 13:31:53.829  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : Started IgniteClientApplication in 1.552 seconds (JVM running for 2.15)

No further output after this line.

Regards,
--
Ilya Kasnacheev


вт, 29 окт. 2019 г. в 20:16, niamin <[hidden email]>:
I am running from my IDE and i can confirm that it runs. Below are some
output from console:

2019-10-27 17:09:13.172  INFO 8601 --- [ange-worker-#38]
o.a.i.i.p.cache.GridCacheProcessor       : Finish proxy initialization,
cacheName=FOO, localNodeId=bf4963b5-8a84-4c66-8709-23b043c4f9bd
2019-10-27 17:09:15.909  INFO 8601 --- [-notifier-timer]
o.a.i.i.p.cluster.GridUpdateNotifier     : Your version is up to date.
*retrieved deserialized successfully from cache 1688
loaded 0 in 4915milliseconds*
2019-10-27 17:09:35.798  INFO 8601 --- [           main]
o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService
'applicationTaskExecutor'
2019-10-27 17:09:36.140  INFO 8601 --- [           main]
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090
(http) with context path ''
2019-10-27 17:09:36.141  INFO 8601 --- [           main]
c.g.r.i.IgniteClientApplication          : Started IgniteClientApplication
in 67.137 seconds (JVM running for 68.972)
2019-10-27 17:10:08.121  INFO 8601 --- [eout-worker-#23]
org.apache.ignite.internal.IgniteKernal  :
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
    ^-- Node [id=bf4963b5, uptime=00:01:00.026]
    ^-- H/N/C [hosts=1, nodes=2, CPUs=8]
    ^-- CPU [cur=0.17%, avg=0.71%, GC=0%]
    ^-- PageMemory [pages=0]
    ^-- Heap [used=70MB, free=98.07%, comm=493MB]
    ^-- Off-heap [used=0MB, free=-1%, comm=0MB]
    ^-- Outbound messages queue [size=0]
    ^-- Public thread pool [active=0, idle=0, qSize=0]
    ^-- System thread pool [active=0, idle=0, qSize=0]



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Ingite node in SpringBoot App

Hello!

I've re-checked your case, and I think it's due to the known issue https://issues.apache.org/jira/browse/IGNITE-11161

This is because of incorrect default in Thin Client. You need to change the following:
ClientConfiguration cfg = new ClientConfiguration().setAddresses(HOST + ":" + PORT2).setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(true));

Then it will work.

Regards,
--
Ilya Kasnacheev


ср, 30 окт. 2019 г. в 13:32, Ilya Kasnacheev <[hidden email]>:
Hello!

For me, it looks as follows:

~/Downloads/spring-boot/ignite-client% mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.gpc.rpm:ignite-client >----------------------
[INFO] Building ignite-client 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) > test-compile @ ignite-client >>>
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ ignite-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ ignite-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ ignite-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/gridgain/Downloads/spring-boot/ignite-client/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ ignite-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) < test-compile @ ignite-client <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.0.RELEASE:run (default-cli) @ ignite-client ---
[INFO] Attaching agents: []

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.0.RELEASE)

2019-10-30 13:31:52.584  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : Starting IgniteClientApplication on deathcap with PID 22569 (/home/gridgain/Downloads/spring-boot/ignite-client/target/classes started by gridgain in /home/gridgain/Downloads/spring-boot/ignite-client)
2019-10-30 13:31:52.586  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : No active profile set, falling back to default profiles: default
2019-10-30 13:31:53.470  INFO 22569 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9090 (http)
2019-10-30 13:31:53.481  INFO 22569 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-10-30 13:31:53.481  INFO 22569 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2019-10-30 13:31:53.550  INFO 22569 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-10-30 13:31:53.550  INFO 22569 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 921 ms
Ignite exception:Ignite cluster is unavailable
2019-10-30 13:31:53.736  INFO 22569 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-10-30 13:31:53.827  INFO 22569 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090 (http) with context path ''
2019-10-30 13:31:53.829  INFO 22569 --- [           main] c.g.r.i.IgniteClientApplication          : Started IgniteClientApplication in 1.552 seconds (JVM running for 2.15)

No further output after this line.

Regards,
--
Ilya Kasnacheev


вт, 29 окт. 2019 г. в 20:16, niamin <[hidden email]>:
I am running from my IDE and i can confirm that it runs. Below are some
output from console:

2019-10-27 17:09:13.172  INFO 8601 --- [ange-worker-#38]
o.a.i.i.p.cache.GridCacheProcessor       : Finish proxy initialization,
cacheName=FOO, localNodeId=bf4963b5-8a84-4c66-8709-23b043c4f9bd
2019-10-27 17:09:15.909  INFO 8601 --- [-notifier-timer]
o.a.i.i.p.cluster.GridUpdateNotifier     : Your version is up to date.
*retrieved deserialized successfully from cache 1688
loaded 0 in 4915milliseconds*
2019-10-27 17:09:35.798  INFO 8601 --- [           main]
o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService
'applicationTaskExecutor'
2019-10-27 17:09:36.140  INFO 8601 --- [           main]
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090
(http) with context path ''
2019-10-27 17:09:36.141  INFO 8601 --- [           main]
c.g.r.i.IgniteClientApplication          : Started IgniteClientApplication
in 67.137 seconds (JVM running for 68.972)
2019-10-27 17:10:08.121  INFO 8601 --- [eout-worker-#23]
org.apache.ignite.internal.IgniteKernal  :
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
    ^-- Node [id=bf4963b5, uptime=00:01:00.026]
    ^-- H/N/C [hosts=1, nodes=2, CPUs=8]
    ^-- CPU [cur=0.17%, avg=0.71%, GC=0%]
    ^-- PageMemory [pages=0]
    ^-- Heap [used=70MB, free=98.07%, comm=493MB]
    ^-- Off-heap [used=0MB, free=-1%, comm=0MB]
    ^-- Outbound messages queue [size=0]
    ^-- Public thread pool [active=0, idle=0, qSize=0]
    ^-- System thread pool [active=0, idle=0, qSize=0]



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
12