jm7647 commented on issue #5418: Unable to Configure a JDBC sink URL: https://github.com/apache/pulsar/issues/5418#issuecomment-544538500 I followed your suggestion and download nar package. Then I followed tutorial: https://pulsar.apache.org/docs/en/io-quickstart/#connect-pulsar-to-mysql Still jdbc connector is not working according to pulsar logs: 14:20:14.877 [function-timer-thread-86-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 993eb03e-f517-45ec-bb99-e4e29a58ae43 --function_version 3491094b-20c9-4117-b80e-ef8e686ebcd1 --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://mtn21cvaas04.mt.att.com:6650 --max_buffered_tuples 1024 --port 34596 --metrics_port 46333 --state_storage_serviceurl bk://127.0.0.1:4181 --expected_healthcheck_interval 30 --secrets_provider org.apache.pulsar.functions.secretsprovider.ClearTextSecretsProvider --cluster_name standalone 14:20:14.880 [function-timer-thread-86-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. Mon Oct 21 14:20:17 UTC 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. 14:20:18.482 [pulsar-io-50-4] INFO org.apache.pulsar.broker.service.ServerCnx - New connection from /135.25.67.33:38616 14:20:18.556 [pulsar-io-50-4] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /135.25.67.33:38616 14:20:29.003 [pulsar-web-57-8] INFO org.eclipse.jetty.server.RequestLog - 135.25.67.33 - - [21/Oct/2019:14:20:28 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 837 "-" "Pulsar-Java-v2.4.1" 4 14:20:44.876 [function-timer-thread-86-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] 14:20:44.878 [function-timer-thread-86-1] ERROR org.apache.pulsar.functions.runtime.RuntimeSpawner - public/default/pulsar-mysql-jdbc-sink-java.lang.RuntimeException: Function Container is dead with exception.. restarting
---------------------------------------------------------------- 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
