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

Unable to lookup camel integration status in local mode #499

Open
sacps001119 opened this issue Jun 7, 2024 · 4 comments
Open

Unable to lookup camel integration status in local mode #499

sacps001119 opened this issue Jun 7, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sacps001119
Copy link

I am trying to run the local test with camel-k example on my VM.

$ yaks run integration.feature --local

The test will get stuck on TEST STEP 3: camel-k:verify-integration and retry to find the integration status until it times out or max attempt exceeded.
The output log look like this:

...
DEBUG| TEST STEP 3: camel-k:verify-integration
INFO | Verify Camel K integration 'hello-world'
INFO | Waiting for integration 'hello-world' to be in state 'Running'
DEBUG| Full Camel JBang command is: -Dcamel.jbang.version=4.1.0 camel@apache/camel ps
DEBUG| Writing file resource: '878951-output.txt' (encoding is 'UTF-8')
INFO | Waiting for integration 'hello-world' to be in state 'Running'- retry in 5000 ms
DEBUG| Full Camel JBang command is: -Dcamel.jbang.version=4.1.0 camel@apache/camel ps
DEBUG| Writing file resource: '879084-output.txt' (encoding is 'UTF-8')
INFO | Waiting for integration 'hello-world' to be in state 'Running'- retry in 5000 ms
...

Also, when I run camel ps command, it shows the integration is in 'Running' status.

$ camel ps
  PID    NAME          READY  STATUS    AGE  
 878922  hello-world    1/1   Running  2m13s 
 879960  timer-to-log   1/1   Running   1m4s

Environment

OS: Red Hat Enterprise Linux release 8.8 (Ootpa)
jbang version: 0.116.0
Camel version: 4.6.0
YAKS version: 0.19.2

A full set of the test project and log files are provided for investigation: yaks-camel-k-local-issue.zip

@christophd
Copy link
Member

Thanks for reporting - I'll have a look ...

@christophd
Copy link
Member

I just tried and the example runs successfully on my machine (Mac OS). I will have a look into your logs. Are you able to run any other example (e.g. hello-world.feature) locally?

@sacps001119
Copy link
Author

sacps001119 commented Jun 9, 2024

@christophd Is able to run hello-world.feature locally.
helloworld_output_logs.zip

@sacps001119
Copy link
Author

I encountered the same problem in Maven test. I found that the getCamelProcessId method in ProcessAndOutput.java was returning the wrong PID. After disabling the logic for find the first descendant PID and returning the main PID, the test passed.

Use first descendant pid:
mvn-test-descendant_pid-enable

Use main pid:
mvn-test-descendant_pid-disable

log file:
mvn-test-log.zip

@christophd christophd added bug Something isn't working help wanted Extra attention is needed labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants