In chapter 10.4.3, there is a note that presents one exercise for reader. It says:
If you want to test the application against a specific broker (in our case, it would be for RabbitMQ), you can rely on Testcontainers, as you learned in the previous chapter. Iโll leave that up to you as an exercise.
It stuck me for a long time.The solution code provided below that can serve as a reference for others:
real rabbitMQ broker integration test
package com.polarbookshop.dispatcherservice;
import org.junit.jupiter.api.Test;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.RabbitMQContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.testcontainers.utility.DockerImageName;
import java.util.concurrent.TimeUnit;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Testcontainers
class DispatcherServiceApplicationTests {
@Container
static RabbitMQContainer rabbitMQ = new RabbitMQContainer(DockerImageName.parse("rabbitmq:3.10-management"));
// reference document: https://docs.spring.io/spring-boot/docs/2.7.18/reference/html/howto.html#howto.testing.testcontainers
@DynamicPropertySource
static void rabbitMQProperties(DynamicPropertyRegistry registry){
registry.add("spring.rabbitmq.host", rabbitMQ::getHost);
registry.add("spring.rabbitmq.port", rabbitMQ::getAmqpPort);
registry.add("spring.rabbitmq.username", rabbitMQ::getAdminUsername);
registry.add("spring.rabbitmq.password", rabbitMQ::getAdminPassword);
}
/**
* @SpringBootTest annotation will auto help you to add beans(e.g. RabbitTemplate, RabbitAdmin etc.)
* for more details, see: https://docs.spring.io/spring-amqp/docs/current/reference/html/#spring-rabbit-test
*/
@Autowired
private RabbitTemplate rabbitTemplate;
@Autowired
private RabbitAdmin rabbitAdmin; // you can use AmqpAdmin class too
@Test
void contextLoads() {
}
@Test
void packAndLabel(){
long orderId = 121;
Queue inputQueue = this.rabbitAdmin.declareQueue();
assert inputQueue != null;
Binding inputBinding = new Binding(inputQueue.getName(), Binding.DestinationType.QUEUE, "order-accepted", "dispatcher-service", null);
Queue outputQueue = this.rabbitAdmin.declareQueue();
assert outputQueue != null;
Binding outputBinding = new Binding(outputQueue.getName(), Binding.DestinationType.QUEUE, "order-dispatched", "#", null);
this.rabbitAdmin.declareBinding(inputBinding);
this.rabbitAdmin.declareBinding(outputBinding);
rabbitTemplate.convertAndSend("order-accepted", "dispatcher-service", new OrderAcceptedMessage(orderId));
await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
OrderDispatchedMessage message = rabbitTemplate.receiveAndConvert(outputQueue.getName(),
10000, new ParameterizedTypeReference<OrderDispatchedMessage>(){});
assert message != null;
assertThat(message.orderId()).isEqualTo(orderId);
System.out.println("------------------------------------: " + message.orderId());
});
}
}
then you need to add awaitility
dependency and Jackson2JsonMessageConverter
bean for using ParameterizedTypeReference
.
testImplementation "org.awaitility:awaitility:${awaitilityVersion}"
package com.polarbookshop.dispatcherservice;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* this class is created because the ParameterizedTypeReference is needed in DispatcherServiceApplicationTests
*/
@Configuration
public class RabbitMQConfig {
@Bean
public Jackson2JsonMessageConverter messageConverter(){
return new Jackson2JsonMessageConverter();
}
}
Reference:
- https://www.youtube.com/watch?v=9jZInwFtp44&ab_channel=SivaLabs
- https://stackoverflow.com/questions/49816044/connect-to-message-broker-with-spring-cloud-stream-from-test
Hi Thomas,
I am enjoying studying and building with the book. You mention in Appendix B that the GitHub repo of the book will include guides to setting up a K8s cluster on cloud providers other than Digital Ocean. Any plans to provide that guide for AWS? I would really appreciate it.
Cheers,
Shant.
Hi,
I can successfully build the catalog-service image locally when I run the maven command. All is fine, and testcontainers ITs are ok.
However, when I try to build the image with Tilt, I get a problem with testcontainers when running integration tests :
2024-01-25T09:27:58.911+01:00 WARN 2867 --- [catalog-service] [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at 127.0.0.1:32768
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:751) ~[na:na]
at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) ~[testcontainers-1.19.3.jar:1.19.3]
at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) ~[duct-tape-1.0.8.jar:na]
at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) ~[testcontainers-1.19.3.jar:1.19.3]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Any idea ?
Thanks a lot !
- Through creating the
OrderControllerWebFluxTests
, I noticed that ReactiveJwtDecoder
MockBean
was ultimately not utilized. The same appears to be true for JwtDecoder
MockBean
within the BookControllerMvcTests
class in section 12.2.3
. These injections seem to be superfluous and may need to be reevaluated.
- In my opinion, the endpoint in
OrderService
would be more logically protected under the customer
role, and there are a couple of reasons for this thought process:
$\quad$ (1) Within the OrderControllerWebFluxTests
class, the whenBookNotAvailableThenRejectOrder
method utilizes webTestClient
to send a mock request with a mock jwt
holding the ROLE_customer
authority. This test method would render moot if all requests were allowed to pass.
$\quad$ (2) It seems unreasonable to me that a guest
should have the ability to submit an order without the appropriate permissions.
Therefore, restricting this action could be beneficial for our application control.
Hi, I'm stuck in chapter 9.5.1. When I tried to enable ingress
, but always failed.
- First, I start a minikube cluster with 2 nodes:
cluster details
โ ~ minikube start -p polar --nodes 2
๐ [polar] minikube v1.30.1 on Arch "23.0.0"
โจ Automatically selected the docker driver
๐ Using Docker driver with root privileges
๐ Starting control plane node polar in cluster polar
๐ Pulling base image ...
๐ฅ Creating docker container (CPUs=2, Memory=2200MB) ...
๐ณ Preparing Kubernetes v1.26.3 on Docker 23.0.2 ...
โช Generating certificates and keys ...
โช Booting up control plane ...
โช Configuring RBAC rules ...
๐ Configuring CNI (Container Networking Interface) ...
โช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐ Enabled addons: storage-provisioner, default-storageclass
๐ Verifying Kubernetes components...
๐ Starting worker node polar-m02 in cluster polar
๐ Pulling base image ...
๐ฅ Creating docker container (CPUs=2, Memory=2200MB) ...
๐ Found network options:
โช NO_PROXY=192.168.49.2
๐ณ Preparing Kubernetes v1.26.3 on Docker 23.0.2 ...
โช env NO_PROXY=192.168.49.2
๐ Verifying Kubernetes components...
๐ Done! kubectl is now configured to use "polar" cluster and "default" namespace by default
- Then I tried to enable
ingress
:
โ ~ minikube addons enable ingress -p polar
๐ก ingress is an addon maintained by Kubernetes. For any concerns contact minikube on GitHub.
You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS
โช Using image registry.k8s.io/ingress-nginx/controller:v1.7.0
โช Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794
โช Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794
๐ Verifying ingress addon...
โ Exiting due to MK_ADDON_ENABLE: enable failed: run callbacks: running callbacks: [waiting for app.kubernetes.io/name=ingress-nginx pods: timed out waiting for the condition]
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐ฟ If the above advice does not help, please let us know: โ
โ ๐ https://github.com/kubernetes/minikube/issues/new/choose โ
โ โ
โ Please run minikube logs --file=logs.txt
and attach logs.txt to the GitHub issue. โ
โ Please also attach the following file to the GitHub issue: โ
โ - /tmp/minikube_addons_ae4fcb4856619e6ac42e679469959984454bfd00_0.log โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
- some infomation (These are all collapsible code blocks, you can expand by clicking them):
-
kubectl get pods -A
โ ~ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
ingress-nginx ingress-nginx-admission-create-wkf7d 0/1 ImagePullBackOff 0 16m
ingress-nginx ingress-nginx-admission-patch-2pqg8 0/1 ImagePullBackOff 0 16m
ingress-nginx ingress-nginx-controller-6cc5ccb977-q2w47 0/1 ContainerCreating 0 16m
kube-system coredns-787d4945fb-xjw4m 1/1 Running 2 (16m ago) 17m
kube-system etcd-polar 1/1 Running 0 17m
kube-system kindnet-96ksk 1/1 Running 0 17m
kube-system kindnet-q8vlj 1/1 Running 0 17m
kube-system kube-apiserver-polar 1/1 Running 0 17m
kube-system kube-controller-manager-polar 1/1 Running 0 17m
kube-system kube-proxy-5l2zn 1/1 Running 0 17m
kube-system kube-proxy-ng6q8 1/1 Running 0 17m
kube-system kube-scheduler-polar 1/1 Running 0 17m
kube-system storage-provisioner 1/1 Running 1 (17m ago) 17m
-
kubectl describe -n ingress-nginx ingress-nginx-controller-6cc5ccb977-q2w47
โ ~ kubectl describe pod -n ingress-nginx ingress-nginx-controller-6cc5ccb977-q2w47
Name: ingress-nginx-controller-6cc5ccb977-q2w47
Namespace: ingress-nginx
Priority: 0
Service Account: ingress-nginx
Node: polar/192.168.49.2
Start Time: Thu, 13 Jul 2023 10:02:11 +0800
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/name=ingress-nginx
gcp-auth-skip-secret=true
pod-template-hash=6cc5ccb977
Annotations:
Status: Pending
IP:
IPs:
Controlled By: ReplicaSet/ingress-nginx-controller-6cc5ccb977
Containers:
controller:
Container ID:
Image: registry.k8s.io/ingress-nginx/controller:v1.7.0@sha256:7612338342a1e7b8090bef78f2a04fffcadd548ccaabe8a47bf7758ff549a5f7
Image ID:
Ports: 80/TCP, 443/TCP, 8443/TCP
Host Ports: 80/TCP, 443/TCP, 0/TCP
Args:
/nginx-ingress-controller
--election-id=ingress-nginx-leader
--controller-class=k8s.io/ingress-nginx
--watch-ingress-without-class=true
--configmap=$(POD_NAMESPACE)/ingress-nginx-controller
--tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
--udp-services-configmap=$(POD_NAMESPACE)/udp-services
--validating-webhook=:8443
--validating-webhook-certificate=/usr/local/certificates/cert
--validating-webhook-key=/usr/local/certificates/key
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Requests:
cpu: 100m
memory: 90Mi
Liveness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=5
Readiness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3
Environment:
POD_NAME: ingress-nginx-controller-6cc5ccb977-q2w47 (v1:metadata.name)
POD_NAMESPACE: ingress-nginx (v1:metadata.namespace)
LD_PRELOAD: /usr/local/lib/libmimalloc.so
Mounts:
/usr/local/certificates/ from webhook-cert (ro)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-dxd2k (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
webhook-cert:
Type: Secret (a volume populated by a Secret)
SecretName: ingress-nginx-admission
Optional: false
kube-api-access-dxd2k:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: kubernetes.io/os=linux
minikube.k8s.io/primary=true
Tolerations: node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 18m default-scheduler Successfully assigned ingress-nginx/ingress-nginx-controller-6cc5ccb977-q2w47 to polar
Warning FailedMount 12m (x2 over 16m) kubelet Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[kube-api-access-dxd2k webhook-cert]: timed out waiting for the condition
Warning FailedMount 63s (x6 over 14m) kubelet Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert kube-api-access-dxd2k]: timed out waiting for the condition
Warning FailedMount 35s (x17 over 18m) kubelet MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
-
kubectl describe pod -n ingress-nginx ingress-nginx-admission-create-wkf7d
โ ~ kubectl describe pod -n ingress-nginx ingress-nginx-admission-create-wkf7d
Name: ingress-nginx-admission-create-wkf7d
Namespace: ingress-nginx
Priority: 0
Service Account: ingress-nginx-admission
Node: polar/192.168.49.2
Start Time: Thu, 13 Jul 2023 10:02:11 +0800
Labels: app.kubernetes.io/component=admission-webhook
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/name=ingress-nginx
controller-uid=d5123061-5639-463a-a4fc-5e73dfa3295d
job-name=ingress-nginx-admission-create
Annotations:
Status: Pending
IP: 10.244.0.4
IPs:
IP: 10.244.0.4
Controlled By: Job/ingress-nginx-admission-create
Containers:
create:
Container ID:
Image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f
Image ID:
Port:
Host Port:
Args:
create
--host=ingress-nginx-controller-admission,ingress-nginx-controller-admission.$(POD_NAMESPACE).svc
--namespace=$(POD_NAMESPACE)
--secret-name=ingress-nginx-admission
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Environment:
POD_NAMESPACE: ingress-nginx (v1:metadata.namespace)
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-82vfm (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-82vfm:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: kubernetes.io/os=linux
minikube.k8s.io/primary=true
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 22m default-scheduler Successfully assigned ingress-nginx/ingress-nginx-admission-create-wkf7d to polar
Normal SandboxChanged 21m kubelet Pod sandbox changed, it will be killed and re-created.
Warning Failed 19m (x6 over 21m) kubelet Error: ImagePullBackOff
Normal Pulling 18m (x4 over 22m) kubelet Pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
Warning Failed 18m (x4 over 21m) kubelet Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 142.251.2.82:443: i/o timeout
Warning Failed 18m (x4 over 21m) kubelet Error: ErrImagePull
Warning Failed 7m26s kubelet Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 74.125.137.82:443: i/o timeout
Normal BackOff 2m28s (x69 over 21m) kubelet Back-off pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
-
kubectl describe pod -n ingress-nginx ingress-nginx-admission-patch-2pqg8
โ ~ kubectl describe pod -n ingress-nginx ingress-nginx-admission-patch-2pqg8 [10/605]
Name: ingress-nginx-admission-patch-2pqg8
Namespace: ingress-nginx
Priority: 0
Service Account: ingress-nginx-admission
Node: polar/192.168.49.2
Start Time: Thu, 13 Jul 2023 10:02:11 +0800
Labels: app.kubernetes.io/component=admission-webhook
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/name=ingress-nginx
controller-uid=200118a6-d7cb-434f-b6e1-013cc284f3e1
job-name=ingress-nginx-admission-patch
Annotations:
Status: Pending
IP: 10.244.0.3
IPs:
IP: 10.244.0.3
Controlled By: Job/ingress-nginx-admission-patch
Containers:
patch:
Container ID:
Image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f
Image ID:
Port:
Host Port:
Args:
patch
--webhook-name=ingress-nginx-admission
--namespace=$(POD_NAMESPACE)
--patch-mutating=false
--secret-name=ingress-nginx-admission
--patch-failure-policy=Fail
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Environment:
POD_NAMESPACE: ingress-nginx (v1:metadata.namespace)
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-wswbm (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-wswbm:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: kubernetes.io/os=linux
minikube.k8s.io/primary=true
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 26m default-scheduler Successfully assigned ingress-nginx/ingress-nginx-admission-patch-2pqg8 to polar
Normal SandboxChanged 26m kubelet Pod sandbox changed, it will be killed and re-created.
Warning Failed 23m (x6 over 26m) kubelet Error: ImagePullBackOff
Warning Failed 22m (x4 over 26m) kubelet Error: ErrImagePull
Normal BackOff 11m (x48 over 26m) kubelet Back-off pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
Warning Failed 6m33s (x7 over 26m) kubelet Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 142.251.2.82:443: i/o timeout
Normal Pulling 90s (x9 over 26m) kubelet Pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
- log file:
minikube logs --file=logs.txt
logs.txt
Hi, I wanted to test the tracing functionality by calling the edge-service /books endpoint.
However, when running the edge-service (docker-compose up edge-service), the service startup fails with the logs attached.
It seems that it cannot resolve "host.docker.internal". I'm running the services on WSL (Windows 11).
Note that all the other dependencies are running (grafana, keycloak, etc) and by running "http :8080/realms/PolarBookshop" I get a valid response containing the public key.
Edge service logs:
edge-service | 2023-03-09 12:13:30.094 WARN [edge-service,,] 1 --- [ main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ServerHttpSecurityConfiguration': Unsatisfied dependency expressed through method 'setAdapterRegistry' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | 2023-03-09 12:13:30.136 INFO [edge-service,,] 1 --- [ main] ConditionEvaluationReportLoggingListener :
edge-service |
edge-service | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
edge-service | 2023-03-09 12:13:30.194 ERROR [edge-service,,] 1 --- [ main] o.s.boot.SpringApplication : Application run failed
edge-service |
edge-service | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ServerHttpSecurityConfiguration': Unsatisfied dependency expressed through method 'setAdapterRegistry' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.22.jar:5.3.22]
edge-service | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
edge-service | at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service | at com.polarbookshop.edgeservice.EdgeServiceApplication.main(EdgeServiceApplication.java:11) ~[classes/:na]
edge-service | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
edge-service | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
edge-service | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[workspace/:na]
edge-service | at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[workspace/:na]
edge-service | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[workspace/:na]
edge-service | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[workspace/:na]
edge-service | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:410) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 28 common frames omitted
edge-service | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 51 common frames omitted
edge-service | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 68 common frames omitted
edge-service | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 84 common frames omitted
edge-service | Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 98 common frames omitted
edge-service | Caused by: java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service | at org.springframework.security.oauth2.client.registration.ClientRegistrations.getBuilder(ClientRegistrations.java:220) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service | at org.springframework.security.oauth2.client.registration.ClientRegistrations.fromIssuerLocation(ClientRegistrations.java:144) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service | at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getBuilderFromIssuerIfPossible(OAuth2ClientPropertiesRegistrationAdapter.java:83) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getClientRegistration(OAuth2ClientPropertiesRegistrationAdapter.java:59) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.lambda$getClientRegistrations$0(OAuth2ClientPropertiesRegistrationAdapter.java:53) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service | at java.base/java.util.HashMap.forEach(Unknown Source) ~[na:na]
edge-service | at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getClientRegistrations(OAuth2ClientPropertiesRegistrationAdapter.java:52) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service | at org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.clientRegistrationRepository(ReactiveOAuth2ClientConfigurations.java:56) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
edge-service | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
edge-service | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service | ... 99 common frames omitted
edge-service | Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://host.docker.internal:8080/realms/PolarBookshop/.well-known/openid-configuration": Connection timed out; nested exception is java.net.ConnectException: Connection timed out
edge-service | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:670) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | at org.springframework.security.oauth2.client.registration.ClientRegistrations.lambda$oidc$0(ClientRegistrations.java:155) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service | at org.springframework.security.oauth2.client.registration.ClientRegistrations.getBuilder(ClientRegistrations.java:208) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service | ... 111 common frames omitted
edge-service | Caused by: java.net.ConnectException: Connection timed out
edge-service | at java.base/sun.nio.ch.Net.connect0(Native Method) ~[na:na]
edge-service | at java.base/sun.nio.ch.Net.connect(Unknown Source) ~[na:na]
edge-service | at java.base/sun.nio.ch.Net.connect(Unknown Source) ~[na:na]
edge-service | at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source) ~[na:na]
edge-service | at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
edge-service | at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.NetworkClient.doConnect(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.http.HttpClient.<init>(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.http.HttpClient.New(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.http.HttpClient.New(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[na:na]
edge-service | at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) ~[na:na]
edge-service | at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:76) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776) ~[spring-web-5.3.22.jar:5.3.22]
edge-service | ... 114 common frames omitted
edge-service |
edge-service |
edge-service | Native Memory Tracking:
edge-service |
edge-service | Total: reserved=13113770919, committed=366080935
edge-service | malloc: 68260775 #387651
edge-service | mmap: reserved=13045510144, committed=297820160
edge-service |
edge-service | - Java Heap (reserved=12087984128, committed=167772160)
edge-service | (mmap: reserved=12087984128, committed=167772160)
edge-service |
edge-service | - Class (reserved=122767701, committed=8735061)
edge-service | (classes #12613)
edge-service | ( instance classes #11714, array classes #899)
edge-service | (malloc=1132885 #24697)
edge-service | (mmap: reserved=121634816, committed=7602176)
edge-service | ( Metadata: )
edge-service | ( reserved=50331648, committed=48365568)
edge-service | ( used=48128608)
edge-service | ( waste=236960 =0.49%)
edge-service | ( Class space:)
edge-service | ( reserved=121634816, committed=7602176)
edge-service | ( used=7390552)
edge-service | ( waste=211624 =2.78%)
edge-service |
edge-service | - Thread (reserved=36903512, committed=2071128)
edge-service | (thread #36)
edge-service | (stack: reserved=36786176, committed=1953792)
edge-service | (malloc=66256 #274)
edge-service | (arena=51080 #87)
edge-service |
edge-service | - Code (reserved=255292808, committed=22599048)
edge-service | (malloc=1660296 #7376)
edge-service | (mmap: reserved=253632512, committed=20938752)
edge-service |
edge-service | - GC (reserved=505036284, committed=62684668)
edge-service | (malloc=22523388 #6084)
edge-service | (mmap: reserved=482512896, committed=40161280)
edge-service |
edge-service | - Compiler (reserved=17065000, committed=17065000)
edge-service | (malloc=77088 #845)
edge-service | (arena=16987912 #20)
edge-service |
edge-service | - Internal (reserved=2229004, committed=2229004)
edge-service | (malloc=2192140 #18525)
edge-service | (mmap: reserved=36864, committed=36864)
edge-service |
edge-service | - Other (reserved=8224, committed=8224)
edge-service | (malloc=8224 #3)
edge-service |
edge-service | - Symbol (reserved=14049720, committed=14049720)
edge-service | (malloc=12993792 #310555)
edge-service | (arena=1055928 #1)
edge-service |
edge-service | - Native Memory Tracking (reserved=6210840, committed=6210840)
edge-service | (malloc=8408 #117)
edge-service | (tracking overhead=6202432)
edge-service |
edge-service | - Shared class space (reserved=12582912, committed=10981376)
edge-service | (mmap: reserved=12582912, committed=10981376)
edge-service |
edge-service | - Arena Chunk (reserved=530000, committed=530000)
edge-service | (malloc=530000)
edge-service |
edge-service | - Tracing (reserved=345, committed=345)
edge-service | (malloc=345 #9)
edge-service |
edge-service | - Arguments (reserved=169, committed=169)
edge-service | (malloc=169 #5)
edge-service |
edge-service | - Module (reserved=286000, committed=286000)
edge-service | (malloc=286000 #2292)
edge-service |
edge-service | - Safepoint (reserved=8192, committed=8192)
edge-service | (mmap: reserved=8192, committed=8192)
edge-service |
edge-service | - Synchronization (reserved=115464, committed=115464)
edge-service | (malloc=115464 #811)
edge-service |
edge-service | - Serviceability (reserved=1034104, committed=1034104)
edge-service | (malloc=1034104 #9911)
edge-service |
edge-service | - Metaspace (reserved=50533040, committed=48566960)
edge-service | (malloc=201392 #107)
edge-service | (mmap: reserved=50331648, committed=48365568)
edge-service |
edge-service | - String Deduplication (reserved=704, committed=704)
edge-service | (malloc=704 #8)
edge-service |
edge-service | - Object Monitors (reserved=1132768, committed=1132768)
edge-service | (malloc=1132768 #5446)
edge-service |
edge-service exited with code 1
Hi,
I am having an issue with deployment of ArgoCD in Digital Ocean from the shell script (polar-deployment/kubernetes/platform/production/argocd/deploy.sh), as the External-IP for the LoadBalancer simply does not become available, even if it is left for hours to be provisioned. After checking the logs of the argocd-server pod, it seems that the activity stops after adding an RBAC ConfigMap, which is then followed by a status check every 10 minutes:
argocd % kubectl -n argocd get service argocd-server
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
argocd-server LoadBalancer 10.245.186.28 80:31173/TCP,443:30104/TCP 22m
argocd % kubectl -n argocd get pods
NAME READY STATUS RESTARTS AGE
argocd-application-controller-0 1/1 Running 0 23m
argocd-applicationset-controller-57f8479986-xkrb6 1/1 Running 0 23m
argocd-dex-server-b57ffc474-hfrqz 1/1 Running 0 23m
argocd-notifications-controller-585d496999-wrggh 1/1 Running 0 23m
argocd-redis-948ff45c8-kwdm2 1/1 Running 0 23m
argocd-repo-server-5dbccb487c-8nr2m 1/1 Running 0 23m
argocd-server-976589cdf-bmfqb 1/1 Running 0 23m
argocd % kubectl -n argocd logs argocd-server-976589cdf-bmfqb
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="Initialized server signature"
time="2023-04-28T08:50:56Z" level=info msg="Initialized admin password"
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="secrets informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="configmap informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="Initialized TLS certificate"
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="secrets informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="configmap informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="argocd v2.4.15+05acf7a serving on port 8080 (url: , tls: true, namespace: argocd, sso: false)"
time="2023-04-28T08:50:56Z" level=info msg="0xc00106c9c0 subscribed to settings updates"
time="2023-04-28T08:50:56Z" level=info msg="Starting rbac config informer"
time="2023-04-28T08:50:56Z" level=info msg="RBAC ConfigMap 'argocd-rbac-cm' added"
time="2023-04-28T09:00:56Z" level=info msg="Alloc=10172 TotalAlloc=29323 Sys=28497 NumGC=9 Goroutines=74"
time="2023-04-28T09:10:56Z" level=info msg="Alloc=10177 TotalAlloc=33411 Sys=28497 NumGC=14 Goroutines=74"
time="2023-04-28T09:20:56Z" level=info msg="Alloc=10185 TotalAlloc=37573 Sys=28497 NumGC=19 Goroutines=74"
I've tried substituting the argo-cd manifest version from gitHub in the argocd/resources/kustomization.yml with 'stable' (as recommended by https://argo-cd.readthedocs.io/en/stable/getting_started/), but I get the same behaviour.
I don't see what I am missing/ doing wrong as the manifests in the argocd folder are fairly straightforward, the only cause I can think of is that argocd may have a permissions issue within my cluster in Digital Ocean.
Any ideas or suggestions?
![Screenshot 2023-04-28 at 11 16 52](https://user-images.githubusercontent.com/80392341/235113648-7747bd35-d975-4ac0-824c-779c8f9db069.png)
Hi, Thomas Vitale!
I noticed that when initializing the Greeting Service project from Chapter 02 - Begin, the link to spring.io starter is incorrectly specified. In your case, the link is https://start.spring.io/starter.tgz (!.tgz), with the key -o greeting-service.zip
(!.zip) and when downloading the project, the archive turns out to be broken.
I will offer two solutions:
-
You can leave the tgz, but then the -o greeting-service.zip
parameter must be removed and added at the end of | tar -xzvf -
.
For example for Gradle: curl https://start.spring.io/starter.tgz -d groupId=com.arcticgreetings -d artifactId=greeting-service -d name=greeting-service -d packageName=com.arcticgreetings.greetingservice -d dependencies=web -d javaVersion=16 -d bootVersion=2.5.2 -d type=gradle-project | tar -xzvf -
-
You can change the starter link by specifying it https://start.spring.io/starter.zip
For example for Gardle: curl https://start.spring.io/starter.zip -d groupId=com.arcticgreetings -d artifactId=greeting-service -d name=greeting-service -d packageName=com.arcticgreetings.greetingservice -d dependencies=web -d javaVersion=16 -d bootVersion=2.5.2 -d type=gradle-project -o greeting-service.zip
In Chapter-12 end. There are 3 versions but the gradle.build/pom.xml doesn't include any flyway dependency. Am I missing something here?
/bin/bash /home/thainguyen/codespace/workspace/cloud-native-in-spring/polar-bookshop/polar-deployment/kubernetes/platform/production/argocd/deploy.sh
\n๐ฆ Installing ArgoCD...
Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
namespace/argocd unchanged
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io unchanged
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io unchanged
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io unchanged
serviceaccount/argocd-application-controller unchanged
serviceaccount/argocd-applicationset-controller unchanged
serviceaccount/argocd-dex-server unchanged
serviceaccount/argocd-notifications-controller unchanged
serviceaccount/argocd-redis unchanged
serviceaccount/argocd-repo-server unchanged
serviceaccount/argocd-server unchanged
role.rbac.authorization.k8s.io/argocd-application-controller unchanged
role.rbac.authorization.k8s.io/argocd-applicationset-controller unchanged
role.rbac.authorization.k8s.io/argocd-dex-server unchanged
role.rbac.authorization.k8s.io/argocd-notifications-controller unchanged
role.rbac.authorization.k8s.io/argocd-server unchanged
clusterrole.rbac.authorization.k8s.io/argocd-application-controller unchanged
clusterrole.rbac.authorization.k8s.io/argocd-server unchanged
rolebinding.rbac.authorization.k8s.io/argocd-application-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-dex-server unchanged
rolebinding.rbac.authorization.k8s.io/argocd-notifications-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-server unchanged
clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller unchanged
clusterrolebinding.rbac.authorization.k8s.io/argocd-server unchanged
configmap/argocd-cm unchanged
configmap/argocd-cmd-params-cm unchanged
configmap/argocd-gpg-keys-cm unchanged
configmap/argocd-notifications-cm unchanged
configmap/argocd-rbac-cm unchanged
configmap/argocd-ssh-known-hosts-cm unchanged
configmap/argocd-tls-certs-cm unchanged
secret/argocd-notifications-secret unchanged
secret/argocd-secret unchanged
service/argocd-applicationset-controller unchanged
service/argocd-dex-server unchanged
service/argocd-metrics unchanged
service/argocd-notifications-controller-metrics unchanged
service/argocd-redis unchanged
service/argocd-repo-server unchanged
service/argocd-server-metrics unchanged
deployment.apps/argocd-applicationset-controller unchanged
deployment.apps/argocd-dex-server unchanged
deployment.apps/argocd-notifications-controller unchanged
deployment.apps/argocd-redis unchanged
deployment.apps/argocd-repo-server unchanged
deployment.apps/argocd-server unchanged
statefulset.apps/argocd-application-controller unchanged
networkpolicy.networking.k8s.io/argocd-application-controller-network-policy configured
networkpolicy.networking.k8s.io/argocd-applicationset-controller-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-dex-server-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-notifications-controller-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-redis-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-repo-server-network-policy configured
networkpolicy.networking.k8s.io/argocd-server-network-policy unchanged
Error from server (Forbidden): error when creating "resources": admission webhook "validation-webhook.cloud-controller-manager.digitalocean.com" denied the request: invalid load balancer definition: POST https://api.digitalocean.com/v2/load_balancers: 429 (request "5d08ff28-48db-4cc9-afb2-9c9a13c7650c") You have reached your Load Balancer limit, maximum allowed 2. Please contact support to raise your Load Balancer limit.
Hi, there seems to be an issues with the tilt file in the custom_build part.
The output of the $EXPRECTED_REF seems not to comply with the image name expected for the the OCI image being built with buildPack and as such throws this exception:
STEP 1/3 โ Building Custom Build: [config-service]
Custom Build: Injecting Environment Variables
EXPECTED_REF=config-service:tilt-build-1676992767
EXPECTED_IMAGE=library/config-service
EXPECTED_TAG=tilt-build-1676992767
DOCKER_CERT_PATH=C:\Users\emmsewah.minikube\certs
DOCKER_HOST=tcp://127.0.0.1:49181
DOCKER_TLS_VERIFY=1
MINIKUBE_ACTIVE_DOCKERD=polar
Running cmd: gradlew bootBuildImage --imageName $EXPECTED_REF
Starting a Gradle Daemon, 2 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Task :compileJava UP-TO-DATE
Task :processResources UP-TO-DATE
Task :classes UP-TO-DATE
Task :resolveMainClassName UP-TO-DATE
Task :bootJar UP-TO-DATE
Task :bootBuildImage FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':bootBuildImage'.
Unable to parse image reference "$EXPECTED_REF". Image reference must be in the form '[domainHost:port/][path/]name[:tag][@digest]', with 'path' and 'name' containing only [a-z0-9][.][_][-]
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
BUILD FAILED in 7s
5 actionable tasks: 1 executed, 4 up-to-date
gradlew bootBuildImage --imageName $EXPECTED_REF exited with exit code 1
Build Failed: Custom build "gradlew bootBuildImage --imageName $EXPECTED_REF" failed: exit status 1
Guess the book uses spring boot 2 right? Will there be an update to spring boot 3?
I only have a vague understanding of what is discussed in the book, and I lack a clear panoramic view of the entire authentication process. Therefore, I would like to present my current understanding here and kindly ask for any corrections if there are any. (As a beginner, I genuinely feel that this section should include a diagram similar to Figure 11.3).
workflow steps(I guessed)
:
- The first request sent by Angular is an HTTP standard request. (This will trigger the authentication flow)
- Subsequently, all requests sent are AJAX requests, which are considered unauthenticated requests.
- Then, we instruct Spring Security to respond with an HTTP 401 response.
- After receiving the HTTP 401 response, the SPA handles this error and initiates the authentication flow. (In other words, initiate authentication flow is required for every AJAX request).
- Since the SPA is responsible for the authentication flow, it is necessary to allow unauthorized requests for static resources at this point.
Hi,
Looks like there is a bug in commit-stage.yaml file.
Security scans should be run after running gradle build and dependency resolution.
- name: Build, unit tests and integration tests
run: ./gradlew build
- name: Code vulnerability scanning
uses: anchore/scan-action@v3
id: scan
with:
path: "${{ github.workspace }}"
severity-cutoff: critical
- name: upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
Running them before causes dependencies to not be scanned and always shows that no vulnerabilities were found.
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google โค๏ธ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-
Jobs
Jooble