• 分布式任务调度系统xxljob搭建(基于docker)


    https://cloud.tencent.com/developer/article/1589455

    https://zhuanlan.zhihu.com/p/309634128

    一、简介

    XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是开发迅速、学习简单、轻量级、易扩展。现已开放源代码并接入多家公司线上产品线,开箱即用。

    更多介绍,请访问官网:

    http://www.xuxueli.com/xxl-job/#/

    接下来,本文将详细介绍,如何安装XXL-JOB

    本文所使用的操作系统为: ubuntu-16.04.5-server-amd64

    二、安装MySQL(docker)

    安装方式

    xxl-job 依赖 mysql,所以必须要安装mysql才行!安装mysql有2种方式:

    1. 在线安装或者编译安装

    2. 使用docker

    如果直接使用apt-get 在线安装,使用以下命令:

    apt-get install -y mysql-server

    在安装过程中,会提示输出root密码,注意:必须输入密码为 root_pwd,下面会介绍到!

    注意:默认的配置文件是监听127.0.0.1,因此还需要修改 /etc/mysql/mysql.conf.d/mysqld.cnf ,修改bind参数为0.0.0.0

    安装完成之后,mysql就启动了!

    基于docker安装

    本文主要介绍,如何使用docker安装mysql。下载镜像

    docker pull mysql

    默认是下载 latest 标签的mysql,那么版本是多少呢?访问以下链接:

    https://hub.docker.com/_/mysql/

    可以发现,latest 对应的版本应该是 8.0.13

    导入表

    下载项目

    访问github地址:

    https://github.com/xuxueli/xxl-job

    查看releases版本

    https://github.com/xuxueli/xxl-job/releases

    最新版本是2.0.1,下载zip包

    将zip包上传至/opt 目录下,然后进行解压

    cd /opt/apt-get install -y unzipunzip xxl-job-2.0.1.zip

    进入db目录,其中 tables_xxl_job.sql 就是我们要导入的sql文件

    root@ubuntu:~# cd /opt/xxl-job-2.0.1/doc/db/
    root@ubuntu:/opt/xxl-job-2.0.1/doc/db# ll
    total 28
    drwxr-xr-x 2 root root 4096 Nov  9 09:58 ./
    drwxr-xr-x 4 root root 4096 Nov  9 09:58 ../
    -rw-r--r-- 1 root root 5241 Nov  9 09:58 tables_mysql(备份,请忽略).sql
    -rw-r--r-- 1 root root 9293 Nov  9 09:58 tables_xxl_job.sql

    正式导入

    先启动mysql 镜像,指定密码为123456,映射目录/opt,指定默认编码为utf-8

    注意:密码不要包含感叹号,否则会导致xxl-job启动失败!

    docker run -e MYSQL_ROOT_PASSWORD=123456  -p 3306:3306  -v /opt:/opt mysql  --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

    输出如下:

    Initializing database
    2019-01-21T07:22:17.704431Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
    2019-01-21T07:22:17.704535Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.13) initializing of server in progress as process 26
    2019-01-21T07:22:27.371624Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
    2019-01-21T07:22:35.750172Z 5 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750311Z 5 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750368Z 5 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750418Z 5 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750483Z 5 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750525Z 5 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750571Z 5 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750735Z 5 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:35.750780Z 5 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:39.791082Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.13) initializing of server has completed
    Database initialized
    MySQL init process in progress...
    2019-01-21T07:22:43.384449Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
    2019-01-21T07:22:43.384578Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 77
    MySQL init process in progress...
    MySQL init process in progress...
    MySQL init process in progress...
    mbind: Operation not permitted
    2019-01-21T07:22:46.085694Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
    2019-01-21T07:22:46.088469Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
    2019-01-21T07:22:46.099211Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099334Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099389Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099437Z 0 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099499Z 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099541Z 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.099585Z 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.177538Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.177655Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:22:46.185438Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.13'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
    2019-01-21T07:22:46.266527Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
    Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
    Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
    Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
    Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
    2019-01-21T07:23:14.078178Z 10 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078298Z 10 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078352Z 10 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078400Z 10 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078569Z 10 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078638Z 10 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078686Z 10 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078889Z 10 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:14.078935Z 10 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
    
    2019-01-21T07:23:16.200048Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.13)  MySQL Community Server - GPL.
    
    MySQL init process done. Ready for start up.
    
    2019-01-21T07:23:17.239758Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
    2019-01-21T07:23:17.239874Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 1
    2019-01-21T07:23:19.211647Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
    2019-01-21T07:23:19.214367Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
    2019-01-21T07:23:19.293300Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.293623Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.293818Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.293995Z 0 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.294464Z 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.294626Z 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.294793Z 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.311834Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.312036Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
    2019-01-21T07:23:19.398254Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.13'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
    2019-01-21T07:23:19.549764Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

    如果有输出:

    /usr/sbin/mysqld: ready for connections. Version: '8.0.13'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.

    则表示,启动mysql成功!可以看到版本确实是8.0.13

    查看docker 进程

    root@ubuntu:~# docker ps
    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
    3c28a71089b4        mysql               "docker-entrypoint..."   44 seconds ago      Up 43 seconds       0.0.0.0:3306->3306/tcp, 33060/tcp   kind_spence

    进入docker,导入sql文件

    root@ubuntu:~# docker exec -it 3c28a71089b4 /bin/bash
    root@3c28a71089b4:/# mysql -u root -p123456
    mysql> exit;

    查看 sql文件

    root@3c28a71089b4:/# cat /opt/xxl-job-2.0.1/doc/db/tables_xxl_job.sql | head -3
    CREATE database if NOT EXISTS `xxl-job` default character set utf8 collate utf8_general_ci;
    use `xxl-job`;

    可以发现,它会判断 xxl-job 数据库是否存在,如果不存在,就会自动创建。

    会自动切换到xxl-job 数据库

    导入sql 文件

    mysql> source /opt/xxl-job-2.0.1/doc/db/tables_xxl_job.sql;
    Query OK, 1 row affected, 2 warnings (0.12 sec)
    ...

    设置权限

    查看默认的授权列表

    mysql> select Host,User,authentication_string from mysql.user;+-----------+------------------+------------------------------------------------------------------------+
    | Host      | User             | authentication_string                                                  |
    +-----------+------------------+------------------------------------------------------------------------+
    | %         | root             | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9                              |
    | localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
    | localhost | mysql.session    | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
    | localhost | mysql.sys        | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
    | localhost | root             | $A$005$QCx{]2[26P-1f|wmEouH1rBifNJZVGQZiH9NBl3SgrUqB319vSHh7FHI96 |
    +-----------+------------------+------------------------------------------------------------------------+
    5 rows in set (0.00 sec)

    可以发现,默认已经将root用户设置了远程访问,也就是%的那条记录。但是密码和localhost的不一样。

    因此,需要修改密码,并刷新权限

    mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; 
    mysql> flush privileges;

    注意:不要使用以下命令,执行会直接报错!

    grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

    测试远程连接

    使用Navicat 新建一个mysql连接

     点击连接测试,效果如下:

    注意:这里必须能够远程访问,因为待会由 xxl-job来连接,必须测试通过,否则会导致xxl-job启动失败!

    三、安装xxl-job

    下载镜像

    docker pull xuxueli/xxl-job-admin

    执行会报错:

    Using default tag: latest
    Error response from daemon: manifest for xuxueli/xxl-job-admin:latest not found

    为什么呢?因为官方没有打 latest 的tag标签,所以会提示下载失败!那怎么下载呢?必须制定版本才可以!

    在上面的内容中,我们已经访问了releases连接,最新版本是2.0.1

    那么下载命令为:

    docker pull xuxueli/xxl-job-admin:2.0.1

    启动镜像

    注意:官方文档,提到了2个命令

    docker run -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin  -d xuxueli/xxl-job-admin
    和
    docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl-job?Unicode=true&characterEncoding=UTF-8" -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin  -d xuxueli/xxl-job-admin

    这2个命令,执行之后,是无法访问8080页面的!

    正确的命令为:

    docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://192.168.0.162:3306/xxl-job?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=root --spring.datasource.password=123456" -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin xuxueli/xxl-job-admin:2.0.1

    上面的红色部分,就是在官方的基础上面改的!指定真实的mysql地址,以及用户和密码。根据实际情况修改!!!

    注意:jdbc的地址不能是127.0.0.1,因为官方的镜像没有mysql。官方的jdbc命令只是单纯的指定了数据库为xxl-job,并没有指定用户名和密码!

    最后一个参数,是镜像地址。注意:必须带版本,否则无法启动

    启动之后,输出如下:

    .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::       (v1.5.17.RELEASE)
    
    14:27:30.705 logback [main] INFO  c.x.job.admin.XxlJobAdminApplication - Starting XxlJobAdminApplication on ab6d93ba81f9 with PID 5 (/app.jar started by root in /)
    14:27:30.797 logback [main] INFO  c.x.job.admin.XxlJobAdminApplication - No active profile set, falling back to default profiles: default
    14:27:39.762 logback [main] INFO  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70f3863: startup date [Mon Jan 21 14:27:39 CST 2019]; root of context hierarchy
    14:27:40.071 logback [background-preinit] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.3.6.Final
    14:28:09.375 logback [main] INFO  o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 8080 (http)
    14:28:09.800 logback [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
    14:28:10.001 logback [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
    14:28:10.002 logback [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/8.5.34
    14:28:11.564 logback [localhost-startStop-1] INFO  o.a.c.c.C.[.[.[/xxl-job-admin] - Initializing Spring embedded WebApplicationContext
    14:28:11.565 logback [localhost-startStop-1] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 31803 ms
    14:28:13.528 logback [localhost-startStop-1] INFO  o.s.b.w.s.ServletRegistrationBean - Mapping servlet: 'dispatcherServlet' to [/]
    14:28:13.617 logback [localhost-startStop-1] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*]
    14:28:13.619 logback [localhost-startStop-1] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
    14:28:13.619 logback [localhost-startStop-1] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/*]
    14:28:13.621 logback [localhost-startStop-1] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]
    14:28:28.676 logback [main] INFO  o.s.s.quartz.SchedulerFactoryBean - Loading Quartz config from [class path resource [quartz.properties]]
    14:28:28.987 logback [main] INFO  org.quartz.impl.StdSchedulerFactory - Using default implementation for ThreadExecutor
    14:28:28.994 logback [main] INFO  org.quartz.simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main
    14:28:29.186 logback [main] INFO  o.quartz.core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
    14:28:29.187 logback [main] INFO  org.quartz.core.QuartzScheduler - Quartz Scheduler v.2.3.0 created.
    14:28:29.288 logback [main] WARN  o.a.tomcat.jdbc.pool.ConnectionPool - maxIdle is larger than maxActive, setting maxIdle to: 30
    Mon Jan 21 14:28:31 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:31 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:31 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Mon Jan 21 14:28:32 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    14:28:32.600 logback [main] INFO  o.s.s.quartz.LocalDataSourceJobStore - Using db table-based data access locking (synchronization).
    14:28:32.605 logback [main] INFO  o.s.s.quartz.LocalDataSourceJobStore - JobStoreCMT initialized.
    14:28:32.607 logback [main] INFO  org.quartz.core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.3.0) 'getSchedulerFactoryBean' with instanceId 'ab6d93ba81f91548052108992'
      Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
      NOT STARTED.
      Currently in standby mode.
      Number of jobs executed: 0
      Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 50 threads.
      Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is clustered.
    
    14:28:32.608 logback [main] INFO  org.quartz.impl.StdSchedulerFactory - Quartz scheduler 'getSchedulerFactoryBean' initialized from an externally provided properties instance.
    14:28:32.608 logback [main] INFO  org.quartz.impl.StdSchedulerFactory - Quartz scheduler version: 2.3.0
    14:28:32.614 logback [main] INFO  org.quartz.core.QuartzScheduler - JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@2914dd79
    14:28:33.031 logback [main] INFO  c.x.r.r.p.XxlRpcProviderFactory - >>>>>>>>>>> xxl-rpc, provider factory add service success. serviceKey = com.xxl.job.core.biz.AdminBiz, serviceBean = class com.xxl.job.admin.service.impl.AdminBizImpl
    14:28:33.236 logback [main] INFO  org.eclipse.jetty.util.log - Logging initialized @78724ms
    14:28:33.236 logback [main] INFO  c.x.j.a.c.s.XxlJobDynamicScheduler - >>>>>>>>> init xxl-job admin success.

    最后一行,输出 init xxl-job admin success. 表示启动成功!

    访问页面

    直接访问:

    http://192.168.0.162:8080

    是没有任何效果的!!!

    真正的访问地址为:

    http://192.168.0.162:8080/xxl-job-admin

    效果如下:

    默认的用户名和密码,已经帮你输入好了

    点击登录,效果如下:

     本文参考官方文档:

    http://www.xuxueli.com/xxl-job/#/

    有很多坑呀,不能傻瓜示的照着敲命令,那样是不行的!

  • 相关阅读:
    css 深入理解
    2018 web经典面试题
    CSS 居中布局
    HTTP首部解析
    http状态码有那些?分别代表是什么意思?
    基本HTTP协议流程是什么?
    JS-变量
    javascript基础1
    css3弹性盒模型(Flexbox)
    文字效果和颜色
  • 原文地址:https://www.cnblogs.com/yipianchuyun/p/16113813.html
Copyright © 2020-2023  润新知