CentOs7.x安装部署SeaTunnelWeb遇到的坑

这篇具有很好参考价值的文章主要介绍了CentOs7.x安装部署SeaTunnelWeb遇到的坑。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

CentOs7.x安装部署SeaTunnelWeb遇到的坑

1. 环境

  采用的是虚拟机上安装CentOs7.x,安装java15环境,安装mysql8.0.28,这两步骤省略,之前的文章里面有讲,属于基础环境配置,也比较简单,说明我用的是一台CentOs7.x的虚拟机实例,都安装在一台上面,需要开放8081、3306和5801的防火墙,不然会网络访问不到。

2. SeaTunnel安装部署

2.1下载安装包

export version="2.3.3"
wget "https://archive.apache.org/dist/seatunnel/${version}/apache-seatunnel-${version}-bin.tar.gz"
tar -xzvf "apache-seatunnel-${version}-bin.tar.gz"

2.2 设置环境变量

vi /etc/profile.d/seatunnel.sh
# 新增如下变量
export SEATUNNEL_HOME=/root/apache-seatunnel-2.3.3 #这里设置的是seatunnel的解压目录即可
export PATH=$PATH:$SEATUNNEL_HOME/bin

然后执行source /etc/profile

2.3 安装连接器插件

  进入/root/apache-seatunnel-2.3.3路径下执行安装连接器插件

centos7 安装seatunnel2.3.3,SeaTunnelWeb

sh bin/install-plugin.sh 2.3.3

  可以修改/root/apache-seatunnel-2.3.3/connectors下的plugin-mapping.properties文件,根据需要加入连接器插件,把不需要的连接器插件名称删除留下需要的即可,然后执行上面的安装命令,由于我没有修改这个文件,默认安装的是全部的连接器插件,所以需要一点时间,下载速度取决于网速。

2.4 拷贝jar包到lib下

centos7 安装seatunnel2.3.3,SeaTunnelWeb

2.5 启动命令

  进入/root/apache-seatunnel-2.3.3路径下执行启动命令:

sh bin/seatunnel-cluster.sh -d  -DJvmOption="-Xms1G -Xmx1G"
或者
nohup sh bin/seatunnel-cluster.sh 2>&1 &

  jps查看seatunnel的进程如下:

centos7 安装seatunnel2.3.3,SeaTunnelWeb

  查看logs下的日志均正常输出没有报错,说明启动成功,然后执行下面的官方demo没有报错,说明seatunnel启动是正常的。

2.6 执行官方client提交任务demo

  进入/root/apache-seatunnel-2.3.3路径下执行启动命令:

$SEATUNNEL_HOME/bin/seatunnel.sh --config $SEATUNNEL_HOME/config/v2.batch.config.template

  该命令来自于官网,执行结果如下:

[root@es1 apache-seatunnel-2.3.3]# $SEATUNNEL_HOME/bin/seatunnel.sh --config $SEATUNNEL_HOME/config/v2.batch.config.template
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Loading configuration '/root/apache-seatunnel-2.3.3/config/seatunnel.yaml' from System property 'seatunnel.config'
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Using configuration file at /root/apache-seatunnel-2.3.3/config/seatunnel.yaml
1219, 2023 12:11:20 上午 org.apache.seatunnel.engine.common.config.SeaTunnelConfig
信息: seatunnel.home is /root/apache-seatunnel-2.3.3
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Loading configuration '/root/apache-seatunnel-2.3.3/config/hazelcast.yaml' from System property 'hazelcast.config'
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Using configuration file at /root/apache-seatunnel-2.3.3/config/hazelcast.yaml
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Loading configuration '/root/apache-seatunnel-2.3.3/config/hazelcast-client.yaml' from System property 'hazelcast.client.config'
1219, 2023 12:11:20 上午 com.hazelcast.internal.config.AbstractConfigLocator
信息: Using configuration file at /root/apache-seatunnel-2.3.3/config/hazelcast-client.yaml
2023-12-19 00:11:21,149 INFO  com.hazelcast.client.impl.spi.ClientInvocationService - hz.client_1 [seatunnel] [5.1] Running with 2 response threads, dynamic=true
2023-12-19 00:11:21,233 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is STARTING
2023-12-19 00:11:21,234 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is STARTED
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hazelcast.internal.networking.nio.SelectorOptimizer (file:/root/apache-seatunnel-2.3.3/starter/seatunnel-starter.jar) to field sun.nio.ch.SelectorImpl.selectedKeys
WARNING: Please consider reporting this to the maintainers of com.hazelcast.internal.networking.nio.SelectorOptimizer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2023-12-19 00:11:21,294 INFO  com.hazelcast.client.impl.connection.ClientConnectionManager - hz.client_1 [seatunnel] [5.1] Trying to connect to cluster: seatunnel
2023-12-19 00:11:21,298 INFO  com.hazelcast.client.impl.connection.ClientConnectionManager - hz.client_1 [seatunnel] [5.1] Trying to connect to [localhost]:5801
2023-12-19 00:11:21,352 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is CLIENT_CONNECTED
2023-12-19 00:11:21,352 INFO  com.hazelcast.client.impl.connection.ClientConnectionManager - hz.client_1 [seatunnel] [5.1] Authenticated with server [localhost]:5801:772efc0a-4c18-4a4b-baa7-b82b9ae4a395, server version: 5.1, local address: /127.0.0.1:36095
2023-12-19 00:11:21,356 INFO  com.hazelcast.internal.diagnostics.Diagnostics - hz.client_1 [seatunnel] [5.1] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
2023-12-19 00:11:21,384 INFO  com.hazelcast.client.impl.spi.ClientClusterService - hz.client_1 [seatunnel] [5.1] 

Members [1] {
	Member [localhost]:5801 - 772efc0a-4c18-4a4b-baa7-b82b9ae4a395
}

2023-12-19 00:11:21,421 INFO  com.hazelcast.client.impl.statistics.ClientStatisticsService - Client statistics is enabled with period 5 seconds.
2023-12-19 00:11:21,706 INFO  org.apache.seatunnel.engine.client.job.JobExecutionEnvironment - add common jar in plugins :[]
2023-12-19 00:11:21,733 INFO  org.apache.seatunnel.core.starter.utils.ConfigBuilder - Loading config file from path: /root/apache-seatunnel-2.3.3/config/v2.batch.config.template
2023-12-19 00:11:21,799 INFO  org.apache.seatunnel.core.starter.utils.ConfigShadeUtils - Load config shade spi: [base64]
2023-12-19 00:11:21,848 INFO  org.apache.seatunnel.core.starter.utils.ConfigBuilder - Parsed config file: {
    "env" : {
        "execution.parallelism" : 2,
        "job.mode" : "BATCH",
        "checkpoint.interval" : 10000
    },
    "source" : [
        {
            "schema" : {
                "fields" : {
                    "name" : "string",
                    "age" : "int"
                }
            },
            "row.num" : 16,
            "parallelism" : 2,
            "result_table_name" : "fake",
            "plugin_name" : "FakeSource"
        }
    ],
    "sink" : [
        {
            "plugin_name" : "Console"
        }
    ]
}

2023-12-19 00:11:21,885 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:21,886 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:21,895 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Load SeaTunnelSink Plugin from /root/apache-seatunnel-2.3.3/connectors/seatunnel
2023-12-19 00:11:21,911 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Discovery plugin jar: FakeSource at: file:/root/apache-seatunnel-2.3.3/connectors/seatunnel/connector-fake-2.3.3.jar
2023-12-19 00:11:21,912 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Discovery plugin jar: Console at: file:/root/apache-seatunnel-2.3.3/connectors/seatunnel/connector-console-2.3.3.jar
2023-12-19 00:11:21,915 INFO  org.apache.seatunnel.engine.core.parse.ConfigParserUtil - Currently, incorrect configuration of source_table_name and result_table_name options don't affect job running. In the future we will ban incorrect configurations.
2023-12-19 00:11:21,915 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:21,915 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:21,916 WARN  org.apache.seatunnel.engine.core.parse.ConfigParserUtil - This configuration is not recommended. A source/transform(FakeSource) is configured with 'result_table_name' option value of 'fake', but subsequent transform/sink(Console) is not configured with 'source_table_name' option.
2023-12-19 00:11:21,919 INFO  org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser - start generating all sources.
2023-12-19 00:11:21,919 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:21,953 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Load SeaTunnelSource Plugin from /root/apache-seatunnel-2.3.3/connectors/seatunnel
2023-12-19 00:11:21,970 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Discovery plugin jar: FakeSource at: file:/root/apache-seatunnel-2.3.3/connectors/seatunnel/connector-fake-2.3.3.jar
2023-12-19 00:11:21,974 INFO  org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery - Load plugin: PluginIdentifier{engineType='seatunnel', pluginType='source', pluginName='FakeSource'} from classpath
2023-12-19 00:11:22,003 INFO  org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser - start generating all transforms.
2023-12-19 00:11:22,003 INFO  org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser - start generating all sinks.
2023-12-19 00:11:22,004 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:22,011 INFO  org.apache.seatunnel.api.configuration.ReadonlyConfig - Config uses fallback configuration key 'plugin_name' instead of key 'factory'
2023-12-19 00:11:22,090 INFO  org.apache.seatunnel.engine.client.job.ClientJobProxy - Start submit job, job id: 789162834679300097, with plugin jar [file:/root/apache-seatunnel-2.3.3/connectors/seatunnel/connector-fake-2.3.3.jar, file:/root/apache-seatunnel-2.3.3/connectors/seatunnel/connector-console-2.3.3.jar]
2023-12-19 00:11:22,893 INFO  org.apache.seatunnel.engine.client.job.ClientJobProxy - Submit job finished, job id: 789162834679300097, job name: SeaTunnel
2023-12-19 00:11:22,956 WARN  org.apache.seatunnel.engine.client.job.JobMetricsRunner - Failed to get job metrics summary, it maybe first-run
2023-12-19 00:11:24,370 INFO  org.apache.seatunnel.engine.client.job.ClientJobProxy - Job (789162834679300097) end with state FINISHED
2023-12-19 00:11:24,416 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - 
***********************************************
           Job Statistic Information
***********************************************
Start Time                : 2023-12-19 00:11:21
End Time                  : 2023-12-19 00:11:24
Total Time(s)             :                   2
Total Read Count          :                  32
Total Write Count         :                  32
Total Failed Count        :                   0
***********************************************

2023-12-19 00:11:24,416 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is SHUTTING_DOWN
2023-12-19 00:11:24,422 INFO  com.hazelcast.client.impl.connection.ClientConnectionManager - hz.client_1 [seatunnel] [5.1] Removed connection to endpoint: [localhost]:5801:772efc0a-4c18-4a4b-baa7-b82b9ae4a395, connection: ClientConnection{alive=false, connectionId=1, channel=NioChannel{/127.0.0.1:36095->localhost/127.0.0.1:5801}, remoteAddress=[localhost]:5801, lastReadTime=2023-12-19 00:11:24.411, lastWriteTime=2023-12-19 00:11:24.371, closedTime=2023-12-19 00:11:24.420, connected server version=5.1}
2023-12-19 00:11:24,422 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is CLIENT_DISCONNECTED
2023-12-19 00:11:24,431 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is SHUTDOWN
2023-12-19 00:11:24,433 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - Closed SeaTunnel client......
2023-12-19 00:11:24,433 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - Closed metrics executor service ......
2023-12-19 00:11:24,438 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - run shutdown hook because get close signal

3. SeaTunnel-Web安装部署

3.1 下载安装包

  安装包下在地址如下:

https://seatunnel.apache.org/download

  解压:

tar -zxvf apache-seatunnel-web-bin-${project.version}.tar.gz

  解压目录如下:

centos7 安装seatunnel2.3.3,SeaTunnelWeb

3.2 初始化数据库脚本或修改配置application.yml中的数据库连接信息

3.2.1 不使用它的初始化脚本自动创建

  事先手动执行好脚本,然后在修改application.yml文件中的数据库连接信息

3.2.2 使用脚本初始化数据库

  首先,设置变量如下:

export HOSTNAME="localhost"
export PORT="3306"
export USERNAME="root"
export PASSWORD="123456"

  然后执行:

sh apache-seatunnel-web-bin-2.3.3/script/init_sql.sh

  如果环境变量有冲突需要改下名字和init_sql.sh中的环境变量的名字,可以加一个前缀可以加上前缀`STWEB_ ,然后把init_sql.sh中上面的那几个环境变量也加上这个前缀即可,然后执行初始化命令

3.3 修改端口与数据源

vim conf/application.yml修改端口号和数据源信息

centos7 安装seatunnel2.3.3,SeaTunnelWeb

3.4 两个文件拷贝配置

  需要将apache-seatunnel-2.3.3/config/hazelcast-client和apache-seatunnel-2.3.3/connectors/plugin-mapping.properties文件拷贝到apache-seatunnel-web-bin-2.3.3的conf下。

3.5 拷贝jar到lib下

centos7 安装seatunnel2.3.3,SeaTunnelWeb

3.6 启动

sh bin/seatunnel-backend-daemon.sh start

jps查看java进程如下:

centos7 安装seatunnel2.3.3,SeaTunnelWeb

  这里有个很坑的地方就是,执行命令如果是进入bin路径执行,访问首页的时候就会有问题,访问首页就会报404的错

sh seatunnel-backend-daemon.sh start

  访问首页报错如下:

centos7 安装seatunnel2.3.3,SeaTunnelWeb

3.7 访问首页

  访问ip:8081/ui,此端口为conf/application.yml中配置的端口

http://192.168.1.4:8081/

centos7 安装seatunnel2.3.3,SeaTunnelWeb

  登录不上有可能是没有启动mysql数据库

service mysqld start   #使用service启动mysql服务
service mysqld status  #查看MYSQL运行状态
service mysqld stop    #使用service停止mysql服务
service mysqld restart #使用service重启mysql服务
systemctl enable mysqld.service #设置MySQL服务开机自动启动
systemctl is-enabled mysqld.service #确认MySQL服务已经被设置为自动启动

centos7 安装seatunnel2.3.3,SeaTunnelWeb

3.8 执行myslq-jdbc–>mysl-jdbc的单表数据同步

  执行是成功的,但是在我的CentOs7.x的虚拟机上我是没有安装hadoop3.1.3的环境,执行看日志是没有报错的,官方说是这个hadoop的环境不是必须的也是有道理的,但是之前的文章在本地调试的时候没有hadoop环境会报错,所以建议需要本地编译构建的小伙伴还是安装一个hadoop,以免执行任务报错。

4. 总结

  本次分享就到此结束了,踩了一些坑,还是请教了官方的大佬才知道的是哪里有问题,希望我的分享对你有所帮助,请一键三连,么么么哒!文章来源地址https://www.toymoban.com/news/detail-786044.html

到了这里,关于CentOs7.x安装部署SeaTunnelWeb遇到的坑的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • CentOS7安装部署Zookeeper

    Apache ZooKeeper 是一个分布式应用程序协调服务;用于维护配置信息、命名、提供分布式同步和组服务。 客户端-服务器模型 :ZooKeeper 遵循客户端-服务器模型,客户端可以向任何服务器节点发起请求。 数据模型 :采用类似文件系统的树形结构来存储数据,每个节点称为 ZNode。

    2024年02月04日
    浏览(49)
  • CentOS7安装和部署Jenkins

    检查旧版: 若已经安装了旧版本,则需要先删除,删除方法: 安装新版: 版本:openjdk version “11.0.18” 2023-01-17 LTS 方法一: 使用wget前可能需要安装wget工具: 下载jenkins的rpm包: 安装: 方法二: 创建repo文件: 导入公钥(这个公钥是为了防止软件被黑客篡改,如果没有公钥

    2024年02月05日
    浏览(43)
  • 腾讯云centos7.6安装部署

    wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-community-server 1.1.1 安装后重启 service mysqld restart 1.1.2 初次安装mysql,root账户没有密码,登录Mysql: mysql -u root  1.1.3 设置密码 mysql set password for \\\'root\\\'@\\\'localhost\\\' =password(\\\'12345

    2024年02月10日
    浏览(35)
  • CentOS7安装部署Redis7

    Linux 发行版: CentOS-7-x86_64-DVD-1804.iso Redis 版本: 7.0.12 Redis Download:https://redis.io/download/ Redis Tag:https://github.com/redis/redis/tags Redis入门和使用实践v2018:https://blog.csdn.net/u011424614/article/details/100170313 [Windows] Redis使用记录:https://blog.csdn.net/u011424614/article/details/101531772 CentOS基础操作

    2024年02月12日
    浏览(37)
  • 在CentOS7安装部署GitLab服务

    官方安装教程:https://about.gitlab.com/install/ 参考安装教程:https://developer.aliyun.com/article/74395 Step1:配置yum源 存入以下内容: Step2:更新本地yum缓存 Step3:安装GitLab社区版 Step4:启动Gitlab Step5:登录并配置Gitlab 打开服务器本地浏览器,访问:127.0.0.1 地址,打开 Gitlab 管理后台,

    2024年02月14日
    浏览(40)
  • CentOS7上部署langchain-chatglm或stable-diffusion可能遇到的Bug的解决方案

    进入你的代码目录下 下载依赖 这里可能有的朋友会有问题会出现某些包下载不了,这里建议直接使用阿里源即可,在确定你的cuda版本之后(使用nvidia-smi确定cuda版本) 命令行执行 卸载掉刚才pip安装的版本!!!!因为此处安装的版本还缺少cuda的支持,确定卸载掉之后 执行 此处X为

    2024年02月16日
    浏览(39)
  • CentOS7---部署Tomcat和安装Jpress

    静态网页: 请求响应信息,发给客户端进行处理,由浏览器进行解析,显示的页面,静态网页包含文本、图像、Flash动画、超链接等内容,在编写网页源代码时已经确定。除非网页源代码被重新修改,否则这些内容不会发生变化。 动态网页: 请求响应信息,发给事务端进行

    2023年04月15日
    浏览(41)
  • 基于CentOS7.9安装部署docker(简洁版)

    官方文档: https://docs.docker.com/engine/install/centos/ 阿里云文档:docker-ce镜像_docker-ce下载地址_docker-ce安装教程-阿里巴巴开源镜像站 # step 1: 安装必要的一些系统工具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 # Step 2: 添加软件源信息 sudo yum-config-manager --add-repo https://mirrors

    2024年02月12日
    浏览(65)
  • CentOS7安装部署Kafka with KRaft

    Apache Kafka 是一个开源分布式事件流平台,已被数千家公司用于高性能数据管道、流分析、数据集成和关键任务应用程序。 KRaft(Kafka Raft)模式是从 Apache Kafka 2.8.0 版本开始引入,KRaft 旨在摒弃对 ZooKeeper 的依赖。在以前的版本中,Apache Kafka 依赖于 ZooKeeper 来管理集群元数据和

    2024年02月04日
    浏览(47)
  • centos7-docker安装和部署

    1.升级和安装工具 2.修改配置源 使用阿里云配置源 重新加载配置源 3.启动docker 设置开机自启 查看docker状态 docker命令 docker search nginx 搜索镜像 docker pull 名称 下载镜像 docker images 查看镜像 docker rm 容器 删除容器 4.查找nginx镜像并下载 查看镜像内容 启动容器 –name:容器名称

    2024年02月07日
    浏览(57)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包