amin224 commented on issue #20986:
URL: https://github.com/apache/pulsar/issues/20986#issuecomment-1688120852
While running the source using localrun i got these exceptions instead:
```
2023-08-22T12:46:50,931+0000 [function-timer-thread-28-1] ERROR
org.apache.pulsar.functions.runtime.RuntimeSpawner -
public/default/postgres-source Function Container is dead with following
exception. Restarting.
io.debezium.DebeziumException: Couldn't obtain encoding for database postgres
at
io.debezium.connector.postgresql.connection.PostgresConnection.getDatabaseCharset(PostgresConnection.java:487)
~[?:?]
at
io.debezium.connector.postgresql.PostgresConnectorTask.start(PostgresConnectorTask.java:75)
~[?:?]
at
io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:133)
~[?:?]
at
org.apache.pulsar.io.kafka.connect.AbstractKafkaConnectSource.open(AbstractKafkaConnectSource.java:162)
~[?:?]
at
org.apache.pulsar.io.kafka.connect.KafkaConnectSource.open(KafkaConnectSource.java:63)
~[?:?]
at
org.apache.pulsar.io.debezium.DebeziumSource.open(DebeziumSource.java:114)
~[?:?]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:858)
~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setup(JavaInstanceRunnable.java:253)
~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
at
org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:290)
~[org.apache.pulsar-pulsar-functions-instance-3.0.1.jar:3.0.1]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: 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:319)
~[?:?]
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
~[?:?]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:247) ~[?:?]
at org.postgresql.Driver.makeConnection(Driver.java:434) ~[?:?]
at org.postgresql.Driver.connect(Driver.java:291) ~[?:?]
at
io.debezium.jdbc.JdbcConnection.lambda$patternBasedFactory$1(JdbcConnection.java:244)
~[?:?]
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:888)
~[?:?]
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:883)
~[?:?]
at
io.debezium.connector.postgresql.connection.PostgresConnection.getDatabaseCharset(PostgresConnection.java:484)
~[?:?]
... 9 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
at sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[?:?]
at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
~[?:?]
at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
at java.net.Socket.connect(Socket.java:633) ~[?:?]
at org.postgresql.core.PGStream.createSocket(PGStream.java:241) ~[?:?]
at org.postgresql.core.PGStream.<init>(PGStream.java:98) ~[?:?]
at
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:109)
~[?:?]
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)
~[?:?]
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
~[?:?]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:247) ~[?:?]
at org.postgresql.Driver.makeConnection(Driver.java:434) ~[?:?]
at org.postgresql.Driver.connect(Driver.java:291) ~[?:?]
at
io.debezium.jdbc.JdbcConnection.lambda$patternBasedFactory$1(JdbcConnection.java:244)
~[?:?]
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:888)
~[?:?]
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:883)
~[?:?]
at
io.debezium.connector.postgresql.connection.PostgresConnection.getDatabaseCharset(PostgresConnection.java:484)
~[?:?]
... 9 more
```
--
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]