duanrong5927 2019-02-14 12:21
浏览 1095
已采纳

GCP上的golang =>监听tcp:443:绑定:权限被拒绝

I have an issue trying to setup an https on Google Cloud Platform using golang + let's encrypt

  • I already have a domain targeting the IP of the instance

  • Also I got a let's encrypt certificate and chain saved on /etc/letsencrypt/live/mydomain.com/

  • I already setup myapp to use the cert and configured to run as a service using myapp.service via systemctl

And after all this configurations I always get the next error message:


Feb 14 11:29:47 https https[1982]: 2019/02/14 11:29:47 listen tcp :443: bind: permission denied
Feb 14 11:29:47 https systemd[1]: https.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 11:29:47 https systemd[1]: https.service: Unit entered failed state.
Feb 14 11:29:47 https systemd[1]: https.service: Failed with result 'exit-code'.
  • 写回答

2条回答 默认 最新

  • dongyu8664 2019-02-14 14:49
    关注

    Ok, I just look for more info about CAP_NET_BIND_SERVICE and I found an answer of Scott Stensland inside this other post:

    https://unix.stackexchange.com/questions/455221/setcap-not-found-in-debian-9/455234#455234

    Now looks fixed ... thanks

    But now I have a "open /etc/letsencrypt/live/mydomain.com/cert.pem: permission denied" error :\ (looking for other solutions in progress...)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 有偿求苍穹外卖环境配置
  • ¥15 代码在keil5里变成了这样怎么办啊,文件图像也变了,
  • ¥20 Ue4.26打包win64bit报错,如何解决?(语言-c++)
  • ¥15 clousx6整点报时指令怎么写
  • ¥30 远程帮我安装软件及库文件
  • ¥15 关于#自动化#的问题:如何通过电脑控制多相机同步拍照或摄影(相机或者摄影模组数量大于60),并将所有采集的照片或视频以一定编码规则存放至规定电脑文件夹内
  • ¥20 深信服vpn-2050这台设备如何配置才能成功联网?
  • ¥15 Arduino的wifi连接,如何关闭低功耗模式?
  • ¥15 Android studio 无法定位adb是什么问题?
  • ¥15 C#连接不上服务器,