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

[ISSUE #3053] configuration file does not exist #3023

Merged
merged 4 commits into from
Feb 7, 2023

Conversation

koonchen
Copy link
Contributor

@koonchen koonchen commented Feb 2, 2023

Fixes #3053

Motivation

Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.

I failed to start in standalone mode with macos 11 and i found a similar issue #2935 that still unresolved.
So i try it myself.

2023-02-02 11:09:36,157 ERROR [main] EventMeshStartup(EventMeshStartup.java:56) - EventMesh start fail.
java.lang.RuntimeException: file is not exists
  at org.apache.eventmesh.common.config.ConfigService.getConfig(ConfigService.java:139) ~[eventmesh-common-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.common.config.ConfigService.populateConfig(ConfigService.java:168) ~[eventmesh-common-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.common.config.ConfigService.populateConfigForObject(ConfigService.java:113) ~[eventmesh-common-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.spi.EventMeshExtensionFactory.lambda$getSingletonExtension$0(EventMeshExtensionFactory.java:91) ~[eventmesh-spi-1.8.0-release.jar:1.8.0-release]
  at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:1.8.0_312]
  at org.apache.eventmesh.spi.EventMeshExtensionFactory.getSingletonExtension(EventMeshExtensionFactory.java:84) ~[eventmesh-spi-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.spi.EventMeshExtensionFactory.getExtension(EventMeshExtensionFactory.java:77) ~[eventmesh-spi-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.metrics.api.MetricsPluginFactory.getMetricsRegistry(MetricsPluginFactory.java:38) ~[eventmesh-metrics-api-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.runtime.boot.EventMeshTCPServer.lambda$null$1(EventMeshTCPServer.java:223) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_312]
  at org.apache.eventmesh.runtime.boot.EventMeshTCPServer.lambda$init$2(EventMeshTCPServer.java:222) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_312]
  at org.apache.eventmesh.runtime.boot.EventMeshTCPServer.init(EventMeshTCPServer.java:221) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.runtime.boot.EventMeshTcpBootstrap.init(EventMeshTcpBootstrap.java:50) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.runtime.boot.EventMeshServer.init(EventMeshServer.java:108) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.runtime.boot.EventMeshServer.<init>(EventMeshServer.java:83) ~[eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.runtime.boot.EventMeshStartup.main(EventMeshStartup.java:38) [eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
  at org.apache.eventmesh.starter.StartUp.main(StartUp.java:24) [main/:?]

> Task :eventmesh-starter:StartUp.main() FAILED
65 actionable tasks: 3 executed, 62 up-to-date

Modifications

Describe the modifications you've done.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Merging #3023 (07e7442) into master (2adf752) will increase coverage by 0.00%.
The diff coverage is 35.35%.

❗ Current head 07e7442 differs from pull request most recent head bba4ba8. Consider uploading reports for the commit bba4ba8 to get more accurate results

@@            Coverage Diff            @@
##             master    #3023   +/-   ##
=========================================
  Coverage     12.84%   12.84%           
+ Complexity     1095     1094    -1     
=========================================
  Files           548      548           
  Lines         28623    28682   +59     
  Branches       2847     2856    +9     
=========================================
+ Hits           3676     3685    +9     
- Misses        24650    24684   +34     
- Partials        297      313   +16     
Impacted Files Coverage Δ
.../eventmesh/runtime/admin/handler/TopicHandler.java 6.25% <0.00%> (ø)
.../protocol/tcp/client/group/ClientGroupWrapper.java 0.00% <0.00%> (ø)
...entmesh/client/catalog/EventMeshCatalogClient.java 0.00% <0.00%> (ø)
...ache/eventmesh/client/http/AbstractHttpClient.java 0.00% <0.00%> (ø)
...ntmesh/client/http/AbstractProducerHttpClient.java 0.00% <0.00%> (ø)
.../apache/eventmesh/client/http/EventMeshRetObj.java 0.00% <ø> (ø)
...sh/client/http/consumer/EventMeshHttpConsumer.java 0.00% <0.00%> (ø)
...ache/eventmesh/client/http/model/RequestParam.java 0.00% <0.00%> (ø)
...tmesh/client/http/producer/CloudEventProducer.java 0.00% <0.00%> (ø)
...sh/client/http/producer/EventMeshHttpProducer.java 0.00% <0.00%> (ø)
... and 34 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@koonchen
Copy link
Contributor Author

koonchen commented Feb 2, 2023

PTAL

@horoc horoc self-requested a review February 3, 2023 03:34
@horoc
Copy link
Member

horoc commented Feb 3, 2023

hi @koonchen, it seems there is another PR #2966 which is trying to fix this issue. @sbmvirdi, are you still working on it?

@sbmvirdi
Copy link
Contributor

sbmvirdi commented Feb 3, 2023

yes actually i was trying to fix the issue but was not able to getting some test cases failure @koonchen is this fixed by your end ?

@koonchen
Copy link
Contributor Author

koonchen commented Feb 4, 2023

@sbmvirdi I have solved this problem without any additional problems, this issue #2935 has been open for a while, please accept my PR and close the issue :)

@xwm1992
Copy link
Contributor

xwm1992 commented Feb 6, 2023

@sbmvirdi I have solved this problem without any additional problems, this issue #2935 has been open for a while, please accept my PR and close the issue :)

Hi @koonchen, thank you for your contribute first, but this issue #2935 has been assigned to the @sbmvirdi , please confirm whether the issue has been asigned to others before submitting pr, thanks.

@koonchen
Copy link
Contributor Author

koonchen commented Feb 6, 2023

@xwm1992 Yes, you are right, I didn't express my meaning clearly, this PR #2966 didn't solve my problem, I still get an error when I use the latest master.

java.lang.RuntimeException: configuration file does not exist
	at org.apache.eventmesh.common.config.ConfigService.getConfig(ConfigService.java:142) ~[eventmesh-common-1.8.0-release.jar:1.8.0-release]
	at org.apache.eventmesh.common.config.ConfigService.setRootConfig(ConfigService.java:69) ~[eventmesh-common-1.8.0-release.jar:1.8.0-release]
	at org.apache.eventmesh.runtime.boot.EventMeshStartup.main(EventMeshStartup.java:36) [eventmesh-runtime-1.8.0-release.jar:1.8.0-release]
	at org.apache.eventmesh.starter.StartUp.main(StartUp.java:24) [main/:?]
> Task :eventmesh-starter:StartUp.main() FAILED

I mean just modifying this line of code is not enough InputStream configurationInputStream = getClass().getResourceAsStream(filePath);

@koonchen koonchen changed the title [ISSUE #2935] fix file not exists at startup [ISSUE #3053] configuration file does not exist Feb 6, 2023
@koonchen
Copy link
Contributor Author

koonchen commented Feb 6, 2023

link #3053

# Conflicts:
#	eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigService.java
@koonchen
Copy link
Contributor Author

koonchen commented Feb 6, 2023

Closes #3053

@koonchen
Copy link
Contributor Author

koonchen commented Feb 6, 2023

@horoc @xwm1992 I don't know how to relate to the new issue #3053, please help to see if the issue needs to be fixed, thx :)

@xwm1992 xwm1992 merged commit 0a794bd into apache:master Feb 7, 2023
@HattoriHenzo
Copy link
Contributor

HattoriHenzo commented Mar 3, 2023

@xwm1992 seems like the change is not available into the master branch. I have updated my repo with the upstream but still nothing. I am also facing the same issue, while trying to start the project. I running on Windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] configuration file does not exist
5 participants