Chaffelson / nipyapi

A convenient Python wrapper for Apache NiFi
Other
243 stars 76 forks source link

Getting a java.net.SocketTimeoutException: timeout when successfully deploying Nifi flows via versioning API #312

Closed andyadamides closed 1 year ago

andyadamides commented 1 year ago

Description

In using the nipyapi to importing a new flow version in Nifi Canvas with

result = nipyapi.versioning.deploy_flow_version(
                    parent_id=root_pg_id,
                    location=(x_flow, y_flow),
                    bucket_id=bucket.identifier,
                    flow_id=vflow.flow.identifier,
                    reg_client_id=registry_client.id,
                )

The deployment succeeds fine, no issues raised, no errors occurring.

But when I try a significantly larger flow, with multiple inner process groups, connections etc. the deployment still succeeds but I am getting this exception in the process:

java.net.SocketTimeoutException: timeout

I have tried to increase this property:

nipyapi.config.short_max_wait = 3600

But the same exception still occurs, however the flow is deployed successfully when I check the Nifi Canvas.

Can someone suggest what might be happening here and a potential fix?

ottobackwards commented 1 year ago

That error looks like it is a Nifi Error, not a nypiapi error. Nifi is java. You should look on your nifi deployments nifi-app.log and see if there is more exception info there.

andyadamides commented 1 year ago

Yeap I understand that the exception is a Java one, however I raised it here because nipyapi does not seem to handle that exception or not sure if it is intended to

ottobackwards commented 1 year ago

Can you post the stack trace of the exception you are getting in nipyiapi?

Chaffelson commented 1 year ago

Closing as stale. Please reopen if the issue recurs or more details are available. Thanks.