Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Could not start system #123

Open
mindaugasrukas opened this issue Nov 10, 2016 · 3 comments
Open

Could not start system #123

mindaugasrukas opened this issue Nov 10, 2016 · 3 comments
Labels

Comments

@mindaugasrukas
Copy link

Using default configuration, but could not start system

$ docker run -it -p 8080:8080 --net=host stups/pierone:1.8.5
INFO  [main] o.e.j.u.log - Logging initialized @1857ms
WARN  [main] c.n.c.s.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
INFO  [main] c.n.c.s.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
INFO  [main] c.n.c.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@342726f1
INFO  [main] o.z.s.f.system - Starting system...
WARN  [main] o.z.s.f.system - No configuration of magnificent, auth/get-auth will always return true!
INFO  [main] o.z.s.f.s.metrics - Created a new metrics registry.
ERROR [main] o.z.s.p.core - Could not start system because of ["clojure.lang.ExceptionInfo: Error in component :tokens in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :tokens, :component #org.zalando.stups.friboo.system.oauth2.OAUth2TokenRefresher{:configuration {}, :tokens {:http-audit-logger [\"uid\"]}, :token-storage nil}, :system #<SystemMap>}"].
clojure.lang.ExceptionInfo: Error in component :tokens in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start
	at clojure.core$ex_info.invoke(core.clj:4593) ~[pierone.jar:?]
	at com.stuartsierra.component$try_action.invoke(component.cljc:119) ~[pierone.jar:?]
	at com.stuartsierra.component$update_system$fn__331.invoke(component.cljc:139) ~[pierone.jar:?]
	at clojure.lang.ArraySeq.reduce(ArraySeq.java:114) ~[pierone.jar:?]
	at clojure.core$reduce.invoke(core.clj:6518) ~[pierone.jar:?]
	at com.stuartsierra.component$update_system.doInvoke(component.cljc:135) ~[pierone.jar:?]
	at clojure.lang.RestFn.invoke(RestFn.java:445) ~[pierone.jar:?]
	at com.stuartsierra.component$start_system.invoke(component.cljc:163) ~[pierone.jar:?]
	at com.stuartsierra.component$start_system.invoke(component.cljc:161) ~[pierone.jar:?]
	at com.stuartsierra.component.SystemMap.start(component.cljc:178) ~[pierone.jar:?]
	at org.zalando.stups.friboo.system$run.invoke(system.clj:110) ~[pierone.jar:?]
	at org.zalando.stups.pierone.core$run.invoke(core.clj:40) ~[pierone.jar:?]
	at org.zalando.stups.pierone.core$_main.doInvoke(core.clj:46) [pierone.jar:?]
	at clojure.lang.RestFn.invoke(RestFn.java:397) [pierone.jar:?]
	at clojure.lang.AFn.applyToHelper(AFn.java:152) [pierone.jar:?]
	at clojure.lang.RestFn.applyTo(RestFn.java:132) [pierone.jar:?]
	at org.zalando.stups.pierone.core.main(Unknown Source) [pierone.jar:?]
Caused by: java.lang.IllegalArgumentException: Configuration :access-token-url is required but is missing.
	at org.zalando.stups.friboo.config$require_config.invoke(config.clj:34) ~[pierone.jar:?]
	at org.zalando.stups.friboo.system.oauth2.OAUth2TokenRefresher.start(oauth2.clj:23) ~[pierone.jar:?]
	at com.stuartsierra.component$fn__280$G__274__282.invoke(component.cljc:5) ~[pierone.jar:?]
	at com.stuartsierra.component$fn__280$G__273__285.invoke(component.cljc:5) ~[pierone.jar:?]
	at clojure.lang.Var.invoke(Var.java:379) ~[pierone.jar:?]
	at clojure.lang.AFn.applyToHelper(AFn.java:154) ~[pierone.jar:?]
	at clojure.lang.Var.applyTo(Var.java:700) ~[pierone.jar:?]
	at clojure.core$apply.invoke(core.clj:632) ~[pierone.jar:?]
	at com.stuartsierra.component$try_action.invoke(component.cljc:117) ~[pierone.jar:?]
	... 15 more
@hjacobs
Copy link
Contributor

hjacobs commented Nov 14, 2016

Hmm, looks like this changed in some version: you need to set HTTP_TOKENINFO_URL, see https://github.com/zalando-stups/pierone#running . You can use the mock token info provided in https://github.com/zalando/connexion/tree/master/examples/oauth2 .

@dryewo
Copy link
Contributor

dryewo commented Nov 25, 2016

OAUTH2_ACCESS_TOKEN_URL needs to be set. Then, the :tokens component will successfully start and begin looking for user.json and client.json located in the directory specified by CREDENTIALS_DIR variable. It's currently not possible to run the system without providing all these things I mentioned.

@dryewo dryewo added the bug label Nov 25, 2016
@dryewo
Copy link
Contributor

dryewo commented Nov 25, 2016

And it's actually a bug. It should be possible to run and use the registry without OAUTH2_ACCESS_TOKEN_URL and HTTPLOGGER_API_URL.

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

No branches or pull requests

3 participants