pgandhap commented on issue #13021:
URL: https://github.com/apache/pulsar/issues/13021#issuecomment-988688837
@tuteng Getting error related to postgresql . But postgresql is running in
local with port 5432 .
root@9f2800695c6b:/pulsar# bin/pulsar-admin sinks localrun --archive
./connectors/pulsar-io-jdbc-postgres-2.8.1.nar --tenant public --namespace
default --inputs my-topic --name jdbc-postgres-sink --sink-config-file
./connectors/pulsar-postgres-jdbc-sink.yaml --parallelism 1
10:11:36.052 [main] INFO
org.apache.pulsar.functions.utils.io.ConnectorUtils - Searching for connectors
in /pulsar/connectors
10:11:36.079 [main] INFO org.apache.pulsar.common.nar.NarUnpacker - Created
directory
/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked
10:11:36.193 [main] INFO org.apache.pulsar.common.nar.NarUnpacker -
Extracting /pulsar/connectors/pulsar-io-jdbc-postgres-2.8.1.nar to
/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ
10:11:36.403 [main] INFO org.apache.pulsar.common.nar.NarClassLoader -
Created class loader with paths:
[file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/avro-1.10.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/checker-qual-3.5.0.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/commons-compress-1.21.jar,
file:/tmp/pulsar_localrunner_nars_105
59000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/error_prone_annotations-2.5.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/failureaccess-1.0.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/guava-30.1-jre.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/j2objc-annotations-1.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-annotations-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-pos
tgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-core-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-databind-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-dataformat-yaml-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jsr305-3.0.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar
-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/postgresql-42.2.12.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-admin-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-functions-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-io-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF
/bundled-dependencies/pulsar-io-jdbc-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/slf4j-api-1.7.25.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/snakeyaml-1.27.jar]
10:11:36.425 [main] INFO
org.apache.pulsar.functions.utils.io.ConnectorUtils - Found connector
ConnectorDefinition(name=jdbc-postgres, description=JDBC sink for PostgreSQL,
sourceClass=null,
sinkClass=org.apache.pulsar.io.jdbc.PostgresJdbcAutoSchemaSink,
sourceConfigClass=null, sinkConfigClass=null) from
/pulsar/connectors/pulsar-io-jdbc-postgres-2.8.1.nar
10:11:36.553 [main] INFO org.apache.pulsar.common.nar.NarClassLoader -
Created class loader with paths:
[file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/avro-1.10.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/checker-qual-3.5.0.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/commons-compress-1.21.jar,
file:/tmp/pulsar_localrunner_nars_105
59000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/error_prone_annotations-2.5.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/failureaccess-1.0.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/guava-30.1-jre.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/j2objc-annotations-1.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-annotations-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-pos
tgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-core-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-databind-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-dataformat-yaml-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jsr305-3.0.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar
-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/postgresql-42.2.12.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-admin-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-functions-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-io-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF
/bundled-dependencies/pulsar-io-jdbc-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/slf4j-api-1.7.25.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/snakeyaml-1.27.jar]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil
(file:/pulsar/lib/io.netty-netty-common-4.1.66.Final.jar) to constructor
java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of
io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
10:11:37.912 [main] INFO org.apache.pulsar.functions.runtime.RuntimeSpawner
- public/default/jdbc-postgres-sink-0 RuntimeSpawner starting function
10:11:37.913 [main] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Load JAR:
./connectors/pulsar-io-jdbc-postgres-2.8.1.nar
10:11:37.987 [main] INFO org.apache.pulsar.common.nar.NarClassLoader -
Created class loader with paths:
[file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/avro-1.10.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/checker-qual-3.5.0.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/commons-compress-1.21.jar,
file:/tmp/pulsar_localrunner_nars_105
59000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/error_prone_annotations-2.5.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/failureaccess-1.0.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/guava-30.1-jre.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/j2objc-annotations-1.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-annotations-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-pos
tgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-core-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-databind-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-dataformat-yaml-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jsr305-3.0.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar
-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/postgresql-42.2.12.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-admin-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-functions-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-io-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF
/bundled-dependencies/pulsar-io-jdbc-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/slf4j-api-1.7.25.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/snakeyaml-1.27.jar]
10:11:37.989 [main] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Initialize function
class loader for function jdbc-postgres-sink at function cache manager,
functionClassLoader:
org.apache.pulsar.common.nar.NarClassLoader[/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ]
10:11:38.012 [main] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - ThreadContainer
starting function with instance config InstanceConfig(instanceId=0,
functionId=fc7c41eb-766e-43bd-bc0e-067a798ac807,
functionVersion=c45b0d8f-41a0-4e65-9d08-55cbd39ae09b, functionDetails=tenant:
"public"
namespace: "default"
name: "jdbc-postgres-sink"
className: "org.apache.pulsar.functions.api.utils.IdentityFunction"
autoAck: true
parallelism: 1
source {
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
inputSpecs {
key: "my-topic"
value {
}
}
cleanupSubscription: true
}
sink {
className: "org.apache.pulsar.io.jdbc.PostgresJdbcAutoSchemaSink"
configs:
"{\"userName\":\"postgres\",\"password\":\"password\",\"jdbcUrl\":\"jdbc:postgresql://localhost:5432/pulsar_postgres_jdbc_sink\",\"tableName\":\"pulsar_postgres_jdbc_sink\"}"
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
}
resources {
cpu: 1.0
ram: 1073741824
disk: 10737418240
}
componentType: SINK
, maxBufferedTuples=1024, functionAuthenticationSpec=null, port=0,
clusterName=local, maxPendingAsyncRequests=1000,
exposePulsarAdminClientEnabled=false, metricsPort=0)
10:11:38.524 [main] INFO org.apache.pulsar.functions.LocalRunner -
RuntimeSpawner quit because of
org.postgresql.util.PSQLException: Connection to localhost:5432 refused.
Check that the hostname and port are correct and that the postmaster is
accepting TCP/IP connections.
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:285)
~[?:?]
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
~[?:?]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:211)
~[?:?]
at org.postgresql.Driver.makeConnection(Driver.java:459) ~[?:?]
at org.postgresql.Driver.connect(Driver.java:261) ~[?:?]
at java.sql.DriverManager.getConnection(DriverManager.java:677)
~[java.sql:?]
at java.sql.DriverManager.getConnection(DriverManager.java:189)
~[java.sql:?]
at
org.apache.pulsar.io.jdbc.JdbcAbstractSink.open(JdbcAbstractSink.java:93) ~[?:?]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupOutput(JavaInstanceRunnable.java:812)
~[org.apache.pulsar-pulsar-functions-instance-2.8.1.jar:2.8.1]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setup(JavaInstanceRunnable.java:217)
~[org.apache.pulsar-pulsar-functions-instance-2.8.1.jar:2.8.1]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:243)
~[org.apache.pulsar-pulsar-functions-instance-2.8.1.jar:2.8.1]
at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
~[?:?]
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
~[?:?]
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at org.postgresql.core.PGStream.<init>(PGStream.java:81) ~[?:?]
at
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:93)
~[?:?]
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197)
~[?:?]
... 11 more
10:12:08.076 [function-timer-thread-13-1] ERROR
org.apache.pulsar.functions.runtime.RuntimeSpawner -
public/default/jdbc-postgres-sink-org.postgresql.util.PSQLException: Connection
to localhost:5432 refused. Check that the hostname and port are correct and
that the postmaster is accepting TCP/IP connections. Function Container is dead
with exception.. restarting
10:12:08.077 [function-timer-thread-13-1] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Unloading JAR files
for function InstanceConfig(instanceId=0,
functionId=fc7c41eb-766e-43bd-bc0e-067a798ac807,
functionVersion=c45b0d8f-41a0-4e65-9d08-55cbd39ae09b, functionDetails=tenant:
"public"
namespace: "default"
name: "jdbc-postgres-sink"
className: "org.apache.pulsar.functions.api.utils.IdentityFunction"
autoAck: true
parallelism: 1
source {
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
inputSpecs {
key: "my-topic"
value {
}
}
cleanupSubscription: true
}
sink {
className: "org.apache.pulsar.io.jdbc.PostgresJdbcAutoSchemaSink"
configs:
"{\"userName\":\"postgres\",\"password\":\"password\",\"jdbcUrl\":\"jdbc:postgresql://localhost:5432/pulsar_postgres_jdbc_sink\",\"tableName\":\"pulsar_postgres_jdbc_sink\"}"
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
}
resources {
cpu: 1.0
ram: 1073741824
disk: 10737418240
}
componentType: SINK
, maxBufferedTuples=1024, functionAuthenticationSpec=null, port=0,
clusterName=local, maxPendingAsyncRequests=1000,
exposePulsarAdminClientEnabled=false, metricsPort=0)
10:12:08.082 [function-timer-thread-13-1] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Load JAR:
./connectors/pulsar-io-jdbc-postgres-2.8.1.nar
10:12:08.129 [function-timer-thread-13-1] INFO
org.apache.pulsar.common.nar.NarClassLoader - Created class loader with paths:
[file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/avro-1.10.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/checker-qual-3.5.0.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/commons-compress-1.21.jar,
file:/tmp/pulsa
r_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/error_prone_annotations-2.5.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/failureaccess-1.0.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/guava-30.1-jre.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/j2objc-annotations-1.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-annotations-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-
nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-core-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-databind-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jackson-dataformat-yaml-2.12.3.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/jsr305-3.0.2.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-j
dbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/postgresql-42.2.12.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-admin-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-client-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-functions-api-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-io-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz
734y233DeLFoQ/META-INF/bundled-dependencies/pulsar-io-jdbc-core-2.8.1.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/slf4j-api-1.7.25.jar,
file:/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ/META-INF/bundled-dependencies/snakeyaml-1.27.jar]
10:12:08.130 [function-timer-thread-13-1] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Initialize function
class loader for function jdbc-postgres-sink at function cache manager,
functionClassLoader:
org.apache.pulsar.common.nar.NarClassLoader[/tmp/pulsar_localrunner_nars_10559000985005390792/pulsar-nar/pulsar-io-jdbc-postgres-2.8.1.nar-unpacked/2tYa0fOdz734y233DeLFoQ]
10:12:08.132 [function-timer-thread-13-1] INFO
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - ThreadContainer
starting function with instance config InstanceConfig(instanceId=0,
functionId=fc7c41eb-766e-43bd-bc0e-067a798ac807,
functionVersion=c45b0d8f-41a0-4e65-9d08-55cbd39ae09b, functionDetails=tenant:
"public"
namespace: "default"
name: "jdbc-postgres-sink"
className: "org.apache.pulsar.functions.api.utils.IdentityFunction"
autoAck: true
parallelism: 1
source {
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
inputSpecs {
key: "my-topic"
value {
}
}
cleanupSubscription: true
}
sink {
className: "org.apache.pulsar.io.jdbc.PostgresJdbcAutoSchemaSink"
configs:
"{\"userName\":\"postgres\",\"password\":\"password\",\"jdbcUrl\":\"jdbc:postgresql://localhost:5432/pulsar_postgres_jdbc_sink\",\"tableName\":\"pulsar_postgres_jdbc_sink\"}"
typeClassName: "org.apache.pulsar.client.api.schema.GenericRecord"
}
resources {
cpu: 1.0
ram: 1073741824
disk: 10737418240
}
componentType: SINK
, maxBufferedTuples=1024, functionAuthenticationSpec=null, port=0,
clusterName=local, maxPendingAsyncRequests=1000,
exposePulsarAdminClientEnabled=false, metricsPort=0)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]