<p>Hello, I've been trying to incorporate this <a href="https://github.com/coreos/go-systemd/blob/master/examples/activation/httpserver/httpserver.go" rel="nofollow">bit</a> of code into my web service to be able upgrade my software without any downtime.</p>
<p>However, it seems that there's 0 socket and the program will just fail. You can find my specific code <a href="https://github.com/GwentAPI/gwentapi/tree/master/serverService" rel="nofollow">here</a>. If you want to try it out feel free to grab the alpha2 release for linux but you will need to have mongodb running.</p>
<p>I don't really understand what's going on, I successfully took a snapshot of my dev machine and created a new one and it started to work there but as soon as I deleted it and compiled the same version on the other machine it continued complaining that it have 0 socket.</p>
<p>I know that this isn't strictly speaking 100% golang related but this is the sub where I'm most likely to find someone who use go-systemd and know about systemd. Thank you for your help.</p>
<hr/>**评论:**<br/><br/>gwentAPI: <pre><p>The go-systemd activation package doesn't really have good error reporting. This lines is executed: <a href="https://github.com/coreos/go-systemd/blob/master/activation/files.go#L37" rel="nofollow">https://github.com/coreos/go-systemd/blob/master/activation/files.go#L37</a> which down the line will give me an empty array of net.Listener here: <a href="https://github.com/coreos/go-systemd/blob/master/activation/listeners.go#L30" rel="nofollow">https://github.com/coreos/go-systemd/blob/master/activation/listeners.go#L30</a></p>
<p>I still have no clue why it's happening.</p>
<p><strong>edit</strong>: strconv.Atoi: parsing "": invalid syntax. Seems like LISTEN_PID isn't being set. Not sure why or how to fix.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传