一、目的
在kettle8.2在Linux上安装好可以启动界面、并且可以连接MySQL、Hive、ClickHouse等数据库后开始创建共享资源库,但是遇到了一些问题
二、Linux系统以及kettle版本
(一)Linux:CentOS 7 英文的图形化界面模式
(二)kettle:kettle8.2
三、问题
(一)问题一:点击kettle的connect后即报错(Could not load SWT library. Reasons)
1、报错详情
2023/08/10 13:57:21 - Spoon - Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
2023/08/10 13:57:21 - Spoon - no swt-mozilla-gtk-4335 in java.library.path
2023/08/10 13:57:21 - Spoon - no swt-mozilla-gtk in java.library.path
2023/08/10 13:57:21 - Spoon - /root/.swt/lib/linux/x86_64/libswt-mozilla-gtk-4335.so: libxpcom.so: cannot open shared object file: No such file or directory
2023/08/10 13:57:21 - Spoon - Can't load library: /root/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
2023/08/10 13:57:21 - Spoon -
2023/08/10 13:57:21 - Spoon - at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
2023/08/10 13:57:21 - Spoon - at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
2023/08/10 13:57:21 - Spoon - ... 20 more
2、解决措施:安装xulrunner
(1)第一步,下载安装包(直接复制下载网址链接,自动下载)
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2012/03/2012-03-02-03-32-11-mozilla-1.9.2/xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar.bz2?cm_mc_uid=08168416471414670141294&cm_mc_sid_50200000=1497942238
(2)第二步,下载好后把xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar放在平时自己的Linux下载文件夹
(3)第三步,在Linux中打开安装包所在地
[root@hurys22 ~]# cd /opt/install/
[root@hurys22 install]# ls
xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar
(4)第四步,解压安装包
[root@hurys22 install]# tar -vxf xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar -C /opt/soft/
(5)第五步,查看安装路径
[root@hurys22 install]# cd /opt/soft/
[root@hurys22 soft]# ls
azkaban bin conf dolphinscheduler205 flume190 hadoop313 hbase205 hive312 install.sh kafka213 kettle_job lib logs miniconda3 pid scala211 script spark300 spark300without sql sqoop146 ui xulrunner zepplin090
[root@hurys22 soft]# cd ./xulrunner/
[root@hurys22 xulrunner]# pwd
/opt/soft/xulrunner
(6)第六步,注册一下xulrunner
[root@hurys22 xulrunner]# ./xulrunner --register-global
(7)第七步,如果第六步注册后没用,则修改启动文件spoon.sh文件(增加一行代码)
OPT="$OPT -Dorg.eclipse.swt.browser.DefaultType=mozilla -Dorg.eclipse.swt.browser.XULRunnerPath=/opt/soft/xulrunner"
(8)第八步,kettle重启后,点击connect不报错,但是空白
(二)问题二:Linux报错 java.io.IOException: Cannot run program "lsb_release": error=2, No such file or directory
1、报错详情
2023/08/10 15:24:03 - org.pentaho.di.ui.util.EnvironmentUtils@3a8d467e - Caused by: java.io.IOException: error=2, No such file or directory
2023/08/10 15:24:03 - org.pentaho.di.ui.util.EnvironmentUtils@3a8d467e - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : Could not execute command
2023/08/10 15:24:03 - org.pentaho.di.ui.util.EnvironmentUtils@3a8d467e - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : java.io.IOException: Cannot run program "lsb_release": error=2, No such file or directory
2、解决措施
# yum install -y redhat-lsb
(三)问题三:点击connect后空白,.kettle文件夹也缺少repositories.xml ,无法创建资源库
1、报错详情
点击kettle的connect,一片空白,无法创建资源库
2、解决措施:修改配置文件menubar.xul
(1)第一步,到/opt/install/data-integration/ui目录下,打开配置文件menubar.xul
[root@hurys22 data-integration]# cd ./ui/
[root@hurys22 ui]# ls
browser-toolbar.xul import-rules-toolbar.xul job-history-toolbar.xul laf.properties menubar.xul trans-grid-toolbar.xul trans-log-toolbar.xul trans-toolbar.xul
images job-graph.xul job-log-toolbar.xul main_perspective_overlay.xul spoon.xul trans-history-toolbar.xul trans-preview-toolbar.xul
[root@hurys22 ui]# vi menubar.xul
(2)在第31行加入<menuitem id="file-openZiyuanku" label="openZiyuanku" command="spoon.openRepository()"/>
(3)添加好后重启kettle, 在File里面有openZiyuanku一项,点击后可以创建资源库
2023/8/11续写
(四)问题四:Linux的kettle8.2在创建MySQL资源库时报错
1、报错详情
No repository exists on the specified connection.
To create a repository, select the Edit button followed by the Create or upgrade button.
2、解决措施:直接在资源库的数据库中运行下面SQL
参考博文链接(里面的SQL语句复制后可以直接在MySQL数据库中执行)
http://t.csdn.cn/bTRv3http://t.csdn.cn/bTRv3
最后总结一下,kettle在Linux安装后创建共享资源库时会遇到很多问题,需要耐心和细心才能一一解决!
乐于奉献共享,帮助你我他!!!