Why I can't run more than 19 tasks?

2023-05-24 Thread Hemi Grs
hey everybody,

I have a problem with my apache flink, I am synchronizing from MySQL to
Elasticsearch but it seems that I can't run more than 19 tasks. it gave me
this error:

--
Caused by: org.apache.flink.util.FlinkRuntimeException:
org.apache.flink.util.FlinkRuntimeException:
java.sql.SQLTransientConnectionException: connection-pool-10.10.10.111:3306
- Connection is not available, request timed out after 3ms. at
com.ververica.cdc.connectors.mysql.debezium.DebeziumUtils.openJdbcConnection(DebeziumUtils.java:64)
at
com.ververica.cdc.connectors.mysql.source.assigners.MySqlSnapshotSplitAssigner.discoveryCaptureTables(MySqlSnapshotSplitAssigner.java:171)
... 12 more
Caused by: org.apache.flink.util.FlinkRuntimeException:
java.sql.SQLTransientConnectionException: connection-pool-10.10.10.111:3306
- Connection is not available, request timed out after 3ms. at
com.ververica.cdc.connectors.mysql.source.connection.JdbcConnectionFactory.connect(JdbcConnectionFactory.java:72)
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:890) at
io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:885)
at io.debezium.jdbc.JdbcConnection.connect(JdbcConnection.java:418) at
com.ververica.cdc.connectors.mysql.debezium.DebeziumUtils.openJdbcConnection(DebeziumUtils.java:61)
... 13 moreCaused by: java.sql.SQLTransientConnectionException:
connection-pool-10.10.10.111:3306 - Connection is not available, request
timed out after 3ms.
at
com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at
com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
at
com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
at
com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
at
com.ververica.cdc.connectors.mysql.source.connection.JdbcConnectionFactory.connect(JdbcConnectionFactory.java:59)
... 17 more
-

I have try adding this 2 lines on flink-conf.yaml but doesn't do anything:
-
env.java.opts:
"-Dcom.ververica.cdc.connectors.mysql.hikari.maximumPoolSize=100"
flink.connector.mysql-cdc.max-pool-size: 100
-

does anybody know the solution?
Additional info, my database is doing fine, because I try creating another
apache flink server and it can run another 19 tasks, so total there 38
tasks running and it's doing fine. So how do I run many tasks on 1 server
and the server still have lots of resources.

Thanks


Flink SQL: MySQL to Elaticsearch soft delete

2023-10-19 Thread Hemi Grs
hello everyone,

right now I'm using flink to sync from mysql to elasticsearch and so far so
good. If we insert, update, or delete it will sync from mysql to elastic
without any problem.

The problem I have right now is the application is not actually doing hard
delete to the records in mysql, but doing soft delete (updating a deletedAt
column).

Because it's not actually doing a deletion, flink is not deleting the data
in elastic. How do I make it so it will delete the data in elastic?

Thanks


Strange Problem (0 AvailableTask)

2024-04-18 Thread Hemi Grs
Hello,

I have several versions of Flink (1.17.0, 1.18.0, 1.18.1 and 1.19.0) on my
server.
I am still trying it out (on & off), and I was running a job for sync a
table from mysql to elasticsearch and it was running find without any
problems ( I was using 1.18.1 version).
But after a few weeks, I forgot about it and check the dashboard and no job
is running. But the strange part is there are 0 available task (I config it
to have 10 tasks).

I tried restarting the service but still it show 0 available tasks. I even
try using different versions and all of them (except 1.17.0) has no
available tasks. So now I am back using the 1.17.0.

When I checked the log it has this message:
-
Tokens update task not started because either no tokens obtained or none of
the tokens specified its renewal date
-

Is it because of that? and what is the solution?

Appreciate for all the help.

Thanks


Re: Strange Problem (0 AvailableTask)

2024-04-26 Thread Hemi Grs
Hi Biao,

Thanks for your reply, fortunately the problem is solved.
All I did was changed the bind-host to 0.0.0.0 (previously it was set to
the server's IP).

I don't know if it's best practice or not but everything is working fine
now.

RIght now I am using flink as standalone (I have the binaries in Centos and
just run it using the ./start-cluster command), but I want to learn on how
to set-it up in cluster. Are there any tutorials that you can recommend?

Thanks

On Fri, Apr 26, 2024 at 3:33 PM Biao Geng  wrote:

> Hi Hemi,
> How do you start your flink cluster? Are you using standalone cluster or
> using k8s/yarn as resource providers?
> Also, it would be very helpful if you can share the full jobmanager log.
>
> Best,
> Biao Geng
>
> Hemi Grs  于2024年4月18日周四 15:43写道:
>
>> Hello,
>>
>> I have several versions of Flink (1.17.0, 1.18.0, 1.18.1 and 1.19.0) on
>> my server.
>> I am still trying it out (on & off), and I was running a job for sync a
>> table from mysql to elasticsearch and it was running find without any
>> problems ( I was using 1.18.1 version).
>> But after a few weeks, I forgot about it and check the dashboard and no
>> job is running. But the strange part is there are 0 available task (I
>> config it to have 10 tasks).
>>
>> I tried restarting the service but still it show 0 available tasks. I
>> even try using different versions and all of them (except 1.17.0) has no
>> available tasks. So now I am back using the 1.17.0.
>>
>> When I checked the log it has this message:
>> -
>> Tokens update task not started because either no tokens obtained or none
>> of the tokens specified its renewal date
>> -
>>
>> Is it because of that? and what is the solution?
>>
>> Appreciate for all the help.
>>
>> Thanks
>>
>


Re: Strange Problem (0 AvailableTask)

2024-04-28 Thread Hemi Grs
Alright, THanks so much Biao ...



On Sun, Apr 28, 2024 at 9:45 AM Biao Geng  wrote:

> Hi Hemi,
> Glad to hear that your problem is solved!
> As for deploying a flink cluster, you can check these docs for
> more information based on your resource provider:
> YARN:
> https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/yarn/
> K8s:
> https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/native_kubernetes/
> If you are using k8s and are more familiar with kubectl, it is worthwhile
> to mention that you can have a try on flink k8s operator:
> https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/zh/docs/try-flink-kubernetes-operator/quick-start/
>
>
> Best,
> Biao Geng
>
>
> Hemi Grs  于2024年4月26日周五 19:03写道:
>
>> Hi Biao,
>>
>> Thanks for your reply, fortunately the problem is solved.
>> All I did was changed the bind-host to 0.0.0.0 (previously it was set to
>> the server's IP).
>>
>> I don't know if it's best practice or not but everything is working fine
>> now.
>>
>> RIght now I am using flink as standalone (I have the binaries in Centos
>> and just run it using the ./start-cluster command), but I want to learn on
>> how to set-it up in cluster. Are there any tutorials that you can recommend?
>>
>> Thanks
>>
>> On Fri, Apr 26, 2024 at 3:33 PM Biao Geng  wrote:
>>
>>> Hi Hemi,
>>> How do you start your flink cluster? Are you using standalone cluster or
>>> using k8s/yarn as resource providers?
>>> Also, it would be very helpful if you can share the full jobmanager log.
>>>
>>> Best,
>>> Biao Geng
>>>
>>> Hemi Grs  于2024年4月18日周四 15:43写道:
>>>
>>>> Hello,
>>>>
>>>> I have several versions of Flink (1.17.0, 1.18.0, 1.18.1 and 1.19.0) on
>>>> my server.
>>>> I am still trying it out (on & off), and I was running a job for sync a
>>>> table from mysql to elasticsearch and it was running find without any
>>>> problems ( I was using 1.18.1 version).
>>>> But after a few weeks, I forgot about it and check the dashboard and no
>>>> job is running. But the strange part is there are 0 available task (I
>>>> config it to have 10 tasks).
>>>>
>>>> I tried restarting the service but still it show 0 available tasks. I
>>>> even try using different versions and all of them (except 1.17.0) has no
>>>> available tasks. So now I am back using the 1.17.0.
>>>>
>>>> When I checked the log it has this message:
>>>> -
>>>> Tokens update task not started because either no tokens obtained or
>>>> none of the tokens specified its renewal date
>>>> -
>>>>
>>>> Is it because of that? and what is the solution?
>>>>
>>>> Appreciate for all the help.
>>>>
>>>> Thanks
>>>>
>>>