dougou8552 2018-03-24 20:23
浏览 117

运行二进制作为systemd服务不起作用

I have a go project and when I compile it I get your typical binary. If I call the binary directly from the command line with the adequate inputs, it runs perfectly well. I want to make this program part of the systemd ecosystem and the following is my my gobinary.service

[Unit]
Description=Run Go Service

[Service]
WorkingDirectory=/path/to/directory/
ExecStart=/path/to/directory/binary --config config/service.conf
Restart=always

[Install]
WantedBy=multi-user.target

I can start and stop the service using the usual sudo service gobinary start without error messages but the problem is that the program is actually not running because it does not respond to the inputs, namely it has a rabbitmq input queue, despite me sending content to the queue it doesn't react. If however I run the program using the binary directly $ ./binary --config/service.conf everything runs smoothly. How do I troubleshoot this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 shape_predictor_68_face_landmarks.dat
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制