sentry 部署

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sentry 部署相关的知识,希望对你有一定的参考价值。

使用的是 self-hosted-21.5.0 版本

问题

问题一:Unable to connect to ​​deb.debian.org​

Building snuba-cleanup
Sending build context to Docker daemon 3.072kB
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM $BASE_IMAGE
---> e2d44d829548
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
---> Running in babd0877ba9a
Get:1 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 Packages [433 kB]
Err:3 http://deb.debian.org/debian buster InRelease
Could not connect to debian.map.fastlydns.net:80 (146.75.114.132), connection timed out Unable to connect to deb.debian.org:http:
Err:4 http://deb.debian.org/debian buster-updates InRelease
Unable to connect to deb.debian.org:http:
Fetched 468 kB in 34s (13.6 kB/s)
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Could not connect to debian.map.fastlydns.net:80 (146.75.114.132), connection timed out Unable to connect to deb.debian.org:http:
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Unable to connect to deb.debian.org:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package cron is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package cron has no installation candidate
Removing intermediate container babd0877ba9a
The command /bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/* returned a non-zero code: 100
Service snuba-cleanup failed to build : Build failed
An error occurred, caught SIGERR on line 4
Cleaning up...

该问题可通过修改对应的 Dockerfile 文件解决:

需改对应的 ./cron/Dockerfile 文件,替换 apt 的源文件

ARG BASE_IMAGE
FROM $BASE_IMAGE
# 添加这以下两行
ADD sources.list /etc/apt/sources.list
RUN apt-get clean

RUN apt-get update && apt-get install -y --no-install-recommends cron && \\
rm -r /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

sources.list 文件如下

deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib


以上是关于sentry 部署的主要内容,如果未能解决你的问题,请参考以下文章

docker下一步步部署sentry

docker下一步步部署sentry

sentry 部署

跨平台应用开发进阶(三十七)uni-app前端监控方案 Sentry 探究

sentry 手动上传sourcemap文件

Sentry有什么作用