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

cannot start the Win-64 service #47

Closed
jasonye87 opened this issue May 27, 2020 · 5 comments
Closed

cannot start the Win-64 service #47

jasonye87 opened this issue May 27, 2020 · 5 comments
Assignees
Labels

Comments

@jasonye87
Copy link

Hello Sir,

I tried to run the Win-64 .exe service and it throws out an error pointing to
node-opcua-logger\node-modules\toml\lib\parser.js:3833 as shown in the capture.
image

Could you help check the error and share the solution?

Thanks,
Jason

@coussej
Copy link
Owner

coussej commented May 27, 2020

Passing the config file with a flag won't work, if you want to use a custom location you should set it in the Environment (see also https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt)

However, config.toml is the default location for the config file, and from the syntax error it looks like it's not formatted correctly. The error specifies it found a {, did you perhaps use JSON instead of TOML?

Can you share the contents of the file here?

@coussej coussej self-assigned this May 27, 2020
@jasonye87
Copy link
Author

jasonye87 commented May 27, 2020 via email

@coussej
Copy link
Owner

coussej commented May 27, 2020

Hello,

the application determines the format based on the extension of the config file. You would set the necessary environment variable by running the following command:

set CONFIG_FILE=c:\path\to\config.json

and then in the same command line window you run the binary of the logger!

Usually, after testing config etc, you'd run the logger through a windows service. I usually suggest using nssm to do so. During the installation, you can also specify the environment variables for the service.

@jasonye87
Copy link
Author

jasonye87 commented May 28, 2020 via email

@coussej
Copy link
Owner

coussej commented May 28, 2020

You're welcome!

@coussej coussej closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants