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

windows service could not be started using nssm with 0.8.0, but 0.7.33 is ok. #2189

Closed
bygreencn opened this issue Dec 14, 2015 · 26 comments
Closed
Labels
📦 deployment Related to deployments 📖 documentation Documentation needs more love status: needs feedback Tell me more about it
Milestone

Comments

@bygreencn
Copy link

No description provided.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

Hi, the way Gogs supports Windows service in since 0.8 has been changed: https://gogs.io/docs/installation/install_gogs_on_windows#run-gogs-as-a-service

@unknwon unknwon added 📖 documentation Documentation needs more love status: needs feedback Tell me more about it labels Dec 14, 2015
@unknwon unknwon added this to the 0.9.0 milestone Dec 14, 2015
@andreynering
Copy link
Contributor

Same here. v0.8.0 simply doesn't work anymore. v0.7.33 is OK.

The way Gogs supports Windows service in since 0.8 has been changed.

Does this mean using Gogs with NSSM was discontinued?

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

Does this mean using Gogs with NSSM was discontinued?

Actually I don't know how and why NSSM was working... but recommend way right is using the builtin ability.

@bygreencn
Copy link
Author

1.Useing nssm to building as service run at Local Area Network not just local machine, the configuration file is the same for 0.7.33 and 0.8.0, the first is running correctly, but the second failed.
run_user is an user at win7 system and configure at service correct.

2.Try the link https://gogs.io/docs/installation/install_gogs_on_windows#run-gogs-as-a-service, but it is not worked at local machine also.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

@bygreencn please read my comments.

@bygreencn
Copy link
Author

@unknwon Yes, but i really think something was wrong at version 0.8.0.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

This is the only change relates to Windows: https://github.com/gogits/gogs/pull/2133/files

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

I really know nothing about Windows service, maybe you guys can help...

@bygreencn
Copy link
Author

@unknwon yeah, i think gogs and nssm also set and check the service status, which cause nssm decide the service failed, but the minwinsvc service stub run not correctly. Maybe it is not the best choice.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

Another person had the exactly same problem, he used to use NSSM, but he has successfully changed to minwinsvc now by following the docs.

@bygreencn
Copy link
Author

Also could you please give some manual to compile gogs at windows platform, i want to build it from myself and cancel this pull request. thanks a lot!!!

@andreynering
Copy link
Contributor

@unknwon

I think is kind of potentially breaking change should be tested by more people.

You can always have it in an separated branch first and tell people to test it. If we have sure it works, so it can be merged.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

@bygreencn the docs are pretty much same for Windows, just replace some commands that are not available for Windows: https://gogs.io/docs/installation/install_from_source

@andreynering not many people will test until things break...

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

OK... the ultimate solution again, maybe we should add a build tag?

@unknwon unknwon added the 📦 deployment Related to deployments label Dec 14, 2015
@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

The question is ... if miniwinsvc does do the work, change from NSSM to this is just once forever change.

@andreynering
Copy link
Contributor

I never used miniwinsvc before. I don't even know how it work.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

The link I gave described how it works: https://gogs.io/docs/installation/install_gogs_on_windows#run-gogs-as-a-service

@andreynering
Copy link
Contributor

I tried commenting the import line and NSSM worked again. It seems that we can't use both at the same time.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

So...... do we need a tag to disable this line?

@andreynering
Copy link
Contributor

So...... do we need a tag to disable this line?

Is it possible to make this import optional while compiling? If yes, I think it would be good, at least for some more releases, so people have more time to migrate to the new service mode.

@unknwon
Copy link
Member

unknwon commented Dec 14, 2015

Is it possible to make this import optional while compiling?

Yes, but it does not solve the problem actually... as every binary release will include all tags possible.

@unknwon
Copy link
Member

unknwon commented Dec 18, 2015

What is the status of this issue now?

@andreynering
Copy link
Contributor

I think if you want to support both NSSM and native service you will need to make two separated binaries.

@unknwon
Copy link
Member

unknwon commented Dec 18, 2015

Looks like so... 😭

@unknwon
Copy link
Member

unknwon commented Dec 18, 2015

OK, now in develop branch, need use tags miniwinsvc to enable builtin support, and by default it supports NSSM.

@unknwon
Copy link
Member

unknwon commented Dec 18, 2015

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📦 deployment Related to deployments 📖 documentation Documentation needs more love status: needs feedback Tell me more about it
Projects
None yet
Development

No branches or pull requests

3 participants