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

Message Zowe Daemon in use #1451

Closed
Tracked by #2070
YvesMichon opened this issue Jun 16, 2022 · 6 comments
Closed
Tracked by #2070

Message Zowe Daemon in use #1451

YvesMichon opened this issue Jun 16, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request priority-low Legit issue but cosmetic or nice-to-have v3 prospective changes for v3

Comments

@YvesMichon
Copy link

Hi,
We used a server to centralise all Zowe commands for deploying host components. For that, there is juste one technical account which runs all zowe commands.
The Daemon is enabled for the technical account.
When we send multiple zowe commands almost silmutanely we have randomly some lines at start of JSON output but not in JSON format :
The Zowe daemon is in use, retrying (1 of 60) The Zowe daemon is in use, retrying (2 of 60) The Zowe daemon is in use, retrying (3 of 60) The Zowe daemon is in use, retrying (4 of 60) ...
The count can be greater 4. Next after this lines, we have the attended JSON output.
From where comes those lines ?
What causes those lines appears ?

@GhettoKiwi
Copy link

Now, I am not an expert in the use of the daemon, but I might have an idea about why you might experience this output.
First of all, pretty much all communication and output is gonna be written within the console - I assume your JSON-output is based on an execution on your server/mainframe, where the response from that execution is formatted to JSON - The program/procedure you are executing is formatting the response.

The extra lines you are experiencing "The Zowe daemon is in use ...".
As I understood it the daemon can execute one thing at a time (I might be wrong) - Depending on how long it takes to execute the command, the daemon will be "hold" by that command and freed up, whenever it has finished executing its current task - Concurrency control - The daemon is then configured to notify the user about this (Help to identify bottlenecks etc.) by writing a message in the console - Just like you write your JSON output in the console.

If you have only one "executer"(one account with only one daemon) and want to run several commands simultaneously, you are probably going to cause a bottleneck. If the commands you are trying to execute simultaneously are NOT depending on the output of eachother.

  • You should probably consider executing them one by one.
  • You could also consider doing some string manipulation to remove the extra "The Zowe daemon is in use...." from your
    JSON-output.
  • You could also consider looking into the possibility of configuring threads on the daemon/technical account (If it is possible)

Once again - I am not an expert, I did not develop it and people are more than welcome to correct me if I am wrong :)

@YvesMichon
Copy link
Author

I've already made string maniuplations to having a correct JSON Output in my scripts but now I don't know if it's possible to have multiple daemon for one account or if it's possible to have a circumvention for removing this posssible bottleneck.

@MarkAckert MarkAckert added question Further information is requested for-review To be reviewed in an Eng & Prod Mgmt meeting priority-low Legit issue but cosmetic or nice-to-have labels Nov 11, 2022
@JTonda JTonda added enhancement New feature or request and removed question Further information is requested labels Feb 1, 2023
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@JTonda JTonda removed the for-review To be reviewed in an Eng & Prod Mgmt meeting label Feb 1, 2023
@gejohnston
Copy link
Member

Multiple requests are funneled into a single daemon. When the daemon is processing an earlier request, it displays those retrying messages.

If you are expecting JSON output (for example with the --response-format-json option), you might receive those retrying messages followed by the desired JSON output.

If the daemon were to write those messages to standard error instead of standard output, a consuming app would not see those messages, while a person watching the command would still see the messages, which would provide feedback on what is happening.

Marked this issue as an enhancement.

@adam-wolfe adam-wolfe mentioned this issue Apr 19, 2024
23 tasks
@JTonda JTonda added the v3 prospective changes for v3 label Apr 22, 2024
@JTonda
Copy link

JTonda commented Apr 22, 2024

If the CI environment variable is set, do not output routine messages and move the output to stderr.

@gejohnston gejohnston self-assigned this May 22, 2024
@gejohnston
Copy link
Member

Modified the app to send daemon messages to standard error as part of the following pull request.

Display daemon messages on standard error #2150

The team chose not to implement any detection of the CI environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low Legit issue but cosmetic or nice-to-have v3 prospective changes for v3
Projects
Status: Closed
Development

No branches or pull requests

5 participants