Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Jenvtest server startup error #105

Closed
gyfora opened this issue Jun 19, 2023 · 5 comments
Closed

Jenvtest server startup error #105

gyfora opened this issue Jun 19, 2023 · 5 comments

Comments

@gyfora
Copy link

gyfora commented Jun 19, 2023

I am trying a very minimal test example:

import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.jenvtest.junit.EnableKubeAPIServer;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertFalse;


@EnableKubeAPIServer
public class JenvTest {

    static KubernetesClient client;

    @Test
    public void simpleTest() {
        assertFalse(client.configMaps().list().getItems().isEmpty());
    }
}

However the test fails with the following error after exactly 1 minute:

io.javaoperatorsdk.jenvtest.JenvtestException: Kube API Server did not start properly

	at io.javaoperatorsdk.jenvtest.process.ProcessReadinessChecker.pollWithTimeout(ProcessReadinessChecker.java:81)
	at io.javaoperatorsdk.jenvtest.process.ProcessReadinessChecker.waitUntilDefaultNamespaceAvailable(ProcessReadinessChecker.java:42)
	at io.javaoperatorsdk.jenvtest.process.KubeAPIServerProcess.waitUntilReady(KubeAPIServerProcess.java:94)
	at io.javaoperatorsdk.jenvtest.KubeAPIServer.start(KubeAPIServer.java:48)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.startApiServer(KubeAPIServerExtension.java:85)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.lambda$startIfAnnotationPresent$2(KubeAPIServerExtension.java:78)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.lambda$startIfAnnotationPresent$3(KubeAPIServerExtension.java:71)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.startIfAnnotationPresent(KubeAPIServerExtension.java:68)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.initialize(KubeAPIServerExtension.java:61)
	at io.javaoperatorsdk.jenvtest.junit.KubeAPIServerExtension.beforeAll(KubeAPIServerExtension.java:37)

Full logs:
https://gist.github.com/gyfora/f1aa0e26620e5991b1800776d936315c

I wonder if this could be some networking related issue because based on the logs the server actually seems to start but the readiness check fails.

System info:
Apple M1 Max
JDK 11

@gyfora
Copy link
Author

gyfora commented Jun 19, 2023

cc @csviri

@csviri
Copy link
Collaborator

csviri commented Jun 20, 2023

from the last health check:

poststarthook/rbac/bootstrap-roles failed: reason withheld

this is usually takes the longest to start finish on startup. Will have to somehow reproduce it and investigate.

we could investigate why is this happening closer maybe using this: kubernetes/kubernetes#86715 (comment)

@csviri
Copy link
Collaborator

csviri commented Nov 23, 2023

this might be related to this issue: #133

@gyfora could you retest it pls with the newest release?

@gyfora
Copy link
Author

gyfora commented Nov 24, 2023

I am on vacation until dec 2 but I will test this afterwards :) thank you!

@gyfora
Copy link
Author

gyfora commented Dec 22, 2023

I tested with the most recent version and it works perfectly! Closing this ticket thank you :)

@gyfora gyfora closed this as completed Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants