rec7y33 commented on issue #5418: Unable to Configure a JDBC sink
URL: https://github.com/apache/pulsar/issues/5418#issuecomment-547221869
 
 
   Hello, I have a similar problem/ error following this tutorial : 
https://pulsar.apache.org/docs/en/io-quickstart/#submit-a-jdbc-sink
   
   When I try to submit a jdbc sink, the following error occurs:
   
   01:37:38.550 [function-timer-thread-90-1] INFO  
org.apache.pulsar.functions.runtime.ProcessRuntime - Creating function log 
directory /pulsar/logs/functions/public/default/pulsar-mysql-jdbc-sink
   01:37:38.551 [function-timer-thread-90-1] INFO  
org.apache.pulsar.functions.runtime.ProcessRuntime - Created or found function 
log directory /pulsar/logs/functions/public/default/pulsar-mysql-jdbc-sink
   01:37:38.551 [function-timer-thread-90-1] INFO  
org.apache.pulsar.functions.runtime.ProcessRuntime - ProcessBuilder starting 
the process with args java -cp 
/pulsar/instances/java-instance.jar:/pulsar/instances/deps/* 
-Dpulsar.functions.extra.dependencies.dir=/pulsar/instances/deps 
-Dpulsar.functions.instance.classpath=/pulsar/conf:::/pulsar/lib/*: 
-Dlog4j.configurationFile=java_instance_log4j2.xml 
-Dpulsar.function.log.dir=/pulsar/logs/functions/public/default/pulsar-mysql-jdbc-sink
 -Dpulsar.function.log.file=pulsar-mysql-jdbc-sink-0 -Xmx1073741824 
org.apache.pulsar.functions.instance.JavaInstanceMain --jar 
/tmp/pulsar_functions/public/default/pulsar-mysql-jdbc-sink/0/pulsar-io-jdbc-2.4.1.nar
 --instance_id 0 --function_id 605da720-4c22-4d44-a2fc-b0682a07165c 
--function_version 688a5760-b5f9-4e34-aa0f-a2997ff5e434 --function_details 
'{"tenant":"public","namespace":"default","name":"pulsar-mysql-jdbc-sink","className":"org.apache.pulsar.functions.api.utils.IdentityFunction","autoAck":true,"parallelism":1,"source":{"typeClassName":"org.apache.pulsar.client.api.schema.GenericRecord","inputSpecs":{"pulsar-mysql-jdbc-sink-topic":{}},"cleanupSubscription":true},"sink":{"className":"org.apache.pulsar.io.jdbc.JdbcAutoSchemaSink","configs":"{\"userName\":\"root\",\"password\":\"jdbc\",\"jdbcUrl\":\"jdbc:mysql://127.0.0.1:3306/pulsar_mysql_jdbc_sink\",\"tableName\":\"pulsar_mysql_jdbc_sink\"}","typeClassName":"org.apache.pulsar.client.api.schema.GenericRecord"},"resources":{"cpu":1.0,"ram":"1073741824","disk":"10737418240"},"componentType":"SINK"}'
 --pulsar_serviceurl pulsar://a7d6eb0588a3:6650 --max_buffered_tuples 1024 
--port 36885 --metrics_port 39587 --state_storage_serviceurl 
bk://127.0.0.1:4181 --expected_healthcheck_interval 30 --secrets_provider 
org.apache.pulsar.functions.secretsprovider.ClearTextSecretsProvider 
--cluster_name standalone
   01:37:38.564 [function-timer-thread-90-1] INFO  
org.apache.pulsar.functions.runtime.ProcessRuntime - Started process 
successfully
   Using function root classloader: sun.misc.Launcher$AppClassLoader@7852e922
   Using function instance classloader: java.net.URLClassLoader@5c647e05
   Starting function instance...
   Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver 
class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via 
the SPI and manual loading of the driver class is generally unnecessary.
   01:38:04.892 [pulsar-web-57-12] INFO  org.eclipse.jetty.server.RequestLog - 
172.17.0.2 - - [29/Oct/2019:01:38:04 +0000] "GET 
/admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 812 "-" 
"Pulsar-Java-v2.4.1" 2
   01:38:08.513 [function-timer-thread-90-1] ERROR 
org.apache.pulsar.functions.runtime.ProcessRuntime - Extracted Process death 
exception
   java.lang.RuntimeException: 
        at 
org.apache.pulsar.functions.runtime.ProcessRuntime.tryExtractingDeathException(ProcessRuntime.java:380)
 ~[org.apache.pulsar-pulsar-functions-runtime-2.4.1.jar:2.4.1]
        at 
org.apache.pulsar.functions.runtime.ProcessRuntime.isAlive(ProcessRuntime.java:367)
 ~[org.apache.pulsar-pulsar-functions-runtime-2.4.1.jar:2.4.1]
        at 
org.apache.pulsar.functions.runtime.RuntimeSpawner.lambda$start$0(RuntimeSpawner.java:88)
 ~[org.apache.pulsar-pulsar-functions-runtime-2.4.1.jar:2.4.1]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_212]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[?:1.8.0_212]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_212]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_212]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_212]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_212]
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 [io.netty-netty-all-4.1.32.Final.jar:4.1.32.Final]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
   01:38:08.517 [function-timer-thread-90-1] ERROR 
org.apache.pulsar.functions.runtime.RuntimeSpawner - 
public/default/pulsar-mysql-jdbc-sink-java.lang.RuntimeException:  Function 
Container is dead with exception.. restarting
   
   Please advise. Thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to