Hi, we are trying to deploy our purchased license for aspose.cell python product to our Databricks environment which we could do successfully. But when we call the license within our code, we run into the following error,
Fatal error: The Python kernel is unresponsive. databricks_aspsoe_error.txt.zip (3.7 KB)
Please note, the same license succfully works in our normal linux server when deployed.
The issue may be related to how you are accessing the license. Ensure the license is being applied in a part of the code that doesn’t involve any distributed processing or multi-threading. Also, make sure the license file path is valid and accessible in Databricks. There should be no rights issue.
Please test the code in a non-distributed or single-node environment in Databricks, which isolates the issue and helps determine if the distributed nature of Spark is causing conflicts. Consider breaking up the execution flow such that the license application is isolated from the main computation.
We verified that path was accessible and tried running just the license piece of the code in a single node cluster, we still are hit with the same error. any suggestions?
@psethu01
You mentioned that “the same license successfully works in our normal Linux server when deployed.” Therefore, we suggest that you focus on the differences between your current running environment and Linux. Additionally, ensure that you can access the Aspose.Cells Python product license normally in the current environment without using Databricks.
Furthermore, the Fatal Python error: Aborted mentioned in your logs is a critical issue that may relate to the runtime environment or the integration with Spark. To further troubleshoot, we recommend:
Check the compatibility between Python and Spark to ensure the environment is correctly configured.
Test in different Python environments (such as different versions of Python or non-Spark environments) to narrow down the issue.
Examine your code to ensure that it does not access the license file in a multi-threaded or distributed manner.
Even without enabling spark, Since data bricks uses a cluster driven approach for running an application, how will the license work since the cluster will not be constant for every instance of the run.
@psethu01
Hello, In any case, if you are using or setting the license in a multi-threaded application, please ensure that the license code is only executed once and is executed first in the entire application lifecycle. Please check whether the license-setting code is being executed repeatedly and concurrently. If so, you should fix this issue.
could you please provide a detailed introduction of your runtime environment, including hardware information, OS, and installed software? Is it possible to set up a similar environment locally in single-machine mode to simulate and reproduce your issue?
We further analyzed your error message and found that the error may stem from a Socket connection issue (/usr/lib/python3.11/socket.py) or a Py4j communication failure. Therefore, we recommend ensuring that network communication is functioning properly, and also check if everything works fine without using Aspose.
Thank you!
We tried running a single node environment hitting the same issue. The application runs fine if we dont call the license file and just use the aspose lib without it.
It is quite unusual that the licensing issue persists even when setting the license in a single-node environment. Hopefully, you are not processing the licensing code repeatedly in your app. We will investigate this further and get back to you soon. But could you please also give us details about your runtime environment, including hardware information, OS, and installed software, etc.? Is it possible to set up a similar environment locally in single-machine mode on your end to simulate and reproduce your issue?
@psethu01
We have two ways to set the license: one is by using the file name, and the other is by using a stream. If you are currently using the first method, you can try the second method.
from aspose.cells import License
lic = License()
# Try to set license by lic file name
lic.set_license(yourPath + "Aspose.Cells.Pythonvia.NET.lic")
from aspose.cells import License
import io
# Try to set license from the stream.
lic = License()
lic_stream = io.FileIO("Aspose.Cells.Pythonvia.NET.lic")
lic.set_license(lic_stream)
lic_stream.close()