2

when I try to run:

sudo streamsets dc

I get the following error

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

do you have any idea?

a.moussa
  • 2,977
  • 7
  • 34
  • 56

2 Answers2

3

This might be a late answer but I'm adding it for future reference.

What the error says is simply that the path of the sdc-security.policy file is incorrect. The reason for this is that you seem to run the streamsets binary from a systemctl-enabled service. In order to achieve that, you can set the correct path of the StreamSets in the shell's environment variables. I tried the following settings and it works fine.

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

where $SDC_DIST environment variable defines the Data Collector runtime directory.

Then, you can start the sdc service with:

streamsets dc -verbose
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
0xack13
  • 462
  • 4
  • 8
0

1- you need to start the service where your streamset presents command from backend --> nohup $SDC_HOME/bin/streamsets dc &

2- Copy all files from $SDC_DIST/etc to the newly created $SDC_CONF directory. follow below link for more details https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Installation/Installing_the_DC.html

3- If there will be any permission related issues donot forget to add this line on youe end of sdc-security.policy

*> // user-defined external directory grant codebase

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

Satya
  • 1
  • 1