streamsets

I can't execute sudo streamsets dc to start streamsets


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?


Solution

  • 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