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

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 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失