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

problem with executing csruntime --host localhost hello.calvin #84

Closed
samsimsim opened this issue Sep 8, 2017 · 2 comments
Closed

problem with executing csruntime --host localhost hello.calvin #84

samsimsim opened this issue Sep 8, 2017 · 2 comments

Comments

@samsimsim
Copy link

Hi, I'm trying to execute this code $ csruntime --host localhost hello.calvin in the mini tutorial, but I get this:

2017-09-08 16:51:28,040 ERROR 2286-calvin.calvin.utilities.runtime_credentials: get_domain: error while trying to read domain from Calvin config, err=argument of type 'NoneType' is not iterable
2017-09-08 16:51:28,040 INFO 2286-calvin.calvin.runtime.north.calvincontrol: Control API trying to listening on: localhost:5001
DEPLOY STATUS 200, OK
Deployed application 38835e32-a853-449c-9aeb-1c402e5561c5
2017-09-08 16:51:30,965 INFO 2286-calvin.calvin.runtime.north.calvin_node: All done, exiting
2017-09-08 16:51:30,980 INFO 2286-calvin.calvin.runtime.north.calvin_node: Quitting node "['calvinip://localhost:5000']"

I suppose to get something like this:
Deployed application 922a2096-bfd9-48c8-a5a4-ee900a180ca4
2016-07-11 08:20:34,667 INFO 11202-calvin.Log: Hello, world
2016-07-11 08:20:35,667 INFO 11202-calvin.Log: Hello, world

Any help would be appreciated. Thanks!

@persquare
Copy link
Contributor

2017-09-08 16:51:28,040 ERROR 2286-calvin.calvin.utilities.runtime_credentials: get_domain: error while trying to read domain from Calvin config, err=argument of type 'NoneType' is not iterable

This is actually OK. It just means that Calvin's security isn't configured on your machine and it will fall back to running with security disabled. The log message should really be changed to something more informative.

2017-09-08 16:51:28,040 INFO 2286-calvin.calvin.runtime.north.calvincontrol: Control API trying to listening on: localhost:5001
DEPLOY STATUS 200, OK
Deployed application 38835e32-a853-449c-9aeb-1c402e5561c5

This is actually confirmation that your example is running...

2017-09-08 16:51:30,965 INFO 2286-calvin.calvin.runtime.north.calvin_node: All done, exiting
2017-09-08 16:51:30,980 INFO 2286-calvin.calvin.runtime.north.calvin_node: Quitting node "['calvinip://localhost:5000']"

...and this is the runtime quitting as it is supposed to do when started like this.

However, the default is for the runtime to quit after 3s (!) when started with a file argument. I suspect that your runtime simply didn't have enough time to produce output. Try changing the keep-alive time to 10s or perhaps even longer

csruntime --host localhost --keep-alive 10 hello.calvin

and see if that helps.

The ability to add a script to the csruntime command is just convenience to allow quick testing of a script, the "normal" way to start a runtime is to start it without a script argument, in which case it will keep on running forever and you feed it applications using the cscontrol command.

@samsimsim
Copy link
Author

Thank you! It works now.

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

No branches or pull requests

2 participants