Giter Club home page Giter Club logo

github-monitor's Introduction

VIPKID GITHUB MONITOR

License


GITHUB MONITOR 是vipkid安全研发团队打造的用于监控Github代码仓库的系统。通过该系统可以及时发现企业内部代码泄露、从而降低由于代码泄露导致的一系列安全风险。用户仅需通过简单的任务配置,即可在分钟级发现代码泄露的情况。项目后端使用 django-rest-framework 开发,前端使用 reactantd-pro 开发。

系统特点

  • 分钟级监控
  • 简单且灵活的任务配置
  • 邮件提醒
  • github token管理
  • 支持docker一键部署
  • 运行十分稳定

安装指南

首先将代码clone到本地:

git clone https://github.com/VKSRC/Github-Monitor.git

1. docker 部署

我们推荐使用Docker进行部署, 相对于源码部署更为简单和快速。

部署前请务必先安装Dockerdocker-compose

修改配置文件

首先复制根目录的.env.docker并重命名为.env,修改其中的Email Settingsinitial Administrator配置。这两个配置分别控制邮件提醒,以及初始管理帐号密码。

注意: 如果需要访问的地址不是127.0.0.1localhost, 需要修改ALLOWED_HOST参数,将访问地址加到里面, 如: ALLOWED_HOSTS="127.0.0.1,localhost,github.sec.vipkid.com.cn"

一键启动

docker-compose up -d

访问http://127.0.0.1:8001即可看到页面。

注意: 第一次启动由于mysql容器启动时间较久,可能会用30s左右的时间,页面才可以正常访问

修改启动端口

如果想修改启动端口,可以修改docker-compose.yaml文件中web容器的ports

默认为8001:80,比如要修改为8080端口可改为8080:80

2. 源码部署:

项目运行依赖 redis, 请在运行服务前启动redis-server


首先将.env.sample复制一份重命名为.env,并按照自己的要求修改配置:

# Django Settings
DEBUG="True"  # Django后台是否以debug模式运行, 可选True/False
ALLOWED_HOSTS="*,127.0.0.1,localhost"  # 配置Django Allowed_Hosts, 如果DEBUG为False, 需要将访问的host地址添加进来,如'localhost,github.vipkid.com.cn'

# Database Settings
# DATABASE choice is mysql or sqlite
DATABASE="sqlite"  # 数据库类型, 可选sqlite或mysql
DB_NAME="github"  # 数据库名称
DB_HOST="127.0.0.1"  # mysql host
DB_PORT="3306"  # mysql port
DB_USER="root"  # mysql用户名
DB_PASSWORD="vipkid@2018"  # mysql密码

# Redis Settings
REDIS_HOST="127.0.0.1"  # redis host
REDIS_PORT="6379"  # redis port
REDIS_PASSWORD=""  # redis password

# Email Settings
# If you do not fill it in, it is None/False
EMAIL_HOST="smtp.example.com"  # smtp host
EMAIL_PORT="25"  # smtp port
FROM_EMAIL="[email protected]"  # 发件人
EMAIL_HOST_USER="[email protected]"  # email user, 如为匿名发送,将值设为空字符即可
EMAIL_HOST_PASSWORD="password123!@#"  # email password, 如为匿名发送,将值设为空字符即可
EMAIL_USE_TLS="False"  # 与SMTP服务器通信时是否使用TLS(安全)连接, 可选True/False
EMAIL_USE_SSL="False"  # 与SMTP服务器通信时是否使用SSL(安全)连接, 可选True/False

# initial Administrator
INIT_ADMIN_USERNAME="admin"  # 初始化系统用户使用的用户名
INIT_ADMIN_PASSWORD="password123!@#"  # 初始化系统用户使用的用户密码

  • 后端代码运行部署:

测试环境可以使用django runserver的方式来进行部署,生产环境建议使用uwsgi + Nginx的方式部署,配置文件的示例可以参考 配置 目录下的文件。

  1. 进入项目根目录下的server目录

  2. 配置virtualenv环境(建议)

  3. 在mysql里创建数据库(如使用sqlite、请忽略此步):

    登录进mysql后, 执行 CREATE DATABASE IF NOT EXISTS github DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_bin;

  4. 在server目录下执行如下脚本:

# 安装python依赖
pip3 install -r requirements.pip -i http://pypi.doubanio.com/simple --trusted-host pypi.doubanio.com
# 初始化数据库
python3 manage.py migrate
# 初始化用户账号
python3 manage.py init_admin
# 启动web后端服务:
python3 manage.py runserver 127.0.0.1:8001
# 启动监控任务服务:
python3 manage.py monitor_task_service

  • 前端代码部署:

测试环境可以使用 npm run start 方式启动, 生产环境建议先通过 npm run build生成静态文件,然后通过nginx做转发来做。

  1. 进入项目根目录下的client目录
  2. 如果后端接口地址不为 127.0.0.1:8001, 需要修改config/config.local.js, 将target修改为后端地址即可
  3. 执行: npm install && npm run start

使用手册

1.添加Token

Github Monitor使用Github REST API v3接口进行搜索,所以需要预先配置Token进行认证。

首先登录Github,然后进入Token配置页面创建Token。

随后把Token添加到Github Monitor中。

Github API有次数限制,1分钟最多请求30次,为了提高爬取速度,Github Monitor支持添加多个Token。

2.添加监控任务

如图:

  • 任务名称:仅做标记使用,无实际意义。
  • 关键词:支持多个关键词,每行一个,支持Github REST API v3搜索语法,如:vipkid extension:java,只搜索java后缀文件。
  • 忽略帐号:不支持模糊匹配,忽略指定帐号下的仓库,同样支持多个帐号,换行分隔。
  • 忽略仓库:支持模糊匹配,比如:github.io,可忽略test.github.iovipkid.github.io等仓库。
  • 邮箱:可为空,不填则不会邮件提醒。
  • 爬取页数:默认5页,每页50条数据。
  • 爬取间隔:默认60分钟,可根据自己需求修改。

3.确认/忽略风险

如图:

爬虫爬取到的数据会入库,可以在查询系统中进行操作,进行处理/加白/忽略仓库操作。

  • 处理:确认有风险,需要处理。
  • 加白:确认无风险,以后不会再提醒,如果文件有修改,还是会再次提醒。
  • 忽略仓库:批量加白该仓库下已经发现的信息。

联系我们

关注VKSRC微信公众号,有任何建议和意见都可以发送到公众号/提交Issue。

Wechat

github-monitor's People

Contributors

anyemowang avatar manassehzhou avatar tuuunya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-monitor's Issues

docker 成功安装后访问web界面一闪而过

docker 成功安装后访问http://127.0.0.1:8001 web界面一闪而过,直接跳转到http://127.0.0.1:8001/list页面,页面空白。右键源代码如下:

  <title>Github Monitor</title><script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.9.6/dist/data-set.min.js"></script><script>window.routerBase = "/";</script>
 
  <script>
  window.less = {
  async: false,
  env: 'production'
  };
  </script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js"></script>
 
<script src="/umi.js"></script><script>(function(){
  if (!location.port) {
  (function (i, s, o, g, r, a, m) {
  i['GoogleAnalyticsObject'] = r;
  i[r] = i[r] || function () {
  (i[r].q = i[r].q || []).push(arguments)
  }, i[r].l = 1 * new Date();
  a = s.createElement(o),
  m = s.getElementsByTagName(o)[0];
  a.async = 1;
  a.src = g;
  m.parentNode.insertBefore(a, m)
  })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
  ga('create', 'UA-72788897-6', 'auto');
  ga('send', 'pageview');
  }
  })();</script>

邮箱告警未测试成功

邮箱告警没测试成功,是不是163邮箱的不好用呀,可以推荐个邮箱吗?我已经使用授权码登陆了,还是没有收到邮件。可以详细说一下 邮箱告警的设置过程吗?跪求。

添加任务之后报错

401 {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}
Traceback (most recent call last):
File "/opt/Github-Monitor/server/github_monitor/apps/monitor/processors.py", line 67, in search_by_keyword_thread
total = min(response.totalCount, 1000)
File "/usr/local/python3Dir/lib/python3.6/site-packages/github/PaginatedList.py", line 155, in totalCount
headers=self.__headers
File "/usr/local/python3Dir/lib/python3.6/site-packages/github/Requester.py", line 264, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
File "/usr/local/python3Dir/lib/python3.6/site-packages/github/Requester.py", line 275, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.BadCredentialsException: 401 {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}

服务启动完成页面无法访问

您好。我是通过docker方式部署的,部署完成没有报错,8001端口也起来了,但是无法通过页面访问。不知道是何原因?求解。

  • [root@localhost Github-Monitor]# docker-compose restart
  • Restarting github-monitor_web_1 … done
  • Restarting github-monitor_mysql_1 … done
  • [root@localhost Github-Monitor]#
  • [root@localhost Github-Monitor]# netstat -an|grep 8001
  • tcp6 0 0 :::8001 :::* LISTEN
  • [root@localhost Github-Monitor]#
  • [root@localhost Github-Monitor]# curl http://127.0.0.1:8001
  • curl: (56) Recv failure: Connection reset by peer
  • [root@localhost Github-Monitor]#
  • [root@localhost Github-Monitor]# curl http://localhost:8001
  • curl: (56) Recv failure: Connection reset by peer
  • [root@localhost Github-Monitor]#

docker-compose up -d启动失败

W: The repository 'http://mirrors.aliyun.com/ubuntu xenial Release' does not have a Release file.
W: The repository 'http://mirrors.aliyun.com/ubuntu xenial-updates Release' does not have a Release file.
W: The repository 'http://mirrors.aliyun.com/ubuntu xenial-backports Release' does not have a Release file.
W: The repository 'http://mirrors.aliyun.com/ubuntu xenial-security Release' does not have a Release file.
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial/main/binary-amd64/Packages Connection failed [IP: 42.81.12.220 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages Connection failed [IP: 124.238.244.234 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial-backports/main/binary-amd64/Packages Connection failed [IP: 42.81.4.215 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages Connection failed [IP: 42.81.12.219 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update' returned a non-zero code: 100

突然报错

TypeError: Cannot read property 'map' of undefined
image

几个小问题

1 如果邮件想启用ssl

  EMAIL_USE_TLS=
  EMAIL_USE_SSL=

这两个参数怎么设置
2 token需要哪些权限,还是全给
3 添加token的时候提示添加成功(给的是全部权限),但是下面显示500错误,这个应该怎么排错呢

数据清楚

请问隔断时间怎么清空任务中爬取的数据啊

定期执行|手动启动

1.目前貌似没有看到自定义多长时间执行一次任务;
2.手动执行,我之前添加的关键字,我现在想手动执行一次功能是否考虑;

可以支持多关键词匹配吗

例如达到以下这种效果:
image

我配置多个关键词的时候,貌似爬取的时候是只能一个一个关键词匹配,例如以下这样:
image

image

docker启动就一直卡这里了。。。

[root@localhost Github-Monitor]# docker-compose up -d
Creating network "github-monitor_default" with the default driver
Pulling mysql (mysql:5.7)...
5.7: Pulling from library/mysql

docker启动就一直卡这里了。。。

支持MAC平台吗?

npm start时报错 :
Starting Umi UI using [email protected]...
🧨 Ready on http://localhost:3000/
✖ error [hardSource] is no longer valid. Please remove it from the configuration file.

Warning: umi-plugin-polyfills has been deprecated.
use config.targets instead.

Building dll...

✖ Webpack
Compiled with some errors in 12.31s

ERROR Failed to compile with 1 errors 下午2:46:30

This dependency was not found:

  • ws in ./node_modules/puppeteer/lib/WebSocketTransport.js

To install it, you can run: npm install --save ws

ERROR CODE ERR_WEBPACK_DLL_MODULE_NOT_FOUND

DETAILS

npm install --save ws尝试过了也不行

根据官方镜像部署报错

Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/docker/Github-Monitor/server/github_monitor/apps/monitor/processors.py", line 63, in search_by_keyword_thread
session, _token = self._new_session()
File "/home/docker/Github-Monitor/server/github_monitor/apps/monitor/processors.py", line 51, in _new_session
token = self.get_available_token()
File "/home/docker/Github-Monitor/server/github_monitor/apps/monitor/processors.py", line 41, in get_available_token
key = key.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 0: invalid start byte

邮件发送问题

请问邮件发送怎么没有收件人的配置,那邮件提醒是发到哪里去呢?

本地安装时 npm install && npm run start 各种报错

麻烦提供一下本地安装的node,npm版本号。猜测是版本号导致的问题
1258 error TypeError: Cannot read property 'latest' of undefined
1258 error at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
1258 error at /usr/lib/node_modules/npm/lib/cache.js:675:5
1258 error at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
1258 error at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
1258 error at Object.oncomplete (fs.js:108:15)
1259 error If you need help, you may report this log at:
1259 error http://github.com/isaacs/npm/issues
1259 error or email it to:
1259 error [email protected]
1260 error System Linux 2.6.32-573.22.1.el6.x86_64
1261 error command "node" "/usr/bin/npm" "install"
1262 error cwd /opt/web/Github-Monitor/client
1263 error node -v v0.10.48
1264 error npm -v 1.3.6
1265 error type non_object_property_load
1266 verbose exit [ 1, true ]

UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 49: illegal multibyte sequence

(env) D:\zxdf\Workspaces\myworkspace\Github-Monitor\server>python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\django\core\management_init_.py", line 371, in execute_fro
m_command_line
utility.execute()
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\django\core\management_init_.py", line 317, in execute
settings.INSTALLED_APPS
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\django\conf_init_.py", line 56, in getattr
self.setup(name)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\django\conf_init
.py", line 43, in setup
self.wrapped = Settings(settings_module)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\django\conf_init
.py", line 106, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\github_monitor\settings.py", line 18, in
load_dotenv(dotenv_path=os.path.join(BASE_DIR, '..', '.env'), override=True)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\dotenv\main.py", line 309, in load_dotenv
return DotEnv(f, verbose=verbose).set_as_environment_variables(override=override)
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\dotenv\main.py", line 129, in set_as_environment_variables
for k, v in self.dict().items():
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\dotenv\main.py", line 115, in dict
values = OrderedDict(self.parse())
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\dotenv\main.py", line 121, in parse
for mapping in parse_stream(stream):
File "D:\zxdf\Workspaces\myworkspace\Github-Monitor\server\env\lib\site-packages\dotenv\main.py", line 83, in parse_stream
string = stream.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 49: illegal multibyte sequence

(env) D:\zxdf\Workspaces\myworkspace\Github-Monitor\server>

关闭或者重启容器的时候是否会抹除数据

使用docker部署的时候,是会构建一个mysql数据库容器的,这个mysql数据库是只用来存放管理员账号密码的数据吗?是否还有保存其他数据的用途?
另外,redis数据库是内建在Github-Monitor容器里吗?redis保存的时什么数据,关闭或者重启容器的时候是否会抹除数据。

总的来说就是,使用docker部署的话,关闭或者重启容器的时候是否会抹除数据,例如加白名单的数据

docker启动卡在apt-get update这里

RUN apt-get update
 ---> Running in 7d609c0665b1
Get:1 http://mirrors.aliyun.com/ubuntu xenial InRelease [247 kB]
Get:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://mirrors.aliyun.com/ubuntu xenial-security InRelease [107 kB]
Ign:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
Get:5 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages [1163 kB]
Err:5 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages
  Hash Sum mismatch
Get:6 http://mirrors.aliyun.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:7 http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 Packages [922 kB]
Get:8 http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse amd64 Packages [19.0 kB]
Get:9 http://mirrors.aliyun.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:10 http://mirrors.aliyun.com/ubuntu xenial-backports/universe amd64 Packages [8532 B]
Get:11 http://mirrors.aliyun.com/ubuntu xenial-security/main amd64 Packages [762 kB]
Get:12 http://mirrors.aliyun.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:13 http://mirrors.aliyun.com/ubuntu xenial-security/universe amd64 Packages [519 kB]
Err:13 http://mirrors.aliyun.com/ubuntu xenial-security/universe amd64 Packages
  Hash Sum mismatch
Get:14 http://mirrors.aliyun.com/ubuntu xenial-security/multiverse amd64 Packages [4026 B]
Fetched 4001 kB in 1s (3099 kB/s)
Reading package lists...
W: GPG error: http://mirrors.aliyun.com/ubuntu xenial InRelease: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>
W: The repository 'http://mirrors.aliyun.com/ubuntu xenial InRelease' is not signed.
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial-updates/main/binary-amd64/by-hash/SHA256/bbde783bab4b7d54ccf184ab9dba0a4cecaaa4c0fdab19fed626ee5b5930800a  Hash Sum mismatch
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/xenial-security/universe/binary-amd64/by-hash/SHA256/76ba9be700171745ac24cba9f6959ccaf03c0748d5462449e174ae269db17041  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

访问报500错误

通过docker部署,进入容器shell中修改了邮箱配置,restart后报500错误。求解
image

功能问题

1.很奇怪,我把任务删除了。在添加相同的任务就无法抓取了
2.建议增加token删除功能

如何修改爬取类型

如何修改爬取类型,比如说 我现在想完全不关注ipynb这个类型的结果,如何设置呢。在使用说明里面没有看到设置。

还有 在哪里有结果搜索的功能设置,比如我现在想只看.conf类的结果

什么 时候有批量忽略的功能啊,比如一版的结果都不是我要的,直接选择批量忽略

功能问题

建议添加删除token功能,以及批量处理内容如加白忽略等

邮件发送告警但告警的内容在平台中没有。

邮件发送告警但告警的内容在平台中没有。
邮件内容里面有一个XXX项目涉及泄露源码了,但是实际到平台 看却没有这个邮件中的内容。其他扫到的内容有,但是邮件通知的内容没有。

邮件发送不成功

邮件发送是在检测完毕发送吗? 没有收到邮件,请问邮件这一块的日志在哪里看?
我想知道为什么没有成功。

web容器启动失败

使用docker方法安装,docker和docker-compose已装好。配置文件没有修改。使用docker-compose启动时只有mysql容器启动成功。启动日志:
Attaching to githubmonitor_web_1, githubmonitor_mysql_1
web_1 | /bin/bash: /home/docker/Github-Monitor/docker/run.sh: Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied
mysql_1 | chown: cannot read directory '/var/lib/mysql/': Permission denied

邮件无法发送

env文件里已经配置好了,邮件服务器是开启TLS的,smtp端口465,tls和ssl都设为true,任务里已经填了收件人,还是没收到邮件,看邮件服务器的日志里面没有连接日志,就是说根本没有发起过邮件发送连接
请问如何排查,thx

运行bug

请问为什么任务建立40个以后,后面再建立的就不运行了

TypeError: _this.load is not a function

TypeError: _this.load is not a function
new DynamicComponent
node_modules/_dva@2.4.1@dva/lib/dynamic.js:67
64 | AsyncComponent: null
65 | };
66 |

67 | _this.load();
| ^ 68 |
69 | return _this;
70 | }
View compiled
constructClassInstance
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:11326
11323 | }
11324 | }
11325 |
11326 | var instance = new ctor(props, context);
| ^ 11327 | var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
11328 | adoptClassInstance(workInProgress, instance);
11329 |
View compiled
updateClassComponent
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:14652
14649 | workInProgress.effectTag |= Placement;
14650 | }
14651 | // In the initial pass we might need to construct the instance.
14652 | constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
| ^ 14653 | mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
14654 | shouldUpdate = true;
14655 | } else if (current$$1 === null) {
View compiled
beginWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:15609
15606 | var _Component2 = workInProgress.type;
15607 | var _unresolvedProps = workInProgress.pendingProps;
15608 | var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
15609 | return updateClassComponent(current$$1, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
| ^ 15610 | }
15611 | case HostRoot:
15612 | return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
View compiled
performUnitOfWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19277
19274 | startProfilerTimer(workInProgress);
19275 | }
19276 |
19277 | next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
| ^ 19278 | workInProgress.memoizedProps = workInProgress.pendingProps;
19279 |
19280 | if (workInProgress.mode & ProfileMode) {
View compiled
workLoop
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19317
19314 | if (!isYieldy) {
19315 | // Flush work without yielding
19316 | while (nextUnitOfWork !== null) {
19317 | nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
| ^ 19318 | }
19319 | } else {
19320 | // Flush asynchronous work until there's a higher priority event
View compiled
HTMLUnknownElement.callCallback
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:149
146 | window.event = windowEvent;
147 | }
148 |
149 | func.apply(context, funcArgs);
| ^ 150 | didError = false;
151 | }
152 |
View compiled
invokeGuardedCallbackDev
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:199
196 | // Synchronously dispatch our fake event. If the user-provided function
197 | // errors, it will trigger our global error handler.
198 | evt.initEvent(evtType, false, false);
199 | fakeNode.dispatchEvent(evt);
| ^ 200 |
201 | if (windowEventDescriptor) {
202 | Object.defineProperty(window, 'event', windowEventDescriptor);
View compiled
invokeGuardedCallback
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:256
253 | function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
254 | hasError = false;
255 | caughtError = null;
256 | invokeGuardedCallbackImpl$1.apply(reporter, arguments);
257 | }
258 |
259 | /**
View compiled
replayUnitOfWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:18543
18540 | // Replay the begin phase.
18541 | isReplayingFailedUnitOfWork = true;
18542 | originalReplayError = thrownValue;
18543 | invokeGuardedCallback(null, workLoop, null, isYieldy);
| ^ 18544 | isReplayingFailedUnitOfWork = false;
18545 | originalReplayError = null;
18546 | if (hasCaughtError()) {
View compiled
renderRoot
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19433
19430 | if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
19431 | if (mayReplay) {
19432 | var failedUnitOfWork = nextUnitOfWork;
19433 | replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy);
| ^ 19434 | }
19435 | }
19436 |
View compiled
performWorkOnRoot
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20307
20304 | // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
20305 | cancelTimeout(timeoutHandle);
20306 | }
20307 | renderRoot(root, isYieldy);
| ^ 20308 | finishedWork = root.finishedWork;
20309 | if (finishedWork !== null) {
20310 | // We've completed the root. Commit it.
View compiled
performWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20219
20216 | }
20217 | } else {
20218 | while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime) {
20219 | performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false);
| ^ 20220 | findHighestPriorityRoot();
20221 | }
20222 | }
View compiled
performSyncWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20193
20190 | }
20191 |
20192 | function performSyncWork() {
20193 | performWork(Sync, false);
20194 | }
20195 |
20196 | function performWork(minExpirationTime, isYieldy) {
View compiled
requestWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20062
20059 |
20060 | // TODO: Get rid of Sync and use current time?
20061 | if (expirationTime === Sync) {
20062 | performSyncWork();
| ^ 20063 | } else {
20064 | scheduleCallbackWithExpirationTime(root, expirationTime);
20065 | }
View compiled
scheduleWork
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19876
19873 | // ...unless this is a different root than the one we're rendering.
19874 | nextRoot !== root) {
19875 | var rootExpirationTime = root.expirationTime;
19876 | requestWork(root, rootExpirationTime);
| ^ 19877 | }
19878 | if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
19879 | // Reset this back to zero so subsequent updates don't throw.
View compiled
scheduleRootUpdate
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20537
20534 |
20535 | flushPassiveEffects();
20536 | enqueueUpdate(current$$1, update);
20537 | scheduleWork(current$$1, expirationTime);
20538 |
20539 | return expirationTime;
20540 | }
View compiled
updateContainerAtExpirationTime
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20565
20562 | container.pendingContext = context;
20563 | }
20564 |
20565 | return scheduleRootUpdate(current$$1, element, expirationTime, callback);
20566 | }
20567 |
20568 | function findHostInstance(component) {
View compiled
updateContainer
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20622
20619 | var current$$1 = container.current;
20620 | var currentTime = requestCurrentTime();
20621 | var expirationTime = computeExpirationForFiber(currentTime, current$$1);
20622 | return updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback);
20623 | }
20624 |
20625 | function getPublicRootInstance(container) {
View compiled
ReactRoot../node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js.ReactRoot.render
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20918
20915 | if (callback !== null) {
20916 | work.then(callback);
20917 | }
20918 | updateContainer(children, root, null, work._onCommit);
20919 | return work;
20920 | };
20921 | ReactRoot.prototype.unmount = function (callback) {
View compiled
(anonymous function)
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21055
21052 | if (parentComponent != null) {
21053 | root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback);
21054 | } else {
21055 | root.render(children, callback);
| ^ 21056 | }
21057 | });
21058 | } else {
View compiled
unbatchedUpdates
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20424
20421 | isUnbatchingUpdates = false;
20422 | }
20423 | }
20424 | return fn(a);
20425 | }
20426 |
20427 | // TODO: Batching should be implemented at the renderer level, not within
View compiled
legacyRenderSubtreeIntoContainer
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21051
21048 | };
21049 | }
21050 | // Initial mount should not be batched.
21051 | unbatchedUpdates(function () {
| ^ 21052 | if (parentComponent != null) {
21053 | root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback);
21054 | } else {
View compiled
render
node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21120
21117 | {
21118 | !!container._reactHasBeenPassedToCreateRootDEV ? warningWithoutStack$1(false, 'You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.%s(). This is not supported. ' + 'Did you mean to call root.render(element)?', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0;
21119 | }
21120 | return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
| ^ 21121 | },
21122 | unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) {
21123 | !isValidContainer(containerNode) ? invariant(false, 'Target container is not a DOM element.') : void 0;
View compiled
oldRender
src/pages/.umi/umi.js:23
20 | const rootContainer = window.g_plugins.apply('rootContainer', {
21 | initialValue: React.createElement(require('./router').default),
22 | });
23 | ReactDOM.render(
| ^ 24 | rootContainer,
25 | document.getElementById('root'),
26 | );
View compiled
(anonymous function)
node_modules/_umi@2.6.10@umi/lib/runtimePlugin.js:60
57 | var initialValue = _ref.initialValue;
58 | if (typeof item === 'string') item = getItem(item);
59 | return function () {
60 | return _compose.apply(void 0, _toConsumableArray(item).concat([initialValue]))();
61 | };
62 | }
63 | export function apply(item, _ref2) {
View compiled
(anonymous function)
src/pages/.umi/umi.js:33
30 | const moduleBeforeRendererPromises = [];
31 |
32 | Promise.all(moduleBeforeRendererPromises).then(() => {
33 | render();
34 | }).catch((err) => {
35 | window.console && window.console.error(err);
36 | });
View compiled

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.