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
Related
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
I'm trying to write a simple API application to read data from HBase on an AWS EMR cluster. But I get an SocketTimeoutException when I try to send the request.
However, in the console log you can see, connection to the master node is established and a zookeeper session is also created.
2022-05-13 22:16:00.106 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=10-41-54-222:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher#697477df
2022-05-13 22:16:00.129 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 10-41-54-222/10-41-54-222:2181. Will not attempt to authenticate using SASL (unknown error)
2022-05-13 22:16:00.422 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Socket connection established to 10-41-54-222/10-41-54-222:2181, initiating session
2022-05-13 22:16:00.717 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server 10-41-54-222/10-41-54-222:2181, sessionid = 0x1000006e6da0664, negotiated timeout = 40000
Connection bean:
#Bean
public Connection Connection() throws IOException {
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", "10-41-54-222");
conf.set("hbase.zookeeper.property.clientPort", "2181");
conf.set("hbase.master", "10-41-54-222:16000");
conf.set("zookeeper.znode.parent", "/hbase");
conf.set("hbase.zookeeper.property.dataDir", "s3://asp-emr-dev/hbase_new_2");
return ConnectionFactory.createConnection(conf);
}
Console output:
2022-05-13 22:15:53.751 INFO 24480 --- [ restartedMain] com.example.demo.DemoApplication : Starting DemoApplication using Java 1.8.0-262 on ZSRIL-FD5K2B3 with PID 24480 (D:\My Projects\SpringBoot-HBase-Demo\target\classes started by pkulasoori in D:\My Projects\SpringBoot-HBase-Demo)
2022-05-13 22:15:53.754 INFO 24480 --- [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2022-05-13 22:15:53.934 INFO 24480 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\pkulasoori\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar referenced one or more files that do not exist: file:/C:/Users/pkulasoori/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-api.jar,file:/C:/Users/pkulasoori/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/activation.jar,file:/C:/Users/pkulasoori/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jsr173_1.0_api.jar,file:/C:/Users/pkulasoori/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb1-impl.jar
2022-05-13 22:15:53.935 INFO 24480 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-05-13 22:15:53.935 INFO 24480 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-05-13 22:15:58.183 INFO 24480 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-05-13 22:15:58.195 INFO 24480 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-05-13 22:15:58.195 INFO 24480 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.58]
2022-05-13 22:15:58.320 INFO 24480 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-05-13 22:15:58.320 INFO 24480 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4384 ms
2022-05-13 22:15:58.686 WARN 24480 --- [ restartedMain] org.apache.hadoop.util.NativeCodeLoader : Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2022-05-13 22:16:00.097 INFO 24480 --- [ restartedMain] o.a.h.h.zookeeper.RecoverableZooKeeper : Process identifier=hconnection-0x639d0ae connecting to ZooKeeper ensemble=10-41-54-222:2181
2022-05-13 22:16:00.103 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2022-05-13 22:16:00.103 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:host.name=host.docker.internal
2022-05-13 22:16:00.103 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:java.version=1.8.0-262
2022-05-13 22:16:00.103 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:java.vendor=OpenLogic-OpenJDK
2022-05-13 22:16:00.104 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:java.home=C:\Program Files\OpenJDK\jdk-8.0.262.10-hotspot\jre
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=C:\Users\PKULAS~1\AppData\Local\Temp\
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:java.compiler=<NA>
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:os.name=Windows 10
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:os.version=10.0
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:user.name=pkulasoori
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:user.home=C:\Users\pkulasoori
2022-05-13 22:16:00.105 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Client environment:user.dir=D:\My Projects\SpringBoot-HBase-Demo
2022-05-13 22:16:00.106 INFO 24480 --- [ restartedMain] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=10-41-54-222:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher#697477df
2022-05-13 22:16:00.129 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 10-41-54-222/10-41-54-222:2181. Will not attempt to authenticate using SASL (unknown error)
2022-05-13 22:16:00.422 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Socket connection established to 10-41-54-222/10-41-54-222:2181, initiating session
2022-05-13 22:16:00.717 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server 10-41-54-222/10-41-54-222:2181, sessionid = 0x1000006e6da0664, negotiated timeout = 40000
2022-05-13 22:16:02.733 INFO 24480 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-05-13 22:16:02.775 INFO 24480 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-05-13 22:16:02.785 INFO 24480 --- [ restartedMain] com.example.demo.DemoApplication : Started DemoApplication in 9.855 seconds (JVM running for 11.511)
2022-05-13 22:17:34.275 INFO 24480 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-05-13 22:17:34.275 INFO 24480 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-05-13 22:17:34.277 INFO 24480 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms
2022-05-13 22:17:34.343 INFO 24480 --- [nio-8080-exec-2] o.a.h.h.zookeeper.RecoverableZooKeeper : Process identifier=hconnection-0x68538d5e connecting to ZooKeeper ensemble=10-41-54-222:2181
2022-05-13 22:17:34.343 INFO 24480 --- [nio-8080-exec-2] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=10-41-54-222:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher#15cabe52
2022-05-13 22:17:34.355 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 10-41-54-222/10-41-54-222:2181. Will not attempt to authenticate using SASL (unknown error)
2022-05-13 22:17:34.648 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Socket connection established to 10-41-54-222/10-41-54-222:2181, initiating session
2022-05-13 22:17:34.941 INFO 24480 --- [49.71.222:2181)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server 10-41-54-222/10-41-54-222:2181, sessionid = 0x1000006e6da0665, negotiated timeout = 40000
2022-05-13 22:18:21.916 INFO 24480 --- [hared--pool2-t1] o.a.h.hbase.client.RpcRetryingCaller : Call exception, tries=10, retries=35, started=45692 ms ago, cancelled=false, msg=ip-10-41-54-158.ec2.internal row 'emp,,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=ip-10-41-54-158.ec2.internal,16020,1652454036400, seqNum=0
2022-05-13 22:18:32.812 INFO 24480 --- [hared--pool2-t1] o.a.h.hbase.client.RpcRetryingCaller : Call exception, tries=11, retries=35, started=56595 ms ago, cancelled=false, msg=ip-10-41-54-158.ec2.internal row 'emp,,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=ip-10-41-54-158.ec2.internal,16020,1652454036400, seqNum=0
java.net.SocketTimeoutException: callTimeout=60000, callDuration=70146: Call to address=ip-10-49-71-157.ec2.internal/10.49.71.157:16020 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=7,methodName=Scan], waitTime=843ms, rpcTimeout=788ms row 'emp,,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=ip-10-49-71-157.ec2.internal,16020,1652454036400, seqNum=-1
at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:160)
at org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to address=ip-10-49-71-157.ec2.internal/10.49.71.157:16020 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=7,methodName=Scan], waitTime=843ms, rpcTimeout=788ms
at org.apache.hadoop.hbase.ipc.IPCUtil.wrapException(IPCUtil.java:217)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:383)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$100(AbstractRpcClient.java:89)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:414)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:410)
at org.apache.hadoop.hbase.ipc.Call.setTimeout(Call.java:111)
at org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:136)
at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:669)
at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:744)
at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:469)
... 1 more
Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=7,methodName=Scan], waitTime=843ms, rpcTimeout=788ms
at org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:137)
... 4 more
would appreciate some help here, Thanks
I am trying to build my docker image for my spring boot application but keep encountering this error:
:: Spring Boot :: (v2.2.5.RELEASE)
2020-05-31 02:18:39.820 INFO 63 --- [ main] c.g.Apollo.ApolloApplicationTests : Starting ApolloApplicationTests on 4b284b60945e with PID 63 (started by root in /build)
2020-05-31 02:18:39.838 INFO 63 --- [ main] c.g.Apollo.ApolloApplicationTests : No active profile set, falling back to default profiles: default
2020-05-31 02:18:42.208 INFO 63 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-05-31 02:18:42.467 INFO 63 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 216ms. Found 3 JPA repository interfaces.
2020-05-31 02:18:44.902 INFO 63 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-05-31 02:18:46.575 ERROR 63 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:554) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.2.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-3.4.2.jar:na]
Terminal when successfully running in intellij:
:: Spring Boot :: (v2.2.5.RELEASE)
2020-05-31 01:04:39.322 INFO 19524 --- [ restartedMain] c.g.Apollo.ApolloApplication : Starting ApolloApplication on asd-PC with PID 19524 (C:\Projects\Apollo\target\classes started by asd in C:\Projects\Apollo)
2020-05-31 01:04:39.324 INFO 19524 --- [ restartedMain] c.g.Apollo.ApolloApplication : No active profile set, falling back to default profiles: default
2020-05-31 01:04:39.354 INFO 19524 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\asd\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.2\jaxb-runtime-2.3.2.jar referenced one or more files that do not exist: file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jakarta.xml.bind-api-2.3.2.jar,file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/txw2-2.3.2.jar,file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/istack-commons-runtime-3.0.8.jar,file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/stax-ex-1.8.1.jar,file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/FastInfoset-1.2.16.jar,file:/C:/Users/asd/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jakarta.activation-api-1.2.1.jar
2020-05-31 01:04:39.354 INFO 19524 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-05-31 01:04:39.354 INFO 19524 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-05-31 01:04:39.785 INFO 19524 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-05-31 01:04:39.846 INFO 19524 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 54ms. Found 3 JPA repository interfaces.
2020-05-31 01:04:40.214 INFO 19524 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-05-31 01:04:40.220 INFO 19524 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-31 01:04:40.221 INFO 19524 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-05-31 01:04:40.293 INFO 19524 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-31 01:04:40.293 INFO 19524 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 939 ms
2020-05-31 01:04:40.365 INFO 19524 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-05-31 01:04:40.702 INFO 19524 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-05-31 01:04:40.731 INFO 19524 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-05-31 01:04:40.800 INFO 19524 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.12.Final
2020-05-31 01:04:40.919 INFO 19524 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-05-31 01:04:41.006 INFO 19524 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2020-05-31 01:04:41.407 INFO 19524 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-05-31 01:04:41.413 INFO 19524 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-05-31 01:04:41.650 WARN 19524 --- [ 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
2020-05-31 01:04:41.717 INFO 19524 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-31 01:04:41.967 INFO 19524 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2020-05-31 01:04:41.995 INFO 19524 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-05-31 01:04:41.997 INFO 19524 --- [ restartedMain] c.g.Apollo.ApolloApplication : Started ApolloApplication in 2.911 seconds (JVM running for 3.899)
My Dockerfile:
FROM maven:3.6.3-jdk-11-slim AS MAVEN_BUILD
COPY pom.xml /build/
COPY src /build/src/
WORKDIR /build/
RUN mvn package
FROM openjdk:11-jre-alpine
WORKDIR /app
COPY --from=MAVEN_BUILD /build/target/*.war /app/app.war
ENTRYPOINT ["java", "-jar", "app.war"]
My application.properties:
## GraphQL SPQR ##
server.port=8080
graphql.spqr.gui.enabled=true
graphql.spqr.http.endpoint=/graphql
graphql.spqr.ws.endpoint=/graphql
## Database Properties ##
spring.datasource.url=jdbc:mysql://localhost:3306/innodb
spring.datasource.username=root
spring.datasource.password=1234
My application works when I build and run the project in Intellij but not when I try and build my docker image. I am using MySQL and have just been connecting on localhost on port 3306.
The error message seems to indicate the issue is failing to connect to the database. From your settings, it appears that you are trying to connect to the DB using localhost:3306. That will not work when you are running the application in a container because docker creates its own network which is separate from you machine’s network. So, localhost in the container does not refer to your machine.
You need to instead setup a docker network that will allow your container to access the database in a specific IP address.
Here is an article with the specifics:
https://nickjanetakis.com/blog/docker-tip-35-connect-to-a-database-running-on-your-docker-host
Note that I have assumed from your post, that the DB is installed in your host machine. If it is not and the DB is running in its own container, the you need to create a docker network and attach both containers to that network.
I had the same issue and resolved it by changing localhost to the service name on which MySQL was running.
Below is my docker-compose and application.properties files
docker-compose.yml
version: '3.8'
services:
app:
container_name: tvms
build:
context: .
dockerfile: Dockerfile
tty: true
volumes:
- ../..:/workspaces:cached
ports:
- 8990:8990
networks:
- impaq
links:
- db:db
db:
image: percona:8.0
privileged: true
restart: always
container_name: standalone-mysql
environment:
MYSQL_ROOT_PASSWORD: ****
volumes:
- perconadata:/var/lib/mysql
ports:
- 3306:3306
networks:
- impaq
networks:
impaq:
volumes:
perconadata:
application.propeties
#datasource
spring.datasource.url=jdbc:mysql://db:3306/db_name
spring.datasource.username=root
spring.datasource.password=*****
For me below solution worked
change your datasource url from
This:
spring.datasource.url=jdbc:mysql://localhost:3306/innodb
To:
spring.datasource.url=jdbc:mysql://localhost:3306/innodb?useSSL=false
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?
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