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 后台运行无法启动 #817

Closed
vononions opened this issue Sep 3, 2022 · 5 comments
Closed

Windows 后台运行无法启动 #817

vononions opened this issue Sep 3, 2022 · 5 comments

Comments

@vononions
Copy link

请按照一下格式提交issue,谢谢!

  1. 你当前使用的是哪个版本的 MinDoc(godoc_linux_amd64 version)?
    mindoc_windows_amd64 2.1

  2. 你当前使用的是什么操作系统?
    Windows 10

  3. 你是如何操作的?
    mindoc_windows_amd64.exe service install

  4. 你期望得到什么结果?
    希望能在后台启动服务

  5. 当前遇到的是什么结果?
    启动失败,提示“Windows 无法启动 Mindoc service 服务(位于 本地计算机 上)。错误 1053: 服务没有及时响应启动或控制请求。”,之前在 2.0 版本是好的。

@gsw945
Copy link
Member

gsw945 commented Sep 17, 2022

先卸载服务,重启系统后,在安装服务试试

@vononions
Copy link
Author

试过了,重新安装也试过,还是不行。

@E834159672
Copy link

我也遇到了相同的问题.

在windows10下面安装

D:\opt\mindoc_windows_amd64> mindoc_windows_amd64.exe service install
2023/03/30 16:35:56.984 [I] [daemon.go:92]  Service installed!

启动服务:

D:\opt\mindoc_windows_amd64> net start mindocd
服务没有响应控制功能。

请键入 NET HELPMSG 2186 以获得更多的帮助。

但是直接运行mindoc_windows_amd64.exe 可以正常使用.

D:\opt\mindoc_windows_amd64>mindoc_windows_amd64.exe
2023/03/30 16:38:08.846 [I] [command.go:38]  正在初始化数据库配置.

2023/03/30 16:38:08.852 [I] [command.go:91]  数据库初始化完成.

MinDoc version =>
build time => Wed 07/20/2022  7:19:00.87
start directory => D:\opt\mindoc_windows_amd64\mindoc_windows_amd64.exe
go version go1.18.2 windows/amd64
2023/03/30 16:38:08.939 [I] [server.go:243]  http server Running on http://:8181

@Micronotestop
Copy link

image
使用的这个脚本可以让程序后台运行。在任务管理器手动结束进程。

@echo off

if "%1" == "h" goto begin

mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit

:begin

mindoc_windows_amd64.exe

@gsw945 gsw945 pinned this issue Aug 2, 2023
@gsw945
Copy link
Member

gsw945 commented Aug 23, 2023

windows上如果以服务方式运行有问题,请使用 mindoc-daemon 来作为mindoc 的守护进程,mindoc 使用 v2.2-beta.1 及以上版本

@gsw945 gsw945 closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants