Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolean org.fusesource.jansi.AnsiConsole.isInstalled() #1915

Closed
weihubeats opened this issue Nov 16, 2022 · 20 comments · Fixed by #1916
Closed

boolean org.fusesource.jansi.AnsiConsole.isInstalled() #1915

weihubeats opened this issue Nov 16, 2022 · 20 comments · Fixed by #1916
Assignees
Labels
bug Something isn't working
Milestone

Comments

@weihubeats
Copy link

Describe the bug

Execute the command mvn clean k8s:resource and get an error:

boolean org.fusesource.jansi.AnsiConsole.isInstalled()

Eclipse JKube version

1.10.0

Component

Kubernetes Maven Plugin

Apache Maven version

3.6.1

Gradle version

No response

Steps to reproduce

mvn clean k8s:resource

Expected behavior

Run correctly

Runtime

minikube

Kubernetes API Server version

1.22.15

Environment

macOS

Eclipse JKube Logs

No response

Sample Reproducer Project

No response

Additional context

No response

@weihubeats weihubeats added the bug Something isn't working label Nov 16, 2022
@manusa
Copy link
Member

manusa commented Nov 16, 2022

Could you please provide the complete stacktrace for the error? (append -X to the mvn command)

@manusa
Copy link
Member

manusa commented Nov 16, 2022

Also, moving to a newer maven version (if possible) would help

@weihubeats
Copy link
Author

weihubeats commented Nov 16, 2022

image

This error should be more detailed

@manusa
Copy link
Member

manusa commented Nov 16, 2022

I can reproduce, 1.10 requires a newer version of Maven (still need to investigate which dependency bump caused this).

You can either upgrade to a more recent Maven version, or fallback to Eclipse JKube 1.9.1 which shouldn't have the issue.

Execution default-cli of goal org.eclipse.jkube:kubernetes-maven-plugin:1.10.0:resource failed: An API incompatibility was encountered while executing org.eclipse.jkube:kubernetes-maven-plugin:1.10.0:resource: java.lang.NoSuchMethodError: 'boolean org.fusesource.jansi.AnsiConsole.isInstalled()'
Caused by: java.lang.NoSuchMethodError: 'boolean org.fusesource.jansi.AnsiConsole.isInstalled()'
    at org.eclipse.jkube.kit.common.util.AnsiLogger.info (AnsiLogger.java:97)
    at org.eclipse.jkube.generator.api.GeneratorManager.generate (GeneratorManager.java:55)
    at org.eclipse.jkube.maven.plugin.mojo.build.ResourceMojo.lambda$getResolvedImages$2 (ResourceMojo.java:342)
    at org.eclipse.jkube.kit.build.service.docker.helper.ConfigHelper.resolveImages (ConfigHelper.java:72)
    at org.eclipse.jkube.kit.build.service.docker.helper.ConfigHelper.initImageConfiguration (ConfigHelper.java:189)

@manusa
Copy link
Member

manusa commented Nov 16, 2022

Maven 3.6.3 uses org.fusesource.jansi:jansi:1.17.1

Maven >=3.8.2 has bumped to uses org.fusesource.jansi:jansi:2.x

AnsiConsole 1.17 didn't have this method.

This commit: a55f862
has very likely introduced the problem.

@manusa
Copy link
Member

manusa commented Nov 16, 2022

v1.10.1 with the fix was just released, could you please confirm that the latest 1.10.1 works OK?

@rohanKanojia
Copy link
Member

@weihubeats : Could you please provide some feedback about the project?

@weihubeats
Copy link
Author

I can use the old version to package the image and upload minikube successfully, but the pod status is not running, and the package docker image does not start properly, I don't know what the problem is, so I'm going to package the image manually

@rohanKanojia
Copy link
Member

@weihubeats : Is this the project you're working on https://github.com/weihubeats/weihubeats_demos ?

Shall I try to clone it and test it on my minikube instance? Maybe it could be due to health checks not getting satisfied (just a guess)

@weihubeats
Copy link
Author

weihubeats commented Nov 20, 2022

I used spring-boot-docker
to package the docker image locally and successfully accessed it on minikube, which is the same project as spring-boot-kubernetes-maven-plugin is basically the same
This means it's not a problem with the code

@rohanKanojia
Copy link
Member

@weihubeats : You're right. I just cloned your repository and tested on minikube. You sample seems to be working okay on my machine:

spring-boot-kubernetes-maven-plugin : $ eval $(minikube -p minikube docker-env)
spring-boot-kubernetes-maven-plugin : $ mvn package  k8s:apply
spring-boot-kubernetes-maven-plugin : $ kubectl get svc
NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
kubernetes    ClusterIP   10.96.0.1       <none>        443/TCP    41h
mysql         ClusterIP   10.110.171.39   <none>        3306/TCP   41h
zou-fabric8   ClusterIP   10.104.165.55   <none>        9004/TCP   7s
spring-boot-kubernetes-maven-plugin : $ minikube ssh
                         _             _            
            _         _ ( )           ( )           
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __  
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ curl 10.104.165.55:9004/health
OK$ 
$ curl 10.104.165.55:9004/hello 
Hello, 2022-11-20 06:24:42$ 

@weihubeats
Copy link
Author

weihubeats commented Nov 20, 2022

But running the plug-in auto-deployment seems to be a failure, so it should be the plug-in problem?

@rohanKanojia
Copy link
Member

@weihubeats : Sorry, I don't understand what auto-deployment means? Could you please share steps you performed to deploy the application?

@weihubeats
Copy link
Author

weihubeats commented Nov 20, 2022

image

image

I can't seem to access it according to the way you see above, but it seems to be normal to see the service running
image
image
image
It seems that you have to configure the docker account password

@rohanKanojia
Copy link
Member

@weihubeats : It looks like image is not present in minikube cluster. Did you run this command in the same bash session you were deploying the app ?:

$ eval $(minikube -p minikube docker-env)

@weihubeats
Copy link
Author

image

@rohanKanojia
Copy link
Member

@weihubeats : strange, it should work. Could you please try pushing image to some remote registry (Docker Hub/ Quay.io) and see if behavior changes?

@anurag-rajawat
Copy link
Contributor

@weihubeats we have checked your demo project on all three OSs Windows, Mac and Linux and it is working fine on all of them.

1. Windows
Screenshot 2022-11-21 143710

Screenshot 2022-11-21 143830

Screenshot 2022-11-21 144001
Screenshot 2022-11-21 144127

2. Mac

Screenshot 2022-11-21 at 3 18 50 PM

Screenshot 2022-11-21 at 3 18 59 PM

Screenshot 2022-11-21 at 3 19 15 PM

Screenshot 2022-11-21 at 3 20 03 PM

3. Linux

@weihubeats
Copy link
Author

Okay, here's my system information.
image

  • docker:

image

  • minikube

image

@weihubeats
Copy link
Author

@weihubeats : strange, it should work. Could you please try pushing image to some remote registry (Docker Hub/ Quay.io) and see if behavior changes?

I'll try it sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants