Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Remote execution of Metadata Injection pipeline fails when pipeline referenced is not present at remote server #4267

Open
beccon4 opened this issue Aug 30, 2024 · 0 comments

Comments

@beccon4
Copy link

beccon4 commented Aug 30, 2024

Apache Hop version?

2.9.0

Java version?

OpenJDK 64-Bit Server VM (build 11.0.24+8-post-Ubuntu-1ubuntu322.04, mixed mode, sharing)

Operating system

Linux

What happened?

On a freshly installed Apache Hop Configuration with no additional configuration but the mentioned I've created two simple Pipelines:

  1. reading a table from a database select * from table and sending the results to dummy
  2. only one transformation: meta data injection replacing the sql string of the pipeline 1 referenced

When run locally everything works as expected - the table referenced in 2 gets read.

Then I configured a remote Pipeline Run Configuration. Running pipeline 1 works as expected but the Metadata Injection fails:

2024/08/30 16:33:27 - HopServer - Enabling project 'default'
2024/08/30 16:33:27 - HopServer - Installing timer to purge stale objects after 1440 minutes.
2024/08/30 16:33:27 - HopServer - Created listener for webserver @ address : 0.0.0.0:8888
2024/08/30 16:35:44 - testmich2 - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2024/08/30 16:35:44 - testmich2 - Execution started for pipeline [testmich2]
2024/08/30 16:35:44 - ETL metadata injection.0 - ERROR: Bad encoding!
2024/08/30 16:35:44 - ETL metadata injection.0 - ERROR: org.apache.hop.core.exception.HopException: 
2024/08/30 16:35:44 - ETL metadata injection.0 - Unable to load pipeline testmich.hpl from file.
2024/08/30 16:35:44 - ETL metadata injection.0 - 
2024/08/30 16:35:44 - ETL metadata injection.0 - The pipeline path testmich.hpl is invalid, and will not run successfully.
2024/08/30 16:35:44 - ETL metadata injection.0 - 
2024/08/30 16:35:44 - ETL metadata injection.0 - 
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.transforms.metainject.MetaInjectMeta.loadPipelineMeta(MetaInjectMeta.java:329)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.transforms.metainject.MetaInject.loadPipelineMeta(MetaInject.java:689)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.transforms.metainject.MetaInject.init(MetaInject.java:507)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.transform.TransformInitThread.run(TransformInitThread.java:66)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at java.base/java.lang.Thread.run(Thread.java:829)
2024/08/30 16:35:44 - ETL metadata injection.0 - Caused by: org.apache.hop.core.exception.HopXmlException: 
2024/08/30 16:35:44 - ETL metadata injection.0 - The pipeline path testmich.hpl is invalid, and will not run successfully.
2024/08/30 16:35:44 - ETL metadata injection.0 - 
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.PipelineMeta.loadXml(PipelineMeta.java:1667)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.PipelineMeta.<init>(PipelineMeta.java:1655)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	at org.apache.hop.pipeline.transforms.metainject.MetaInjectMeta.loadPipelineMeta(MetaInjectMeta.java:322)
2024/08/30 16:35:44 - ETL metadata injection.0 - 	... 4 more
2024/08/30 16:35:44 - ETL metadata injection.0 - ERROR: Error initializing transform [ETL metadata injection]
2024/08/30 16:35:44 - testmich2 - ERROR: Transform [ETL metadata injection.0] failed to initialize!

The strange thing ist that the very same configuration run once on the same server - but only once:

2024/08/30 16:25:17 - HopServer - Enabling project 'default'
2024/08/30 16:25:17 - HopServer - Installing timer to purge stale objects after 1440 minutes.
2024/08/30 16:25:17 - HopServer - Created listener for webserver @ address : 0.0.0.0:8888
2024/08/30 16:25:27 - testmich2 - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2024/08/30 16:25:27 - testmich2 - Execution started for pipeline [testmich2]
2024/08/30 16:25:27 - testmich - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2024/08/30 16:25:27 - testmich - Execution started for pipeline [testmich]
2024/08/30 16:25:28 - Table input.0 - Finished reading query, closing connection.
2024/08/30 16:25:28 - Dummy (do nothing).0 - Finished processing (I=0, O=0, R=1100, W=1100, U=0, E=0)
2024/08/30 16:25:28 - Table input.0 - Finished processing (I=1100, O=0, R=0, W=1100, U=0, E=0)
2024/08/30 16:25:28 - testmich - Pipeline duration : 0.876 seconds [  0.876" ]
2024/08/30 16:25:28 - ETL metadata injection.0 - Finished processing (I=1100, O=0, R=1100, W=1100, U=0, E=0)
2024/08/30 16:25:28 - testmich - Execution finished on a local pipeline engine with run configuration 'local'
2024/08/30 16:25:28 - testmich2 - Pipeline duration : 1.296 seconds [  1.296" ]
2024/08/30 16:25:28 - testmich2 - Execution finished on a local pipeline engine with run configuration 'local'

It seem to work when I manually copy the Pipeline 1 to the remote server into the same directory as on the local server. Obviously accessing the linked Pipeline does not work, despite of the fact that it is included in the zip file which is sent to the remote server's /tmp. And I have to uncheck "Export linked resources to server" in the Pipeline Run Configuration.

What's wrong? This can't be a desired behavior in any way.

Issue Priority

Priority: 3

Issue Component

Component: Pipelines

@github-actions github-actions bot added P3 Nice to have Pipelines labels Aug 30, 2024
@beccon4 beccon4 changed the title [Bug]: [Bug]: Remote execution of Metadata Injection pipeline fails when pipeline referenced is not present at remote server Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant