简体   繁体   中英

How to solve “Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured”?

I'm trying to create a Dataflow job in order to insert rows in BigTable, but while I'm testing the Dataflow job locally I get the following error:

Exception in thread "main" com.google.cloud.dataflow.sdk.Pipeline$PipelineExecutionException: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
at com.google.cloud.dataflow.sdk.Pipeline.run(Pipeline.java:186)

Bellow you can find my Main code:

    CloudBigtableOptions options =
            PipelineOptionsFactory.fromArgs(args).withValidation().create().as(CloudBigtableOptions.class);

    options.setProject("xxxxxxxxx");
    options.setBigtableProjectId("xxxxxxxxx");
    options.setBigtableInstanceId("xxxxxxxxx");
    options.setBigtableTableId("xxxxxxxxx");
    options.setZone("europe-west1-b");
    options.setRunner(DirectPipelineRunner.class);

    CloudBigtableTableConfiguration config =
            CloudBigtableTableConfiguration.fromCBTOptions(options);

    Pipeline p = Pipeline.create(options);
    CloudBigtableIO.initializeForWrite(p);

    FixedWindows window = FixedWindows.of(Duration.standardMinutes(1));

    p
            .apply(Create.of("Hello"))
            .apply(Window.into(window))
            .apply(ParDo.of(MUTATION_TRANSFORM))
            .apply(CloudBigtableIO.writeToTable(config));

    p.run();

Another try has been with the following code:

    CloudBigtableTableConfiguration config =
            new CloudBigtableTableConfiguration.Builder()
                    .withProjectId("xxxxxxxxx")
                    .withInstanceId("xxxxxxxxx")
                    .withTableId("xxxxxxxxx")
                    .build();

    Pipeline p = Pipeline.create(options);
    CloudBigtableIO.initializeForWrite(p);

    FixedWindows window = FixedWindows.of(Duration.standardMinutes(1));

    p
            .apply(Create.of("Hello"))
            .apply(Window.into(window))
            .apply(ParDo.of(MUTATION_TRANSFORM))
            .apply(CloudBigtableIO.writeToTable(config));

    p.run();

But I got the same error.

Am I doing something wrong?

EDIT:

Full error:

Exception in thread "main" com.google.cloud.dataflow.sdk.Pipeline$PipelineExecutionException: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
    at com.google.cloud.dataflow.sdk.Pipeline.run(Pipeline.java:186)
    at HubCache.main(HubCache.java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
    at com.google.bigtable.repackaged.com.google.cloud.grpc.BigtableSession.<init>(BigtableSession.java:236)
    at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:123)
    at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:91)
    at com.google.cloud.bigtable.hbase1_0.BigtableConnection.<init>(BigtableConnection.java:33)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool$1.<init>(CloudBigtableConnectionPool.java:72)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.createConnection(CloudBigtableConnectionPool.java:72)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.getConnection(CloudBigtableConnectionPool.java:64)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.getConnection(CloudBigtableConnectionPool.java:57)
    at com.google.cloud.bigtable.dataflow.AbstractCloudBigtableTableDoFn.getConnection(AbstractCloudBigtableTableDoFn.java:96)
    at com.google.cloud.bigtable.dataflow.CloudBigtableIO$CloudBigtableSingleTableBufferedWriteFn.getBufferedMutator(CloudBigtableIO.java:941)
    at com.google.cloud.bigtable.dataflow.CloudBigtableIO$CloudBigtableSingleTableBufferedWriteFn.processElement(CloudBigtableIO.java:966)

pom.xml:

 <dependencies>
        <dependency>
            <groupId>com.google.cloud.dataflow</groupId>
            <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
            <version>LATEST</version>
        </dependency>
        <dependency>
            <groupId>com.google.cloud.bigtable</groupId>
            <artifactId>bigtable-hbase-dataflow</artifactId>
            <version>LATEST</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.21</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>LATEST</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/io.netty/netty-tcnative-boringssl-static -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
            <version>1.1.33.Fork13</version>
            <classifier>${os.detected.classifier}</classifier>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <extensions>
            <!-- Use os-maven-plugin to initialize the "os.detected" properties -->
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.4.0.Final</version>
            </extension>
        </extensions>
    </build>

我们刚刚发布了与Netty tcnative-boringssl-static配对的0.9.1客户端 ,如连接器示例所示,我们使用Fork19,而pardo hello示例不再需要使用os.detected

Problem was that the extension os-maven-plugin , to initialize the "os.detected" properties, didn't initialize the property correctly.

I've done a test setting the property corrrectly and the test has been executed without problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM