Open CodingYuanLiu opened 3 years ago
try wsk -i action list
@CodingYuanLiu verify the port information matches anything in application.conf.
And possibly try using localhost
instead of that loopback IP
Hello Alexander, Sorry to bother you, too. I also met two problems when I run the openwhisk-standalone.jar, and I sincerely hope I can get your help.
openwhisk-standalone.jar
by ./gradlew :core:standalone:build
sample-app.conf
and put it in ./bin/. Rename it to application.conf
customruntime.json
in ./bin/. Its content is the same as ansible/file/runtime.json
openwhisk-standalone.jar
via cmd java -jar openwhisk-standalone.jar --dev-mode -c application.conf -m customruntime.json
When I launch openwhisk-standalone.jar without option --kafka
, there will be an ERROR that prevented the program from running. So I wonder that how I can omit the --kafka
option to launch openwhisk-standalone.jar.
root@master:/home/openfaas/openwhisk-caching/bin# java -jar openwhisk-standalone.jar -c application.conf -m customruntime.json --dev-mode
____ ___ _ _ _ _ _
/\ \ / _ \ _ __ ___ _ __ | | | | |__ (_)___| | __
/\ /__\ \ | | | | '_ \ / _ \ '_ \| | | | '_ \| / __| |/ /
/ \____ \ / | |_| | |_) | __/ | | | |/\| | | | | \__ \ <
\ \ / \/ \___/| .__/ \___|_| |_|__/\__|_| |_|_|___/_|\_\
\___\/ tm |_|
Launched service details
[ 3233 ] http://172.17.0.1:3233 (Controller) [ 3232 ] http://172.17.0.1:3232/playground (Playground)
[2022-04-14T12:02:09.398Z] [INFO] [#tid_sid_unknown] [MemoryArtifactStore] Created MemoryStore for [subjects] [2022-04-14T12:02:09.426Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [GET] 'subjects' finding document: 'id: guest' [marker:database_getDocument_start:173] [2022-04-14T12:02:09.427Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_getDocument_finish:174:0] [2022-04-14T12:02:09.453Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [PUT] 'subjects' saving document: 'id: guest, rev: null' [marker:database_saveDocument_start:200] [2022-04-14T12:02:09.457Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_saveDocument_finish:204:3] [2022-04-14T12:02:09.464Z] [INFO] [#tid_sid_userBootstrap] [StandaloneOpenWhisk] Created user [guest] [2022-04-14T12:02:09.549Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [GET] 'subjects' finding document: 'id: alftest' [marker:database_getDocument_start:68] [2022-04-14T12:02:09.550Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_getDocument_finish:68:0] [2022-04-14T12:02:09.553Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [PUT] 'subjects' saving document: 'id: alftest, rev: null' [marker:database_saveDocument_start:72] [2022-04-14T12:02:09.555Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_saveDocument_finish:73:0] [2022-04-14T12:02:09.555Z] [INFO] [#tid_sid_userBootstrap] [StandaloneOpenWhisk] Created user [alftest] [2022-04-14T12:02:09.622Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [GET] 'subjects' finding document: 'id: whisk.system' [marker:database_getDocument_start:49] [2022-04-14T12:02:09.623Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_getDocument_finish:49:0] [2022-04-14T12:02:09.626Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [PUT] 'subjects' saving document: 'id: whisk.system, rev: null' [marker:database_saveDocument_start:53] [2022-04-14T12:02:09.628Z] [INFO] [#tid_sid_cli] [MemoryArtifactStore] [marker:database_saveDocument_finish:55:0] [2022-04-14T12:02:09.629Z] [INFO] [#tid_sid_userBootstrap] [StandaloneOpenWhisk] Created user [whisk.system] [2022-04-14T12:02:09.852Z] [WARN] Failed to attach the instrumentation because the Kamon Bundle is not present on the classpath [2022-04-14T12:02:10.020Z] [INFO] [#tid_sid_unknown] [Config] system set value for limits.triggers.fires.perMinute [2022-04-14T12:02:10.020Z] [INFO] [#tid_sid_unknown] [Config] system set value for limits.actions.sequence.maxLength [2022-04-14T12:02:10.021Z] [INFO] [#tid_sid_unknown] [Config] system set value for limits.actions.invokes.concurrent [2022-04-14T12:02:10.021Z] [INFO] [#tid_sid_unknown] [Config] system set value for limits.actions.invokes.perMinute [2022-04-14T12:02:10.021Z] [INFO] [#tid_sid_unknown] [Config] system set value for runtimes.manifest [2022-04-14T12:02:10.022Z] [INFO] [#tid_sid_unknown] [Config] system set value for port
[2022-04-14T12:02:10.054Z] [ERROR] [#tid_sid_unknown] [Config] required property kafka.hosts still not set [2022-04-14T12:02:10.055Z] [ERROR] [#tid_sid_unknown] [Controller] Bad configuration, cannot start.
[2022-04-14T12:02:10.060Z] [INFO] [#tid_sid_standalone] [StandaloneDockerClient] running /usr/bin/docker ps --quiet --no-trunc --all --filter name=whisk- (timeout: 1 minute) [marker:invoker_docker.ps_start:1] [2022-04-14T12:02:10.113Z] [INFO] [#tid_sid_standalone] [StandaloneDockerClient] [marker:invoker_docker.ps_finish:54:53] [2022-04-14T12:02:10.116Z] [INFO] [#tid_sid_standalone] [StandaloneDockerSupport] removing 0 containers launched for Standalone server support. [2022-04-14T12:02:10.123Z] [INFO] [#tid_sid_unknown] [Controller] Shutting down Kamon with coordinated shutdown
2. When launching openwhisk-standalone with the `--kafka` option, it will successfully run without shutdown. But when I invoke functions that created by `wsk_inteaction.py`, there is another error.
**What should I do to deal the error of `java.lang.ArithmeticException: / by zero`**
#### Action list and Action invoke
root@master:/home/master# wsk action list actions /alftest/json private python:3 /alftest/video private python:ai-vid /alftest/aes private python:3 /alftest/train private python:ai /alftest/lin_pack private python:ai /alftest/image private python:ai /alftest/hello private python:3 /alftest/gzip private python:3 /alftest/float private python:ai /alftest/dd private python:3 /alftest/cnn private python:ai /alftest/cham private python:3 root@master:/home/master# wsk action invoke hello --result error: Unable to invoke action 'hello': The connection failed, or timed out. (HTTP status code 500) Run 'wsk --help' for usage.
#### openwhisk-standalone.jar's error infomation
[2022-04-14T12:47:45.382Z] [INFO] [#tidWGr0vEuRaS8yVIpcIucSTKx1VdJU6hm9] POST /api/v1/namespaces//actions/hello blocking=true&result=true [2022-04-14T12:47:45.385Z] [INFO] [#tid_WGr0vEuRaS8yVIpcIucSTKx1VdJU6hm9] [Identity] [GET] serving from cache: CacheKey(babecafe-cafe-babe-cafe-babecafebabe) [marker:database_cacheHit_counter:2] [2022-04-14T12:47:45.385Z] [ERROR] Error during processing of request: '/ by zero'. Completing with 500 Internal Server Error response. To change default exception handling behavior, provide a custom ExceptionHandler. java.lang.ArithmeticException: / by zero at org.apache.openwhisk.core.entitlement.EntitlementProvider.calculateIndividualLimit(Entitlement.scala:131) at org.apache.openwhisk.core.entitlement.EntitlementProvider.$anonfun$invokeRateThrottler$2(Entitlement.scala:138) at org.apache.openwhisk.core.entitlement.EntitlementProvider.$anonfun$invokeRateThrottler$2$adapted(Entitlement.scala:138) at org.apache.openwhisk.core.entitlement.RateThrottler.check(RateThrottler.scala:50) at org.apache.openwhisk.core.entitlement.EntitlementProvider.checkUserThrottle(Entitlement.scala:367) at org.apache.openwhisk.core.entitlement.EntitlementProvider.checkThrottles(Entitlement.scala:214) at org.apache.openwhisk.core.entitlement.EntitlementProvider.check(Entitlement.scala:300) at org.apache.openwhisk.core.entitlement.EntitlementProvider.check(Entitlement.scala:264) at org.apache.openwhisk.core.controller.BasicAuthorizedRouteProvider.$anonfun$authorizeAndDispatch$1(AuthorizedRouteDispatcher.scala:75) at akka.http.scaladsl.server.directives.FutureDirectives.$anonfun$onComplete$2(FutureDirectives.scala:37) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2(BasicDirectives.scala:45) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResult$2(BasicDirectives.scala:68) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResult$2(BasicDirectives.scala:68) at akka.http.scaladsl.server.Directive.$anonfun$recover$5(Directive.scala:126) at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41) at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45) at akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26) at akka.http.scaladsl.server.Directive.$anonfun$recover$2(Directive.scala:125) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2(BasicDirectives.scala:45) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$2(RouteConcatenation.scala:47) at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41) at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45) at akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2(BasicDirectives.scala:45) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2(BasicDirectives.scala:45) at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$2(RouteConcatenation.scala:47) at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41) at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45) at akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26) at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44) at akka.http.scaladsl.server.directives.OnSuccessMagnet$$anon$1.$anonfun$directive$3(FutureDirectives.scala:97) at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41) at akka.http.scaladsl.util.FastFuture$.$anonfun$transformWith$3(FastFuture.scala:51) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
This error has nothing to do with kafka.
The exception ends up in checkUserThrottle
and invokeRateThrottler
.
I don't know what those functions exactly do, but form the names I suspect they're related to the function invocation rate throttling.
Perhaps there's something wrong with your limits.firesPerMinute
setting in the conf file, or another of the options in the limit group located there
Hello Alexander, Sorry to bother you. Hope I'm allowed to get some advice on openwhisk-standalone deployment. Thank you!
I just follow the steps described in section A.3.2 of the ASPLOS paper. However, my
wsk
can not access openwhisk-standalone after setting the apihost to 172.17.0.1:3233. Any request will cause a timeout and returns:For example, a
wsk action list
command will cause:But my ./run.sh of Openwhisk does not produce any error.
Environment details:
Steps to reproduce the issue:
sudo env "PATH=/home/alfuerst/repos/wsk-cli" /usr/bin/java -jar ./bin/openwhisk-standalone.jar --dev-mode --ui-port 7894 -c ./bin/application.conf
tosudo /usr/bin/java -jar ./bin/openwhisk-standalone.jar --dev-mode --ui-port 7894 -c ./bin/application.conf
run.sh
, and the openwhisk starts.Provide the actual results and outputs:
The output of openwhisk standalone is as follows: