我无法执行 sudo streamsets dc 来启动流集

I can't execute sudo streamsets dc to start streamsets

当我尝试 运行:

sudo streamsets dc

我收到以下错误

WARN: could not determine Java environment version; expected 1.8, which are the supported versions
WARN: Security is enabled and was unable to verify policy file 'file:///opt/streamsets-datacollector/etc/sdc-security.policy'
OpenJDK 64-Bit Server VM warning: Cannot open file /opt/streamsets-datacollector/log/gc.log due to No such file or directory

Exception in thread "main" java.lang.IllegalArgumentException: Error: Security is enabled but sdc policy file is misconfigured
        at com.streamsets.pipeline.BootstrapMain.main(BootstrapMain.java:111)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "test.to.ensure.security.is.configured.correctly" "read")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.security.AccessController.checkPermission(AccessController.java:884)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
        at java.lang.System.getProperty(System.java:717)
        at com.streamsets.pipeline.BootstrapMain.main(BootstrapMain.java:108)
Exit: 1

你有什么想法吗?

这可能是一个迟到的答案,但我将其添加以供将来参考。

报错只是说sdc-security.policy文件的路径不对。这样做的原因是您似乎 运行 来自启用 systemctl 的服务的 streamsets 二进制文件。为了实现这一点,您可以在 shell 的环境变量中设置 StreamSets 的正确路径。我尝试了以下设置,效果很好。

export SDC_CONF=$SDC_DIST/etc/sdc
export SDC_DATA=$SDC_DIST/var/lib/sdc
export SDC_LOG=$SDC_DIST/var/log/sdc
export SDC_HOME=$SDC_DIST/opt/streamsets-datacollector

其中 $SDC_DIST 环境变量定义数据收集器 运行时间目录。

然后,您可以启动 sdc 服务:

streamsets dc -verbose

1- 您需要启动流集所在的服务 来自后端的命令 --> nohup $SDC_HOME/bin/streamsets dc &

2- 将所有文件从 $SDC_DIST/etc 复制到新创建的 $SDC_CONF 目录。 请关注下方 link 了解更多详情 https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Installation/Installing_the_DC.html

3- 如果有任何与权限相关的问题,请不要忘记在 sdc-security.policy

的末尾添加这一行

*> // 用户定义的外部目录授权代码库

"file:///opt/sdc-extras/-" {   permission java.security.AllPermission; };*