当我尝试运行时:
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目录。 点击以下链接了解更多详情 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; };*