2

当我尝试运行时:

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

你有什么主意吗?

4

2 回答 2

3

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

错误只是说sdc-security.policy文件的路径不正确。原因是您似乎是streamsets从启用 systemctl 的服务运行二进制文件。为了实现这一点,您可以在 shell 的环境变量中设置 StreamSet 的正确路径。我尝试了以下设置,它工作正常。

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环境变量定义 Data Collector 运行时目录。

然后,您可以sdc使用以下命令启动服务:

streamsets dc -verbose
于 2018-08-15T00:24:57.510 回答
0

1-您需要启动流集从后端提供命令的服务-> nohup $SDC_HOME/bin/streamsets dc &

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

3- 如果有任何权限相关的问题,不要忘记在 sdc-security.policy 的末尾添加这一行

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

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

于 2019-03-28T16:45:15.287 回答