Running java application in Intellij, stuck on: HikariPool-1 - Starting - java

If I for instance need to restart my session in Intellij, I always get stuck here, I believe it has something to do with my db, which is a mariadb running in docker. Only solution so far is to reboot my computer, rather drastic solution I think.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c54527dea5d8 mariadb "docker-entrypoint.s…" 2 months ago Up About an hour 127.0.0.1:3306->3306/tcp suspicious_sinoussi
#
:: Spring Boot :: (v2.0.1.RELEASE)
2019-01-29 18:19:02.921 INFO 3979 --- [ main] c.netapp.qronicle.QronicleApplicationKt : Starting QronicleApplicationKt on jmasson-mac-0 with PID 3979 (/Users/jonma/Development/java/report-generator/target/classes started by jonma in /Users/jonma/Development/java/report-generator)
2019-01-29 18:19:02.980 INFO 3979 --- [ main] c.netapp.qronicle.QronicleApplicationKt : No active profile set, falling back to default profiles: default
2019-01-29 18:19:03.295 INFO 3979 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#1ed6388a: startup date [Tue Jan 29 18:19:03 GMT 2019]; root of context hierarchy
2019-01-29 18:19:07.020 INFO 3979 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-01-29 18:19:07.570 INFO 3979 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9096 (http)
2019-01-29 18:19:07.601 INFO 3979 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-01-29 18:19:07.601 INFO 3979 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.29
2019-01-29 18:19:07.613 INFO 3979 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/jonma/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2019-01-29 18:19:07.753 INFO 3979 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-01-29 18:19:07.753 INFO 3979 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4459 ms
2019-01-29 18:19:08.679 INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-01-29 18:19:08.684 INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-01-29 18:19:08.685 INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpTraceFilter' to: [/*]
2019-01-29 18:19:08.685 INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2019-01-29 18:19:08.747 INFO 3979 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
added debug to zaxxer.hikar
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader#18b4aac2
2019-01-29 18:45:36.680 INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-01-29 18:45:36.685 INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-01-29 18:45:36.686 INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpTraceFilter' to: [/*]
2019-01-29 18:45:36.687 INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2019-01-29 18:45:36.749 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : HikariPool-1 - configuration:
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : allowPoolSuspension.............false
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : autoCommit......................true
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : catalog.........................none
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : connectionInitSql...............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTestQuery.............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTimeout...............30000
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : dataSource......................none
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceClassName.............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceJNDI..................none
2019-01-29 18:45:36.753 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceProperties............{password=<masked>}
2019-01-29 18:45:36.753 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : driverClassName................."org.mariadb.jdbc.Driver"
2019-01-29 18:45:36.753 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckProperties...........{}
2019-01-29 18:45:36.753 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckRegistry.............none
2019-01-29 18:45:36.753 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : idleTimeout.....................600000
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : initializationFailFast..........true
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : initializationFailTimeout.......1
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : isolateInternalQueries..........false
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : jdbc4ConnectionTest.............false
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : jdbcUrl.........................jdbc:mysql://localhost/qronicle?createDatabaseIfNotExist=true
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : leakDetectionThreshold..........0
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : maxLifetime.....................1800000
2019-01-29 18:45:36.754 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : maximumPoolSize.................10
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : metricRegistry..................none
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : metricsTrackerFactory...........com.zaxxer.hikari.metrics.micrometer.MicrometerMetricsTrackerFactory#68b366e2
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : minimumIdle.....................10
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : password........................<masked>
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : poolName........................"HikariPool-1"
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : readOnly........................false
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : registerMbeans..................false
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : scheduledExecutor...............none
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : scheduledExecutorService........internal
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : schema..........................none
2019-01-29 18:45:36.755 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : threadFactory...................internal
2019-01-29 18:45:36.756 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : transactionIsolation............default
2019-01-29 18:45:36.756 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : username........................"root"
2019-01-29 18:45:36.756 DEBUG 4407 --- [ main] com.zaxxer.hikari.HikariConfig : validationTimeout...............5000
2019-01-29 18:45:36.756 INFO 4407 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...

You can restart docker. there is no need to restart your PC.
This problem appears with the new docker version. try using an older one like 18.06.1
Same problem found here
Does someone know how to fix this problem?

Related

Spring boot Graphql Not worked

the application stands up but the graphql end point is not produced. I generated this project on start.spring.io but originally settings is the graphql end point not produced
application.yml
datasource:
url: jdbc:postgresql://localhost:10000/postgres
username: admin
password: 12345
graphql:
graphiql:
enabled: true
log
2022-07-07 09:44:40.006 INFO 10960 --- [ restartedMain] c.i.e.EmployeeManagmentApplication : No active profile set, falling back to 1 default profile: "default"
2022-07-07 09:44:40.173 INFO 10960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-07-07 09:44:40.173 INFO 10960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-07-07 09:44:41.787 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2022-07-07 09:44:41.788 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-07-07 09:44:41.823 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13 ms. Found 0 JPA repository interfaces.
2022-07-07 09:44:41.866 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2022-07-07 09:44:41.869 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-07-07 09:44:41.891 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 Redis repository interfaces.
2022-07-07 09:44:43.152 INFO 10960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-07-07 09:44:43.168 INFO 10960 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-07-07 09:44:43.168 INFO 10960 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.64]
2022-07-07 09:44:43.326 INFO 10960 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-07-07 09:44:43.326 INFO 10960 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3149 ms
2022-07-07 09:44:43.500 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-07-07 09:44:43.722 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-07-07 09:44:43.794 INFO 10960 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-07-07 09:44:43.927 INFO 10960 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.9.Final
2022-07-07 09:44:44.284 INFO 10960 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-07-07 09:44:44.547 INFO 10960 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
2022-07-07 09:44:44.780 INFO 10960 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-07-07 09:44:44.793 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-07-07 09:44:44.903 WARN 10960 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-07-07 09:44:46.688 INFO 10960 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-07-07 09:44:46.779 INFO 10960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-07-07 09:44:46.805 INFO 10960 --- [ restartedMain] c.i.e.EmployeeManagmentApplication : Started EmployeeManagmentApplication in 7.652 seconds (JVM running for 10.128)```
pom.xml

Hazelcast adding address to blacklist and client not connecting

I am new to Hazelcast and in my application when I am starting Hazelcast member it is showing two addresses been blacklisted don't know why, what is the best configuration for Hazelcast clustering?
Here is the log that I am getting:
2021-07-22 13:15:51.823 INFO 212124 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http)
2021-07-22 13:15:51.844 INFO 212124 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-07-22 13:15:51.845 INFO 212124 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.44]
2021-07-22 13:15:52.094 INFO 212124 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-07-22 13:15:52.094 INFO 212124 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4676 ms
2021-07-22 13:15:52.417 INFO 212124 --- [ main] com.hazelcast.instance.AddressPicker : [LOCAL] [APP] [4.2] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [192.168.0.104]
2021-07-22 13:15:53.350 INFO 212124 --- [ main] com.hazelcast.system : [192.168.0.104]:5701 [APP] [4.2] Hazelcast 4.2 (20210324 - 405cfd1) starting at [192.168.0.104]:5701
2021-07-22 13:15:54.178 INFO 212124 --- [ main] com.hazelcast.instance.impl.Node : [192.168.0.104]:5701 [APP] [4.2] Using TCP/IP discovery
2021-07-22 13:15:54.180 WARN 212124 --- [ main] com.hazelcast.cp.CPSubsystem : [192.168.0.104]:5701 [APP] [4.2] CP Subsystem is not enabled. CP data structures will operate in UNSAFE mode! Please note that UNSAFE mode will not provide strong consistency guarantees.
2021-07-22 13:15:54.680 INFO 212124 --- [ main] c.h.internal.diagnostics.Diagnostics : [192.168.0.104]:5701 [APP] [4.2] Diagnostics started
2021-07-22 13:15:54.680 INFO 212124 --- [ main] c.h.i.diagnostics.BuildInfoPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active
2021-07-22 13:15:54.681 INFO 212124 --- [ main] c.h.i.d.SystemPropertiesPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active
2021-07-22 13:15:54.681 INFO 212124 --- [ main] c.h.i.d.ConfigPropertiesPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active
2021-07-22 13:15:54.684 INFO 212124 --- [ main] c.h.i.d.PendingInvocationsPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: period-millis:30000 threshold:1
2021-07-22 13:15:54.686 INFO 212124 --- [ main] c.h.internal.diagnostics.MetricsPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active, period-millis:60000
2021-07-22 13:15:54.686 INFO 212124 --- [ main] c.h.i.diagnostics.SlowOperationPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active, period-millis:30000
2021-07-22 13:15:54.687 INFO 212124 --- [ main] c.h.i.d.PendingInvocationsPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: period-millis:30000 threshold-millis:5000
2021-07-22 13:15:54.687 INFO 212124 --- [ main] c.h.i.d.PendingInvocationsPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: period-millis:5000
2021-07-22 13:15:54.688 INFO 212124 --- [ main] c.h.i.d.OperationProfilerPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active, period-millis:5000
2021-07-22 13:15:54.688 INFO 212124 --- [ main] .h.i.d.MemberHazelcastInstanceInfoPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active, period-millis:60000
2021-07-22 13:15:54.689 INFO 212124 --- [ main] c.h.i.diagnostics.SystemLogPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: logPartitions:false
2021-07-22 13:15:54.692 INFO 212124 --- [SchedulerThread] c.h.internal.diagnostics.Diagnostics : [192.168.0.104]:5701 [APP] [4.2] Diagnostics log directory is [D:\Parth\Hazelcast\logs]
2021-07-22 13:15:54.694 INFO 212124 --- [ main] c.h.i.diagnostics.StoreLatencyPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: period-millis:60000 resetPeriod-millis:0
2021-07-22 13:15:54.696 INFO 212124 --- [ main] .h.i.d.MemberHazelcastInstanceInfoPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active, period-millis:10000
2021-07-22 13:15:54.697 INFO 212124 --- [ main] c.h.i.d.OperationHeartbeatPlugin : [192.168.0.104]:5701 [APP] [4.2] Plugin:active: period-millis:10000 max-deviation:33%
2021-07-22 13:15:54.699 INFO 212124 --- [ main] com.hazelcast.core.LifecycleService : [192.168.0.104]:5701 [APP] [4.2] [192.168.0.104]:5701 is STARTING
2021-07-22 13:15:59.367 INFO 212124 --- [cached.thread-3] c.h.internal.cluster.impl.TcpIpJoiner : [192.168.0.104]:5701 [APP] [4.2] [192.168.0.104]:5702 is added to the blacklist.
2021-07-22 13:15:59.524 INFO 212124 --- [cached.thread-5] c.h.internal.cluster.impl.TcpIpJoiner : [192.168.0.104]:5701 [APP] [4.2] [192.168.0.104]:5703 is added to the blacklist.
2021-07-22 13:16:00.178 INFO 212124 --- [ main] c.h.internal.cluster.ClusterService : [192.168.0.104]:5701 [APP] [4.2]
Members {size:1, ver:1} [
Member [192.168.0.104]:5701 - c35ebca4-ca5f-404c-ba0e-1c5e1287aa21 this
]
2021-07-22 13:16:00.194 INFO 212124 --- [ main] com.hazelcast.core.LifecycleService : [192.168.0.104]:5701 [APP] [4.2] [192.168.0.104]:5701 is STARTED
2021-07-22 13:16:00.514 INFO 212124 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-07-22 13:16:01.489 INFO 212124 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8081 (http) with context path ''
2021-07-22 13:16:01.506 INFO 212124 --- [ main] com.APPhub.Application : Started Application in 15.086 seconds (JVM running for 15.996)
Here two addresses getting blacklisted not sure why.
And my server config is as below:
Config config = new Config();
config.getNetworkConfig().setPort(5701)
.setPortAutoIncrement( true ).setPortCount(20);
config.getNetworkConfig().setReuseAddress( true );
System.setProperty( "hazelcast.diagnostics.enabled", "true" );
System.setProperty( "hazelcast.diagnostics.metric.level", "info" );
System.setProperty( "hazelcast.diagnostics.invocation.sample.period.seconds", "30" );
System.setProperty( "hazelcast.diagnostics.pending.invocations.period.seconds", "30" );
System.setProperty( "hazelcast.diagnostics.slowoperations.period.seconds", "30" );
System.setProperty( "hazelcast.diagnostics.storeLatency.period.seconds", "60" );
System.setProperty( "hazelcast.diagnostics.directory", "D:/Parth/Hazelcast/logs/" );
System.setProperty( "hazelcast.diagnostics.filename.prefix", "Server" );
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getInterfaces().addInterface("127.0.0.1");
JoinConfig join = config.getNetworkConfig().getJoin();
join.getTcpIpConfig().addMember("192.168.0.104");
join.getTcpIpConfig().setEnabled(true);
When trying to connect client it gives:
2021-07-22 12:07:24.081 INFO 192584 --- [ration.thread-0] c.h.c.i.p.t.AuthenticationMessageTask : [192.168.0.104]:5701 [APP] [4.2] Received auth from Connection[id=2, /127.0.0.1:5701->/127.0.0.1:5703, qualifier=null, endpoint=[127.0.0.1]:5703, alive=true, connectionType=JVM, planeIndex=-1], successfully authenticated, clientUuid: 6bebb36c-b865-4fd5-aa12-d0f3ec82ae8d, client version: 4.2
When Connect 1 ==============================================================
6bebb36c-b865-4fd5-aa12-d0f3ec82ae8d
8c54b788-7dfb-401a-ae2c-70444534fa8d
When Connect 1 ==============================================================
2021-07-22 12:07:38.902 WARN 192584 --- [.IO.thread-in-1] c.h.i.server.tcp.TcpServerConnection : [192.168.0.104]:5701 [APP] [4.2] Connection[id=1, /127.0.0.1:5701->/127.0.0.1:5702, qualifier=null, endpoint=[127.0.0.1]:5702, alive=false, connectionType=JVM, planeIndex=-1] closed. Reason: Exception in Connection[id=1, /127.0.0.1:5701->/127.0.0.1:5702, qualifier=null, endpoint=[127.0.0.1]:5702, alive=true, connectionType=JVM, planeIndex=-1], thread=hz.APP1.IO.thread-in-1
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_275]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_275]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_275]
at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.8.0_275]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[na:1.8.0_275]
at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:119) ~[hazelcast-all-4.2.jar:4.2]
at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:383) [hazelcast-all-4.2.jar:4.2]
at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:368) [hazelcast-all-4.2.jar:4.2]
at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:294) [hazelcast-all-4.2.jar:4.2]
at com.hazelcast.internal.networking.nio.NioThread.executeRun(NioThread.java:249) [hazelcast-all-4.2.jar:4.2]
Client Configuration:
ClientConfig clientConfig = new ClientConfig();
clientConfig.setClusterName("APP");
clientConfig.getNetworkConfig().addAddress("localhost");
clientConfig.getNetworkConfig().setSmartRouting(true);
clientConfig.getNetworkConfig().addOutboundPortDefinition(5702-5720);
clientConfig.setProperty("hazelcast.client.heartbeat.timeout", "60000");
clientConfig.setProperty("hazelcast.client.heartbeat.timeout", "5000");
ClientConnectionStrategyConfig connectionStrategyConfig = clientConfig.getConnectionStrategyConfig();
connectionStrategyConfig.setReconnectMode(ClientConnectionStrategyConfig.ReconnectMode.ON);
connectionRetryConfig.setInitialBackoffMillis(1000)
.setMaxBackoffMillis(60000)
.setMultiplier(2)
.setClusterConnectTimeoutMillis(1000)
.setJitter(0.2);
Let me know what wrong am I doing or what is best configuration for Member and client clustering where Member will be 1 and clients will be multiple.
It's likely that the heartbeat timeout for the client is too short.
You've probably copied the heartbeat configuration from https://docs.hazelcast.com/imdg/4.2/clients/java.html
clientConfig.setProperty("hazelcast.client.heartbeat.timeout", "60000");
clientConfig.setProperty("hazelcast.client.heartbeat.interval", "5000");
but for the second line you've set timeout again instead of interval, overriding the value of 60000 with 5000

HikariCP Connection aquistion errors

I developed a simple spring boot application that has a jms listener on IBM MQ. It receives some messages, does some transformation, saves the result to DB and drops the result into a different queue on same queue manager. The app is containerized and deployed on Openshift.
The app starts up successfully and works fine too. But after a arbitary amount of time I see connection aquisition errors. During this time the app is idle and not handling any traffic.
Spring boot version : 2.2.9.RELEASE
odbc version : 12.1.0.2
Below are my log entries. Any help is greatly appreciated.
2020-11-30 15:18:48.949 INFO 1 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.18.Final
2020-11-30 15:18:50.006 INFO 1 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-11-30 15:18:52.118 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : HikariPool-1 - configuration:
2020-11-30 15:18:52.120 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : allowPoolSuspension.............false
2020-11-30 15:18:52.120 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : autoCommit......................true
2020-11-30 15:18:52.120 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : catalog.........................none
2020-11-30 15:18:52.120 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionInitSql...............none
2020-11-30 15:18:52.120 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTestQuery.............none
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTimeout...............30000
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSource......................none
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceClassName.............none
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceJNDI..................none
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceProperties............{password=<masked>}
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : driverClassName................."oracle.jdbc.OracleDriver"
2020-11-30 15:18:52.121 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : exceptionOverrideClassName......none
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckProperties...........{}
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckRegistry.............none
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : idleTimeout.....................30000
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : initializationFailTimeout.......1
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : isolateInternalQueries..........false
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : jdbcUrl.........................jdbc:oracle:thin:
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : leakDetectionThreshold..........0
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maxLifetime.....................2000000
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maximumPoolSize.................5
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricRegistry..................none
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricsTrackerFactory...........none
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : minimumIdle.....................2
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : password........................<masked>
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : poolName........................"HikariPool-1"
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : readOnly........................false
2020-11-30 15:18:52.122 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : registerMbeans..................false
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : scheduledExecutor...............none
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : schema..........................none
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : threadFactory...................internal
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : transactionIsolation............default
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : username........................"dummy"
2020-11-30 15:18:52.123 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : validationTimeout...............5000
2020-11-30 15:18:52.123 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-11-30 15:19:23.417 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-11-30 19:42:51.988 WARN 1 --- [oundedElastic-4] o.s.b.a.jdbc.DataSourceHealthIndicator : DataSource health check failed
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: HikariPool-1 - Interrupted during connection acquisition
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) ~[spring-jdbc-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:324) ~[spring-jdbc-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.getProduct(DataSourceHealthIndicator.java:122) ~[spring-boot-actuator-2.2.9.RELEASE.jar!/:2.2.9.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.doDataSourceHealthCheck(DataSourceHealthIndicator.java:107) ~[spring-boot-actuator-2.2.9.RELEASE.jar!/:2.2.9.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.doHealthCheck(DataSourceHealthIndicator.java:102) ~[spring-boot-actuator-2.2.9.RELEASE.jar!/:2.2.9.RELEASE]
at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.2.9.RELEASE.jar!/:2.2.9.RELEASE]
at reactor.core.publisher.MonoCallable.call(MonoCallable.java:91) ~[reactor-core-3.3.8.RELEASE.jar!/:3.3.8.RELEASE]
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225) ~[reactor-core-3.3.8.RELEASE.jar!/:3.3.8.RELEASE]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.3.8.RELEASE.jar!/:3.3.8.RELEASE]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.3.8.RELEASE.jar!/:3.3.8.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_262]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_262]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_262]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_262]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_262]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_262]
Caused by: java.sql.SQLException: HikariPool-1 - Interrupted during connection acquisition
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:201) ~[HikariCP-3.4.5.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162) ~[HikariCP-3.4.5.jar!/:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) ~[HikariCP-3.4.5.jar!/:na]
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158) ~[spring-jdbc-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116) ~[spring-jdbc-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) ~[spring-jdbc-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
... 15 common frames omitted
Caused by: java.lang.InterruptedException: null
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:944) ~[na:1.8.0_262]
at com.zaxxer.hikari.util.ConcurrentBag.borrow(ConcurrentBag.java:151) ~[HikariCP-3.4.5.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:180) ~[HikariCP-3.4.5.jar!/:na]
... 20 common frames omitted
2020-11-30 19:42:59.266 WARN 1 --- [oundedElastic-1] o.s.b.a.jdbc.DataSourceHealthIndicator : DataSource health check failed

Spring controllers aren't response to https

I run maven spring boot application with mvn spring-boot:run.
I declared https configuration with application.properties as follow:
server.port = 8443
server.ssl.key-store = keystore.jks
server.ssl.key-store-password = 123456
server.ssl.key-password = 123456
The spring started on right port with follow output:
2018-04-10 10:49:42.074 INFO 6794 --- [ main] ru.ias.Main : Starting Main on IAS-WS-UX02 with PID 6794 (/home/opshenichnikova/NetBeansProjects/bot-integrity/target/classes started by opshenichnikova in /home/opshenichnikova/NetBeansProjects/bot-integrity)
2018-04-10 10:49:42.077 INFO 6794 --- [ main] ru.ias.Main : No active profile set, falling back to default profiles: default
2018-04-10 10:49:42.147 INFO 6794 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#41d792be: startup date [Tue Apr 10 10:49:42 MSK 2018]; root of context hierarchy
2018-04-10 10:49:42.834 INFO 6794 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-04-10 10:49:43.044 INFO 6794 --- [ main] org.eclipse.jetty.util.log : Logging initialized #3904ms to org.eclipse.jetty.util.log.Slf4jLog
2018-04-10 10:49:43.110 INFO 6794 --- [ main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8445
2018-04-10 10:49:43.120 INFO 6794 --- [ main] org.eclipse.jetty.server.Server : jetty-9.4.8.v20171121, build timestamp: 2017-11-22T00:27:37+03:00, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
2018-04-10 10:49:43.318 INFO 6794 --- [ main] org.eclipse.jetty.server.session : DefaultSessionIdManager workerName=node0
2018-04-10 10:49:43.318 INFO 6794 --- [ main] org.eclipse.jetty.server.session : No SessionScavenger set, using defaults
2018-04-10 10:49:43.339 INFO 6794 --- [ main] org.eclipse.jetty.server.session : Scavenging every 660000ms
2018-04-10 10:49:43.355 INFO 6794 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring embedded WebApplicationContext
2018-04-10 10:49:43.356 INFO 6794 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1211 ms
2018-04-10 10:49:43.475 INFO 6794 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-04-10 10:49:43.477 INFO 6794 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-10 10:49:43.477 INFO 6794 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-10 10:49:43.477 INFO 6794 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-10 10:49:43.478 INFO 6794 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-10 10:49:43.480 INFO 6794 --- [ main] o.e.jetty.server.handler.ContextHandler : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext#3f0831d8{/,[file:///tmp/jetty-docbase.8895474277820779181.8445/],AVAILABLE}
2018-04-10 10:49:43.481 INFO 6794 --- [ main] org.eclipse.jetty.server.Server : Started #4342ms
2018-04-10 10:49:43.720 INFO 6794 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#41d792be: startup date [Tue Apr 10 10:49:42 MSK 2018]; root of context hierarchy
2018-04-10 10:49:43.788 INFO 6794 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/account/list],methods=[GET]}" onto public java.util.List<ru.ias.orm.Account> ru.ias.controllers.admin.AdminController.getAccounts()
2018-04-10 10:49:43.790 INFO 6794 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/invoices],methods=[GET]}" onto public java.util.List<ru.ias.orm.Invoice> ru.ias.controllers.admin.InvoiceController.getInvoices(javax.servlet.http.HttpServletResponse)
2018-04-10 10:49:43.794 INFO 6794 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-04-10 10:49:43.794 INFO 6794 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-04-10 10:49:43.829 INFO 6794 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-10 10:49:43.830 INFO 6794 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-10 10:49:43.871 INFO 6794 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-10 10:49:44.049 INFO 6794 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-04-10 10:49:44.066 INFO 6794 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-04-10 10:49:44.066 INFO 6794 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2018-04-10 10:49:44.076 INFO 6794 --- [ main] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 10 ms
2018-04-10 10:49:44.432 INFO 6794 --- [ main] o.e.jetty.util.ssl.SslContextFactory : x509=X509#22dbd246(jetty,h=[tbot-test.ias.su],w=[]) for SslContextFactory#2cfff4aa[provider=null,keyStore=file:///home/opshenichnikova/NetBeansProjects/bot-integrity/keystore.jks,trustStore=null]
2018-04-10 10:49:44.507 INFO 6794 --- [ main] o.e.jetty.server.AbstractConnector : Started ServerConnector#139688ed{SSL,[ssl, http/1.1]}{0.0.0.0:8445}
2018-04-10 10:49:44.509 INFO 6794 --- [ main] o.s.b.web.embedded.jetty.JettyWebServer : Jetty started on port(s) 8445 (ssl, http/1.1) with context path '/'
2018-04-10 10:49:44.512 INFO 6794 --- [ main] ru.ias.Main : Started Main in 2.726 seconds (JVM running for 5.372)
^C2018-04-10 10:52:08.108 INFO 6794 --- [ Thread-11] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#41d792be: startup date [Tue Apr 10 10:49:42 MSK 2018]; root of context hierarchy
2018-04-10 10:52:08.109 INFO 6794 --- [ Thread-11] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-04-10 10:52:08.116 INFO 6794 --- [ Thread-11] o.e.jetty.server.AbstractConnector : Stopped ServerConnector#139688ed{SSL,[ssl, http/1.1]}{0.0.0.0:8445}
2018-04-10 10:52:08.119 INFO 6794 --- [ Thread-11] org.eclipse.jetty.server.session : Stopped scavenging
2018-04-10 10:52:08.121 INFO 6794 --- [ Thread-11] o.e.j.s.h.ContextHandler.application : Destroying Spring FrameworkServlet 'dispatcherServlet'
2018-04-10 10:52:08.122 INFO 6794 --- [ Thread-11] o.e.jetty.server.handler.ContextHandler : Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext#3f0831d8{/,[file:///tmp/jetty-docbase.8895474277820779181.8445/],UNAVAILABLE}
I try to access /admin/account/list path declared in controller:
package ru.ias.controllers.admin;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Session;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import ru.ias.orm.Account;
import ru.ias.config.HibernateUtil;
/**
*
* #author opshenichnikova
*/
#RestController
public class AdminController
{
#GetMapping("/admin/account/list")
#CrossOrigin(origins = "*")
public List<Account> getAccounts()
{
Session session = HibernateUtil
.getInstance()
.getSessionFactory()
.openSession();
session.beginTransaction();
Account account = new Account();
account.setFirstName("Olga");
account.setLastName("Pshenichnikova");
session.save(account);
session.getTransaction().commit();
List<Account> accounts = new ArrayList<>();
accounts.add(account);
return accounts;
}
}
The Main class declared as follow:
package ru.ias;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
#SpringBootApplication
public class Main extends SpringBootServletInitializer
{
#Override
protected SpringApplicationBuilder configure(
SpringApplicationBuilder application
) {
return application.sources(Main.class);
}
public static void main(String[] args)
{
SpringApplication.run(Main.class, args);
}
}
Unfortunately I get follow response:
You are accessing the page via http, not https. Change the URL in your browser to https://localhost:8443/admin/account/list

How to access h2-console with a Netbeans Spring-Boot project

I'm using spring boot 1.5.4, i'm following a tutorial where it shows that just by adding h2-console to the localhost:8080/ url you can access the console. But when i do that i have a 404 Whitelabel error.
These are the dependencies
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--WebJars-->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.5</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.2.1</version>
</dependency>
<!--jpa and database-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
And this is the spring boot console log
2017-07-19 01:35:25.222 INFO 8644 --- [ main] c.e.s.SpringBootTest00Application : Starting SpringBootTest00Application on DESKTOP-K8Q0B2R with PID 8644 (started by Talon in C:\Users\Talon\Desktop\java netbeans\01\springBootTest00)
2017-07-19 01:35:25.225 INFO 8644 --- [ main] c.e.s.SpringBootTest00Application : No active profile set, falling back to default profiles: default
2017-07-19 01:35:25.544 INFO 8644 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#37574691: startup date [Wed Jul 19 01:35:25 CEST 2017]; root of context hierarchy
2017-07-19 01:35:27.236 INFO 8644 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-07-19 01:35:27.248 INFO 8644 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-07-19 01:35:27.249 INFO 8644 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.15
2017-07-19 01:35:27.378 INFO 8644 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-07-19 01:35:27.378 INFO 8644 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1838 ms
2017-07-19 01:35:27.578 INFO 8644 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-07-19 01:35:27.582 INFO 8644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-07-19 01:35:27.584 INFO 8644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-07-19 01:35:27.584 INFO 8644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-07-19 01:35:27.584 INFO 8644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-07-19 01:35:28.020 INFO 8644 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2017-07-19 01:35:28.037 INFO 8644 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2017-07-19 01:35:28.122 INFO 8644 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.12.Final}
2017-07-19 01:35:28.123 INFO 8644 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2017-07-19 01:35:28.180 INFO 8644 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2017-07-19 01:35:28.219 INFO 8644 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2017-07-19 01:35:28.321 INFO 8644 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2017-07-19 01:35:28.742 INFO 8644 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
2017-07-19 01:35:28.757 INFO 8644 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
2017-07-19 01:35:28.809 INFO 8644 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2017-07-19 01:35:29.119 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#37574691: startup date [Wed Jul 19 01:35:25 CEST 2017]; root of context hierarchy
2017-07-19 01:35:29.203 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.example.springBootTest00.controllers.IndexController.index()
2017-07-19 01:35:29.205 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product],methods=[POST]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.saveOrUpdateProduct(com.example.springBootTest00.domain.Product)
2017-07-19 01:35:29.206 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product/edit/{id}]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.edit(java.lang.Integer,org.springframework.ui.Model)
2017-07-19 01:35:29.206 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product/new]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.newProduct(org.springframework.ui.Model)
2017-07-19 01:35:29.206 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product/delete/{id}]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.deleteProduct(java.lang.Integer,org.springframework.ui.Model)
2017-07-19 01:35:29.206 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/products]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.listProducts(org.springframework.ui.Model)
2017-07-19 01:35:29.206 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product/{id}]}" onto public java.lang.String com.example.springBootTest00.controllers.ProductController.getProduct(java.lang.Integer,org.springframework.ui.Model)
2017-07-19 01:35:29.209 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-07-19 01:35:29.209 INFO 8644 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-07-19 01:35:29.243 INFO 8644 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-19 01:35:29.244 INFO 8644 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-19 01:35:29.284 INFO 8644 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-19 01:35:29.920 INFO 8644 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-07-19 01:35:29.983 INFO 8644 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-07-19 01:35:29.987 INFO 8644 --- [ main] c.e.s.SpringBootTest00Application : Started SpringBootTest00Application in 5.052 seconds (JVM running for 5.401)
I have some classes with #Service / #Controller working properly and all the requests are mapped to url strings other than h2-console. Should i import something else in the pom or configure something in application.properties ?
Writing in simple Steps:
In Application.properties file include
spring.h2.console.path=/h2
spring.h2.console.enabled=true
And in pom.xml Include devtools dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
re-package and open http://localhost:[port]/h2 you are all set
other properties you have to include is
spring.datasource.url=jdbc:h2:file:~/h2db
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
the file h2db will store in userprofile folder of windows
for example : C:\Users\[profile]

Categories

Resources