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

Deamon mode does not report syntax error in zowe.config.json #1190

Closed
gejohnston opened this issue Nov 2, 2021 · 2 comments
Closed

Deamon mode does not report syntax error in zowe.config.json #1190

gejohnston opened this issue Nov 2, 2021 · 2 comments
Assignees
Labels
bug Something isn't working daemon-mode

Comments

@gejohnston
Copy link
Member

gejohnston commented Nov 2, 2021

This appears to be a problem that has existed since daemon mode was created.

A NodeJS zowe command reports this when there is a syntax error in zowe.config.json:

-> zowe zosmf check status
[2021/11/02 12:11:55] [FATAL] [main.js:52] Error parsing JSON in the file 'C:\Users\ej608771\.zowe\zowe.config.json'.
Please check this configuration file for errors.
Error details: Unexpected token "
Line 97, Column 8

The current build of daemon mode reports the following. If the current build had previously started a daemon, the command simply hangs.

-> zowex_curr_build zosmf check status
Starting a background process to increase performance ...
The Zowe daemon that we started is not running on host = 127.0.0.1 with port = 4000.
Command used to start the Zowe daemon was:
    C:\Program Files\nodejs\zowe.cmd --daemon
Terminating.

The original version of daemon mode also hangs when there is a syntax error in zowe.config.json.

@gejohnston gejohnston added bug Something isn't working daemon-mode labels Nov 2, 2021
@gejohnston gejohnston added this to the 2.0.0 milestone Nov 2, 2021
@gejohnston
Copy link
Member Author

This is likely the same problem reported by:

Fatal Error Messages Not Returned to Daemon #943

@gejohnston
Copy link
Member Author

I think that you have caught the situation in which a configuration file is changed between zowex commands (after the daemon is started), but it still fails when the config file is wrong on the first zowex command (when it also tries to start the daemon). A very good thing is that we have no situation in which we hang.

We do NOT get the config syntax message, when the config file has a syntax error on first zowex command:

zowex_curr_build zosmf check status
Starting a background process to increase performance ...
The Zowe daemon that we started is not running on host = 127.0.0.1 with port = 4000.
Command used to start the Zowe daemon was:
    C:\Program Files\nodejs\zowe.cmd --daemon
Terminating.

We properly get the config syntax message when the config file was good on the first zowex command, but the user introduced a syntax error into the config file before we run the command a second time:

zowex_curr_build zosmf check status
Command Preparation Failed:
Error parsing JSON in the file 'C:\Users\ej608771\.zowe\zowe.config.json'.
Please check this configuration file for errors.
Error details: Unexpected token "
Line 137, Column 4

@awharn awharn closed this as completed Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working daemon-mode
Projects
None yet
Development

No branches or pull requests

2 participants