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

Unable to start the consul service in windows 2012 server #8241

Open
jsprojects2 opened this issue Jul 5, 2020 · 10 comments
Open

Unable to start the consul service in windows 2012 server #8241

jsprojects2 opened this issue Jul 5, 2020 · 10 comments
Labels
type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp

Comments

@jsprojects2
Copy link

Hi,

I am trying to run the consul service in windows 2012 server, I ran the following command from command prompt

sc create "Consul_Service" binPath="C:\Microservices Tool\consul\consul.exe agent -config-dir=C:\Microservices Tool\consul\consul_configA.json" start=auto

the consul.exe is installed in the window sercive.

after that i am running the following command

sc start consul_service

the consul service is unable to run, it is throwing an error

Windows could not start the Consul_Service service on Local Computer.

Error 1067: The process terminated unexpectedly.

Please kindly give us a suggestion to make it working. or do i missed something during installation or any other info.

Originally posted by @jsprojects2 in #2745 (comment)

@jsosulska jsosulska added the type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp label Jul 6, 2020
@idrennanvmware
Copy link

@jsprojects2 - could you post your consul config file? Also any logs would be helpful too. Whenever we have seen this we have tried a few different approaches (btw, normally this is an indication we messed up our config file) but the most tried and true brute force is we try running the service start command manually (so not as a service but straight from the command line). Often this right away points us to the error.

Also, the CLI has a validate command https://www.consul.io/docs/commands/validate that you can try as well, just to make sure things are all good.

@jsprojects2
Copy link
Author

Hi,

I have ran the consul validate command, which is returning success.

Here is my configuration file
consul config

@naariah
Copy link

naariah commented Jul 10, 2020

I have the same question.it is worked in windows 10 but not work in windows 2012 server.

@idrennanvmware
Copy link

can you add

"log_file":"C:/Microservices Tool/consul/Logs/consul.log"

See what that gives you for logs?

@jsprojects2
Copy link
Author

Hi,

I am able to run the consul application if the command prompt running, But when i am trying to make it as a service , the service is not starting (it says unable to start with the error code is : 1067, please see the log file which might help you to help me out.

looking forward to hear from you soon.

consul-1594807254178453800.log

@dnephin
Copy link
Contributor

dnephin commented Jul 15, 2020

This line in the log seems relevant. I wonder what sent the interrupt signal.

[INFO]  agent: Caught: signal=interrupt

@jsprojects2
Copy link
Author

Hi,

I am able to run the consul application if the command prompt running, But when i am trying to make it as a service , the service is not starting (it says unable to start with the error code is : 1067, please see the log file which might help you to help me out.

looking forward to hear from you soon.

consul-1594807254178453800.log

what could be the error that we are facing here?

@idrennanvmware
Copy link

Not sure if this helps but it looks like your args aren't been passed in correctly
https://stackoverflow.com/questions/3663331/when-creating-a-service-with-sc-exe-how-to-pass-in-context-parameters indicates bin path can be fickle.

We use win nssm instead of sc and have been very happy with it on windows machines

@ozmeroz
Copy link

ozmeroz commented Aug 24, 2023

hello,Im facing same issue with creating consul(latest version) as windows service on windows server 2019.
service is created succesfully with this command:
sc create consul binpath= "C:\Program Files\Qognify\consul\consul.exe agent --config-dir C:\Program Files\Qognify\consul\config --server --client 0.0.0.0" start= auto

but wont start -
image

tried everything, what am I missing?
config file attached.
Thanks in advance,
Oz
config.zip

@journey191
Copy link

journey191 commented Oct 24, 2024

Hi,

I am able to run the consul application if the command prompt running, But when i am trying to make it as a service , the service is not starting (it says unable to start with the error code is : 1067, please see the log file which might help you to help me out.

looking forward to hear from you soon.

consul-1594807254178453800.log

Same question in windows server 2012! It works well in commond line but can not start as a windows service (errcode:1053).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp
Projects
None yet
Development

No branches or pull requests

7 participants