Does Testcontainers/LocalStack work with DynamoDb Streams KCL 1.x? - testcontainers

Problem Statement
I have written a program which utilizes DynamoDb Streams to get notified when an update occurs, this code works fine when using AWS Services but doesn't seem to work utilizing Testcontainers/Localstack for my integration tests.
What has been done
Tried reverting to older version of testcontainer/localstack
Read this article, which has a comment at the end which sort of implies that KCL 1.x lacks some API's which prevent it from working with Localstack
However, Kinesis Client Library-1.x has not provided the capability of giving AWS CloudWatch service endpoint URL as a configuration parameter.
I believe the DynamoDb Kinesis adapter uses KCL 1.x internally, so, I don't think I can switch to use KCL 2.x. As an aside, it seems the DynamoDb Kinesis Adapter has been archived, but Amazon Docs still refer to it and there is nothing in that git repo that indicates why it was archived or what to use instead.
What Happens?
My program runs fine, I don't see any errors but I also don't get any update information from any shards.
App Design
Basically the integrations tests start, it creates the required tables in LocalStack (confirmed this is done via AWS CLI), it then places 3 items in the DynamoDb. The Spring Boot Application starts up and reads the data from DynamoDb into a a list. The Integration test then calls the delete endpoint, the delete endpoint simply calls the CrudRepository.delete function (implemented via Spring Data DynamoDb). I have confirmed that the actual DynamoDb has gone from 3 elements to 2, with the deleted element removed. The applications cache should get updated when my app gets the updated records from KCL, however; this never happens with TreatContainers/localStack.
The application is using InitialPositionInStream.LATEST for reading the shards.
Application Output
You can see the application starts up and is ready at 13:42:17.468, the item is "deleted" at 13:42:24.768. The test then calls Thread.sleep(1000) to give KCL time to process any changes and then at 13:42:25.793 the test calls the server to see if the element is still present in the cache, which it is.
Thinking this might be a timing issue, where LocalStack was processing slowly, I added a #AfterAll function to my tests which waits for 2 minutes. I utilized curl to call the get endpoint at 13:44:38.723 and the element still exists, which should have been plenty of time for Localstack to process the updates for the shards.
2021-04-05 13:42:07.712 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : KCL shard lease table, test-table, exists and is ACTIVE
2021-04-05 13:42:07.770 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : KCL shard lease table, kcl-shard-lease-lock, exists and is ACTIVE
2021-04-05 13:42:07.772 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : Describing table=test-table
2021-04-05 13:42:07.821 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : Got description for table=test-table
2021-04-05 13:42:07.822 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : Got stream arn (arn:aws:dynamodb:us-east-1:000000000000:table/test-table/stream/2021-04-05T17:41:21.860) for table=test-table with tableArn=arn:aws:dynamodb:us-east-1:000000000000:table/test-table
2021-04-05 13:42:07.904 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : Creating KCL worker
2021-04-05 13:42:07.938 INFO 11414 --- [ Test worker] c.a.s.k.leases.impl.LeaseCoordinator : With failover time 10000 ms and epsilon 25 ms, LeaseCoordinator will renew leases every 3308 ms, takeleases every 20050 ms, process maximum of 2147483647 leases and steal 1 lease(s) at a time.
2021-04-05 13:42:07.941 INFO 11414 --- [ Test worker] c.a.s.k.clientlibrary.lib.worker.Worker : Shard sync strategy determined as SHARD_END.
2021-04-05 13:42:07.941 INFO 11414 --- [ Test worker] c.c.u.d.s.processor.MyKclProcessor : KCL Worker created!
2021-04-05 13:42:07.944 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Initialization attempt 1
2021-04-05 13:42:07.945 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Initializing LeaseCoordinator
2021-04-05 13:42:14.525 INFO 11414 --- [ Test worker] c.c.u.d.s.controller.TestItemController : *** TestItemController Started ***
2021-04-05 13:42:14.650 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Syncing Kinesis shard info
2021-04-05 13:42:14.656 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : syncShardLeases: begin
2021-04-05 13:42:14.656 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : getShardList: begin
2021-04-05 13:42:14.757 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : getShardList: done
2021-04-05 13:42:14.779 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : determineNewLeasesToCreate: begin
2021-04-05 13:42:14.781 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : determineNewLeasesToCreate: done
2021-04-05 13:42:14.863 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : cleanupGarbageLeases: begin
2021-04-05 13:42:14.863 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : cleanupGarbageLeases: done
2021-04-05 13:42:14.863 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : cleanupLeasesOfFinishedShards: begin
2021-04-05 13:42:14.863 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : cleanupLeasesOfFinishedShards: done
2021-04-05 13:42:14.863 INFO 11414 --- [cessingThread-0] c.a.s.d.s.DynamoDBStreamsShardSyncer : syncShardLeases: done
2021-04-05 13:42:14.866 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Starting LeaseCoordinator
2021-04-05 13:42:14.900 INFO 11414 --- [cessingThread-0] c.a.s.kinesis.leases.impl.LeaseRenewer : Worker Test-application-lMtQuWkZeFmq+ found lease {
"leaseKey" : "shardId-00000001617600000000-000000000000",
"leaseOwner" : "Test-application-lMtQuWkZeFmq+",
"leaseCounter" : 0,
"concurrencyToken" : null,
"lastCounterIncrementNanos" : null,
"checkpoint" : {
"sequenceNumber" : "LATEST",
"subSequenceNumber" : 0
},
"pendingCheckpoint" : null,
"ownerSwitchesSinceCheckpoint" : 0,
"parentShardIds" : [ ]
}
2021-04-05 13:42:14.949 WARN 11414 --- [cessingThread-0] c.a.s.k.metrics.impl.MetricsHelper : No metrics scope set in thread KCLProcessingThread-0, getMetricsScope returning NullMetricsScope.
2021-04-05 13:42:15.011 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:42:15.011 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:42:16.709 INFO 11414 --- [ Test worker] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-04-05 13:42:17.309 INFO 11414 --- [ Test worker] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2021-04-05 13:42:17.451 INFO 11414 --- [ Test worker] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 50376 (http) with context path ''
2021-04-05 13:42:17.464 INFO 11414 --- [ Test worker] d.d.r.u.Entity2DynamoDBTableSynchronizer : Checking repository classes with DynamoDB tables test-table for ContextRefreshedEvent
2021-04-05 13:42:17.468 INFO 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : Started DynamoDbStreamsTestApp in 54.763 seconds (JVM running for 77.176)
2021-04-05 13:42:17.872 INFO 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : *** ASK SERVER TO DELETE ITEM 23456 ***
2021-04-05 13:42:17.996 INFO 11414 --- [o-auto-1-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-04-05 13:42:17.996 INFO 11414 --- [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-04-05 13:42:18.019 INFO 11414 --- [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 23 ms
2021-04-05 13:42:18.068 INFO 11414 --- [o-auto-1-exec-1] c.c.u.d.s.controller.TestItemController : Deleting itemNumber=23456
2021-04-05 13:42:21.670 INFO 11414 --- [o-auto-1-exec-1] c.c.u.d.s.controller.TestItemController : Found inventory item to delete
2021-04-05 13:42:24.768 INFO 11414 --- [o-auto-1-exec-1] c.c.u.d.s.controller.TestItemController : Item deleted
2021-04-05 13:42:24.789 INFO 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : *** SERVER SAYS ITEM 23456 DELETED ***
2021-04-05 13:42:24.954 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Initialization complete. Starting worker loop.
2021-04-05 13:42:24.970 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Created new shardConsumer for : ShardInfo [shardId=shardId-00000001617600000000-000000000000, concurrencyToken=b773dd9e-d385-44cd-8189-3cf330b94351, parentShardIds=[], checkpoint={SequenceNumber: LATEST,SubsequenceNumber: 0}]
2021-04-05 13:42:24.972 INFO 11414 --- [dProcessor-0000] c.a.s.k.c.l.w.BlockOnParentShardTask : No need to block on parents [] of shard shardId-00000001617600000000-000000000000
2021-04-05 13:42:25.793 INFO 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : *** VERIFY ITEM 23456 WAS DELETED OR NOT ***
2021-04-05 13:42:31.304 INFO 11414 --- [o-auto-1-exec-2] c.c.u.d.s.controller.TestItemController : Getting itemNumber=23456
2021-04-05 13:42:34.586 INFO 11414 --- [o-auto-1-exec-2] c.c.u.d.s.controller.TestItemController : Item=TestItem{itemNumber='23456', description='A doo', price=10.99}
2021-04-05 13:42:34.589 INFO 11414 --- [dProcessor-0000] c.a.s.k.c.lib.worker.KinesisDataFetcher : Initializing shard shardId-00000001617600000000-000000000000 with LATEST
2021-04-05 13:42:34.611 ERROR 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : *** SERVER STILL HAS ITEM 23456 ***
2021-04-05 13:42:34.663 WARN 11414 --- [ Test worker] c.c.u.dynamodb.DynamoDbStreamsTestApp : Giving system 2 MINUTES before shut down
2021-04-05 13:42:35.088 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:42:35.088 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:42:55.171 INFO 11414 --- [oordinator-0001] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:42:55.171 INFO 11414 --- [oordinator-0001] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:43:08.731 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Current stream shard assignments: shardId-00000001617600000000-000000000000
2021-04-05 13:43:08.732 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Sleeping ...
2021-04-05 13:43:15.248 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:43:15.248 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:43:35.322 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:43:35.323 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:43:55.399 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:43:55.399 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:44:09.937 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Current stream shard assignments: shardId-00000001617600000000-000000000000
2021-04-05 13:44:09.937 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Sleeping ...
2021-04-05 13:44:15.470 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:44:15.470 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:44:35.550 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : Worker Test-application-lMtQuWkZeFmq+ saw 1 total leases, 0 expired leases, 1 workers.Unfinished lease target: 1 leases, I have 1 unfinished leases. Finished leases target is 1 and I have 0 finished leases. I will take 0 leases in total.
2021-04-05 13:44:35.551 INFO 11414 --- [oordinator-0000] c.a.s.d.s.leases.StreamsLeaseTaker : TakeLeases took 0 seconds.
2021-04-05 13:44:38.723 INFO 11414 --- [o-auto-1-exec-5] c.c.u.d.s.controller.TestItemController : Getting itemNumber=23456
2021-04-05 13:44:41.374 INFO 11414 --- [o-auto-1-exec-5] c.c.u.d.s.controller.TestItemController : Item=TestItem{itemNumber='23456', description='A doo', price=10.99}
Config Info
dynamodb-streams-kinesis-adapter: 1.5.2
amazon-kinesis-client: 1.13.3
junit-jupiter-api: 5.6.0
junit-jupiter: 1.15.2
localstack: 1.15.2
localstack: 0.12.9
localstack-utils: 0.2.10
aws-java-sdk-dynamodb: 1.11.858
spring-boot-starter-web: 2.3.3.RELEASE
spring data dynamodb (from boostchicken fork): 5.2.5
MacOS Catalina: 10.15.7
Java: 15.0.2
Docker:
Client: Docker Engine - Community
Cloud integration: 1.0.9
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:13:00 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:15:47 2021
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Kubernetes:
Version: Unknown
StackAPI: Unknown

Solution
After many hours of playing with this I finally noticed this message
2021-04-05 13:42:24.954 INFO 11414 --- [cessingThread-0] c.a.s.k.clientlibrary.lib.worker.Worker : Initialization complete. Starting worker loop.
After looking at this a while it became obvious that when using Testcontainer/Localstack it takes 10 seconds for the worker to become initialized and "ready". This was easy enough to solve as the com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker has a state change listener, so I could setup a listener to determine when Localstack was ready and then allow the code to continue.
Final Issues
Sadly this did not resolve the problem completely, turns out that the DynamoDb streams implementation in Testcontainer/Localstack is extremely slow. By that I mean would create/delete or modify a record it it was taking upwards of 7 seconds for the shard processor to get the updates. So here I ended up putting a 10 second sleep between the time that I deleted the item and before I checked to verify the item was actually removed.
Conclusion
So this turned out to be a timing issue, Testconatiners/Localstack is just very slow pushing the data to the shards (at least compared to the same exact code run against DynamoDb and DynamoDb Streams).

Related

Why is Spring cloud data flow tutorial not showing expected result

I'm trying to complete the first spring cloud dataflow tutorial and I'm not getting the result in the tutorial.
https://dataflow.spring.io/docs/stream-developer-guides/streams/
The tutorial has me use curl to a http source and see the result in the log sink with a tail of a file of stdout.
I do not see the result. I see the startup in the log.
I tail the log
docker exec -it skipper tail -f /path/from/stdout/textbox/in/dashboard
I enter
curl http://localhost:20100 -H "Content-type: text/plain" -d "Happy streaming"
all I see is
2020-10-05 16:30:03.315 INFO 110 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka version : 2.0.1
2020-10-05 16:30:03.316 INFO 110 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka commitId : fa14705e51bd2ce5
2020-10-05 16:30:03.322 INFO 110 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2020-10-05 16:30:03.338 INFO 110 --- [ main] s.i.k.i.KafkaMessageDrivenChannelAdapter : started org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter#106faf11
2020-10-05 16:30:03.364 INFO 110 --- [container-0-C-1] org.apache.kafka.clients.Metadata : Cluster ID: 2J0QTxzQQmm2bLxFKgRwmA
2020-10-05 16:30:03.574 INFO 110 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 20041 (http) with context path ''
2020-10-05 16:30:03.584 INFO 110 --- [ main] o.s.c.s.a.l.s.k.LogSinkKafkaApplication : Started LogSinkKafkaApplication in 38.086 seconds (JVM running for 40.251)
2020-10-05 16:30:05.852 INFO 110 --- [container-0-C-1] o.a.k.c.c.internals.AbstractCoordinator : [Consumer clientId=consumer-3, groupId=http-ingest] Discovered group coordinator kafka-broker:9092 (id: 2147482646 rack: null)
2020-10-05 16:30:05.857 INFO 110 --- [container-0-C-1] o.a.k.c.c.internals.ConsumerCoordinator : [Consumer clientId=consumer-3, groupId=http-ingest] Revoking previously assigned partitions []
2020-10-05 16:30:05.858 INFO 110 --- [container-0-C-1] o.s.c.s.b.k.KafkaMessageChannelBinder$1 : partitions revoked: []
2020-10-05 16:30:05.858 INFO 110 --- [container-0-C-1] o.a.k.c.c.internals.AbstractCoordinator : [Consumer clientId=consumer-3, groupId=http-ingest] (Re-)joining group
2020-10-05 16:30:08.943 INFO 110 --- [container-0-C-1] o.a.k.c.c.internals.AbstractCoordinator : [Consumer clientId=consumer-3, groupId=http-ingest] Successfully joined group with generation 1
2020-10-05 16:30:08.945 INFO 110 --- [container-0-C-1] o.a.k.c.c.internals.ConsumerCoordinator : [Consumer clientId=consumer-3, groupId=http-ingest] Setting newly assigned partitions [http-ingest.http-0]
2020-10-05 16:30:08.964 INFO 110 --- [container-0-C-1] o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, groupId=http-ingest] Resetting offset for partition http-ingest.http-0 to offset 0.
2020-10-05 16:30:08.981 INFO 110 --- [container-0-C-1] o.s.c.s.b.k.KafkaMessageChannelBinder$1 : partitions assigned: [http-ingest.http-0]
No Happy streaming
Any suggestions?
Thank you for trying out the developer guides!
From what I can tell, it appears the http | log stream definition in SCDF is submitted without an explicit port. When that is the case, a port gets randomly assigned by Spring Boot when the http-source and log-sink applications start.
If you navigate to your http-source application logs, you will see the application port listed, and that is the port you'd use on the CURL command.
There's this following note about this in the guide for your reference.
If you use the local Data Flow Server, add the following deployment property to set the port to avoid a port collision.
Alternatively, you can deploy the stream with an explicit port in the definition. For example: http --server.port=9004 | log. With that, your CURL would then be:
curl http://localhost:9004 -H "Content-type: text/plain" -d "Happy streaming"

Getting error while trying to runa n maven based simple springboot project

I was trying to run the springboot project at port 8082. But it is failing again and again. Please give me a feasible solution.
Full Stacktrace:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.2.RELEASE)
2019-12-26 18:02:23.947 INFO 3680 --- [ restartedMain] c.i.s.w.s.SpringBootFirstWebApplication : Starting SpringBootFirstWebApplication on DESKTOP-BK9RRM4 with PID 3680 (C:\Users\zunayeed\springboot-workspace01\spring-boot-first-web-application\spring-boot-first-web-application\target\classes started by zunayeed in C:\Users\zunayeed\springboot-workspace01\spring-boot-first-web-application\spring-boot-first-web-application)
2019-12-26 18:02:23.953 INFO 3680 --- [ restartedMain] c.i.s.w.s.SpringBootFirstWebApplication : No active profile set, falling back to default profiles: default
2019-12-26 18:02:24.294 INFO 3680 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-12-26 18:02:24.295 INFO 3680 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-12-26 18:02:29.465 INFO 3680 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http)
2019-12-26 18:02:29.514 INFO 3680 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-12-26 18:02:29.515 INFO 3680 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.29]
2019-12-26 18:02:29.926 INFO 3680 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-12-26 18:02:29.927 DEBUG 3680 --- [ restartedMain] o.s.web.context.ContextLoader : Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
2019-12-26 18:02:29.927 INFO 3680 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 5628 ms
2019-12-26 18:02:30.726 INFO 3680 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-12-26 18:02:30.744 DEBUG 3680 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : ControllerAdvice beans: 0 #ModelAttribute, 0 #InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2019-12-26 18:02:31.039 DEBUG 3680 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : 2 mappings in 'requestMappingHandlerMapping'
2019-12-26 18:02:31.130 DEBUG 3680 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2019-12-26 18:02:31.165 DEBUG 3680 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 0 #ExceptionHandler, 1 ResponseBodyAdvice
2019-12-26 18:02:31.345 WARN 3680 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : Unable to start LiveReload server
2019-12-26 18:02:31.811 INFO 3680 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2019-12-26 18:02:31.830 INFO 3680 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-12-26 18:02:31.832 ERROR 3680 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8082 was already in use.
Action:
Identify and stop the process that's listening on port 8082 or configure this application to listen on another port.
2019-12-26 18:02:31.837 INFO 3680 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
Description:
Web server failed to start. Port 8082 was already in use.
Action:
Identify and stop the process that's listening on port 8082 or configure this application to listen on another port.
Possible causes:
Either you have already been running the application
Or another application is running in the same port
Solutions:
Configure the application to listen on another port(ex: 8081)
If you are using applcation.properties,
server.port=8081
If you are using application.yml
server:
port: 8081
Identify and stop the process that's listening on a port(8082)
window
ubuntu
mac
and restart your application
If you are using cmd or git bash , use the command :
netstat -ano
or further fine grain query :
nestat -ano | grep {port addr}
(note : grep only works in linux or gitbash , use findstr for cmd)
to identiy all the PID s that are currently running , which uses the particular port address that you want to use in your application. If the PIDs are not relevant , you could kill the PIDs using the command kill -9 {pid}. After that you could start your application in the same port.
Another easy approach is to use another port address which is not used by any other application. Just set the property server.port=8086 in your application.properties, or pass it as an argument when you start the application.

Spinnaker setup on Oracle Kubernetes Cluster and Object Storage

Fresh Spninnaker install using manifest based Oracle Kubernetes Provider with Oracle Object Storage.
I can see that all the services except spin-front50 and spin-echo are up and running.
NAME READY STATUS RESTARTS AGE
spin-clouddriver-555c68f4f-z7clr 1/1 Running 0 5d16h
spin-deck-b58644c5f-rqlw6 1/1 Running 0 5d16h
spin-echo-5d7f95dcd9-lc4mp 0/1 CrashLoopBackOff 2048 5d16h
spin-front50-5df6f9d64f-r5gq8 0/1 CrashLoopBackOff 215 13h
spin-gate-79b5c66466-tbvpw 1/1 Running 0 5d16h
spin-orca-5b7d8b9bf7-d8q42 1/1 Running 0 5d16h
spin-redis-7bcc7bf5c4-zzlf4 1/1 Running 0 5d16h
spin-rosco-7b564755c9-25gt5 1/1 Running 0 5d16h
I'm able to hit the UI, but not able to create the application.
There are no error in the spin-front50 pod logs, on describe found readiness probe failing with below error:
Warning Unhealthy 16m (x14 over 19m) kubelet, 10.0.11.2 Readiness probe failed: wget: can't connect to remote host (127.0.0.1): Connection refused
Warning Unhealthy 14m (x10 over 18m) kubelet, 10.0.11.2 Liveness probe failed: wget: can't connect to remote host (127.0.0.1): Connection refused
Spin-front50 pod log:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.7.RELEASE)
2019-11-01 06:48:44.416 INFO 1 --- [ main] com.netflix.spinnaker.front50.Main : Starting Main on spin-front50-5df6f9d64f-r5gq8 with PID 1 (/opt/front50/lib/front50-web.jar started by spinnaker in /)
2019-11-01 06:48:44.419 INFO 1 --- [ main] com.netflix.spinnaker.front50.Main : The following profiles are active: test,local
2019-11-01 06:48:46.481 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'pollingScheduler' of type [com.netflix.config.FixedDelayPollingScheduler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.484 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'polledConfigurationSource' of type [com.netflix.spinnaker.kork.archaius.SpringEnvironmentPolledConfigurationSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.510 WARN 1 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-11-01 06:48:46.510 INFO 1 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-11-01 06:48:46.539 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 's3SecretEngine' of type [com.netflix.spinnaker.kork.secrets.engines.S3SecretEngine] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.540 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'noopSecretEngine' of type [com.netflix.spinnaker.kork.secrets.engines.NoopSecretEngine] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.542 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'secretEngineRegistry' of type [com.netflix.spinnaker.kork.secrets.SecretEngineRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.543 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'secretManager' of type [com.netflix.spinnaker.kork.secrets.SecretManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.620 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$894939b0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.628 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.630 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler#7b4b8199' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.633 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$ae1ddc62] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:46.637 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 06:48:47.021 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-11-01 06:48:47.062 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-11-01 06:48:47.062 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.22]
2019-11-01 06:48:47.233 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-11-01 06:48:47.233 INFO 1 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2657 ms
2019-11-01 06:48:47.886 INFO 1 --- [ main] c.o.b.h.s.internal.BouncyCastleHelper : Instantiated provider: org.bouncycastle.jce.provider.BouncyCastleProvider
2019-11-01 06:48:48.644 INFO 1 --- [ main] c.n.s.f.m.a.DefaultApplicationDAO : Warming Cache
2019-11-01 06:48:48.975 INFO 1 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2019-11-01 06:48:49.007 INFO 1 --- [ main] c.n.s.f.model.project.DefaultProjectDAO : Warming Cache
2019-11-01 06:48:49.093 INFO 1 --- [ main] c.n.s.f.m.pipeline.DefaultPipelineDAO : Warming Cache
2019-11-01 06:48:49.170 INFO 1 --- [ main] c.n.s.f.m.p.DefaultPipelineStrategyDAO : Warming Cache
2019-11-01 06:48:49.491 INFO 1 --- [ main] .s.f.m.a.DefaultApplicationPermissionDAO : Warming Cache
2019-11-01 06:48:49.798 INFO 1 --- [ main] c.n.s.f.m.p.DefaultPipelineTemplateDAO : Warming Cache
2019-11-01 06:48:49.943 INFO 1 --- [ main] c.n.s.f.m.n.DefaultNotificationDAO : Warming Cache
2019-11-01 06:48:50.293 INFO 1 --- [ main] c.n.s.f.m.snapshot.DefaultSnapshotDAO : Warming Cache
2019-11-01 06:48:50.358 INFO 1 --- [ main] c.n.s.f.m.s.DefaultServiceAccountDAO : Warming Cache
2019-11-01 06:48:50.970 INFO 1 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path ''
2019-11-01 06:48:51.120 INFO 1 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: ff98d6fd-5f53-473a-9a1c-b99ec7c76537
2019-11-01 06:48:51.229 INFO 1 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest$EndpointRequestMatcher#37b5a51c, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#4e782401, org.springframework.security.web.context.SecurityContextPersistenceFilter#3085befb, org.springframework.security.web.header.HeaderWriterFilter#10bcbbce, org.springframework.security.web.csrf.CsrfFilter#6fe337a5, org.springframework.security.web.authentication.logout.LogoutFilter#1a712f12, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#2bc0603f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#57ac236a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2bb84aa5, org.springframework.security.web.session.SessionManagementFilter#3fdede3a, org.springframework.security.web.access.ExceptionTranslationFilter#38c1b1a7, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#1abea1ed]
2019-11-01 06:48:51.231 INFO 1 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/spectator/metrics'], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#3fc051ce, org.springframework.security.web.context.SecurityContextPersistenceFilter#5d449307, org.springframework.security.web.header.HeaderWriterFilter#10ae002e, org.springframework.security.web.csrf.CsrfFilter#3407ded1, org.springframework.security.web.authentication.logout.LogoutFilter#aca594d, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#44e7c06b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#24a807a9, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#3c5bb37d, org.springframework.security.web.session.SessionManagementFilter#573f2e67, org.springframework.security.web.access.ExceptionTranslationFilter#63af52a6, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#35d8ba22]
2019-11-01 06:48:51.232 INFO 1 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#180fb796, com.netflix.spinnaker.fiat.shared.FiatAuthenticationFilter#7fa8fff, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#4423692a, org.springframework.security.web.access.ExceptionTranslationFilter#79ae3fb1]
2019-11-01 06:48:51.266 INFO 1 --- [ main] c.n.s.f.m.d.DefaultDeliveryRepository : Warming Cache
2019-11-01 06:48:51.736 INFO 1 --- [ main] c.n.s.config.HystrixSpectatorConfig : Enabling HystrixSpectatorPublisher
2019-11-01 06:48:51.795 INFO 1 --- [ main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2019-11-01 06:48:51.919 INFO 1 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-11-01 06:48:52.316 INFO 1 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2019-11-01 06:48:52.338 INFO 1 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2019-11-01 06:48:52.422 INFO 1 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2019-11-01 06:49:34.601 INFO 1 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: batchUpdateUsingPOST_1
2019-11-01 06:49:54.459 INFO 1 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: createUsingPOST_1
2019-11-01 06:49:54.460 INFO 1 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: deleteUsingDELETE_1
2019-11-01 06:49:59.499 INFO 1 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: batchUpdateUsingPOST_2
2019-11-01 06:49:59.501 INFO 1 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: deleteUsingDELETE_2
Halyard is recommended way to install Spinnaker. I had issues installing from manifests.
suggest you use halyard
I had liveness probe enabled, with --liveness-probe-initial-delay-seconds set to 60 seconds and after changing it to a higher value, the services worked.

Liquibase yaml inserts

We are using a stack on SpringBoot, Hibernate and Liquibase. I have a sql file with 24000 inserts. When I converted it into yaml (for versioning purposes), I got a huge yaml file which I split into 16 yamls. Insertion using the master file using the liquibase command line option is pretty quick. But with Spring and Hibernate, it gets stuck. Upto 5 files is fine. Anything more than this dosn't work.
I tried with 4 files each from the 16 files and it works too. So it is not an issue with any malformed yaml files. I also tried with the following properties in my application.yml.
spring:
datasource:
hikari:
maximum-pool-size: 100
properties:
hibernate:
jdbc:
batch_size: 200
Basically, it gets stuck at the changelog lock. This is what the log shows:
2019-10-17 18:10:26.375 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-10-17 18:10:26.387 WARN 1 --- [ main] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2019-10-17 18:10:26.927 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-10-17 18:10:27.760 INFO 1 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM pbr.DATABASECHANGELOGLOCK
2019-10-17 18:10:27.794 INFO 1 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM pbr.DATABASECHANGELOGLOCK
2019-10-17 18:10:27.804 INFO 1 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT `LOCKED` FROM pbr.DATABASECHANGELOGLOCK WHERE ID=1
2019-10-17 18:10:27.812 INFO 1 --- [ main] l.lockservice.StandardLockService : Waiting for changelog lock....
2019-10-17 18:10:37.816 INFO 1 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT `LOCKED` FROM pbr.DATABASECHANGELOGLOCK WHERE ID=1
2019-10-17 18:10:37.821 INFO 1 --- [ main] l.lockservice.StandardLockService : Waiting for changelog lock..
It did not work. Please help me.
The inserts are like this:
databaseChangeLog:
- changeSet:
id: 15706644546-4
author: pbr-admin
changes:
- insert:
columns:
- column:
name: model_id
value: xxxxx
- column:
name: category_id
value: ALL_TRANSACTIONS
- column:
name: afpr_indexed
valueBoolean: false
- column:
name: score
valueNumeric: xxx
The changelog is liquibase specific.

Deploy Spring Eureka Service Registry on Azure with docker image

I created a Docker Image and loaded it via the docker hub. Then is tried to run it as a docker container and exposed the port 8080. The container is listed and the port column shows the following: 0.0.0.0:8080->8080/tcp.
So in my opinion the service is running but I cant access it with the ip-addres/eureka.
How is it possible to open the Eureka dashboard?
Edit:
I changed the port and now the port column of the containers shows: 0.0.0.0:8761->8761/tcp
This is the log:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.5.RELEASE)
2019-07-03 12:04:04.714 INFO 1 --- [ main] d.h.d.DiscoveryServiceApplication : No active profile set, falling back to default profiles: default
2019-07-03 12:04:06.481 WARN 1 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2019-07-03 12:04:07.232 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=ce95a042-2fd4-339b-a733-0cc54c83f3f1
2019-07-03 12:04:07.484 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f3fe9d60] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-07-03 12:04:08.092 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8761 (http)
2019-07-03 12:04:08.166 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-07-03 12:04:08.170 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.19]
2019-07-03 12:04:08.352 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-07-03 12:04:08.352 INFO 1 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3607 ms
2019-07-03 12:04:08.606 WARN 1 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-07-03 12:04:08.620 INFO 1 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-07-03 12:04:08.669 INFO 1 --- [ main] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#1863d2fe
2019-07-03 12:04:10.133 INFO 1 --- [ main] c.s.j.s.i.a.WebApplicationImpl : Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:08 PM'
2019-07-03 12:04:10.331 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2019-07-03 12:04:10.338 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2019-07-03 12:04:10.685 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2019-07-03 12:04:10.694 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2019-07-03 12:04:11.443 WARN 1 --- [ main] o.s.c.n.a.ArchaiusAutoConfiguration : No spring.application.name found, defaulting to 'application'
2019-07-03 12:04:11.445 WARN 1 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-07-03 12:04:11.445 INFO 1 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-07-03 12:04:11.843 INFO 1 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-07-03 12:04:12.932 INFO 1 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2019-07-03 12:04:13.018 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2019-07-03 12:04:13.018 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2019-07-03 12:04:13.041 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1562155453040 with initial instances count: 0
2019-07-03 12:04:13.162 INFO 1 --- [ main] c.n.eureka.DefaultEurekaServerContext : Initializing ...
2019-07-03 12:04:13.169 INFO 1 --- [ main] c.n.eureka.cluster.PeerEurekaNodes : Adding new peer nodes [http://localhost:8761/eureka/]
2019-07-03 12:04:13.569 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2019-07-03 12:04:13.570 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2019-07-03 12:04:13.571 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2019-07-03 12:04:13.571 INFO 1 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2019-07-03 12:04:13.841 INFO 1 --- [ main] c.n.eureka.cluster.PeerEurekaNodes : Replica node URL: http://localhost:8761/eureka/
2019-07-03 12:04:13.859 INFO 1 --- [ main] c.n.e.registry.AbstractInstanceRegistry : Finished initializing remote region registries. All known remote regions: []
2019-07-03 12:04:13.860 INFO 1 --- [ main] c.n.eureka.DefaultEurekaServerContext : Initialized
2019-07-03 12:04:13.890 INFO 1 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2019-07-03 12:04:14.103 INFO 1 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application unknown with eureka with status UP
2019-07-03 12:04:14.123 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Setting the eureka configuration..
2019-07-03 12:04:14.138 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Eureka data center value eureka.datacenter is not set, defaulting to default
2019-07-03 12:04:14.139 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Eureka environment value eureka.environment is not set, defaulting to test
2019-07-03 12:04:14.181 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : isAws returned false
2019-07-03 12:04:14.182 INFO 1 --- [ Thread-11] o.s.c.n.e.server.EurekaServerBootstrap : Initialized server context
2019-07-03 12:04:14.182 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2019-07-03 12:04:14.182 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2019-07-03 12:04:14.183 INFO 1 --- [ Thread-11] c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP
2019-07-03 12:04:14.225 INFO 1 --- [ Thread-11] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2019-07-03 12:04:14.253 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8761 (http) with context path ''
2019-07-03 12:04:14.259 INFO 1 --- [ main] d.h.d.DiscoveryServiceApplication : Started DiscoveryServiceApplication in 12.423 seconds (JVM running for 13.3)
2019-07-03 12:05:14.187 INFO 1 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
2019-07-03 12:06:14.187 INFO 1 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
Container information
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8994d80a4ee2 marcelv93/service-discovery:latest "java -Djava.securit…" 6 minutes ago Up 6 minutes 0.0.0.0:8761->8761/tcp api
For your issue, you cannot access the container. As I know the possible reasons below:
the container is not running well.
the container is running well, but the application is not running well inside the container.
both container and the application is running well, but you expose a wrong port. The port is not the one that the application listens to inside the container.
So you need to check it for the point above. And I find the default port is 8761 and you need to set the configuration. Take a look at the Containerize-Spring-Cloud-Eureka-Server.

Resources