-
Notifications
You must be signed in to change notification settings - Fork 55
How to solve "[IPKernelApp] ERROR | No such comm target registered: SparkMonitor"? #6
Comments
Are you seeing that error in the jupyter console? It may be because the ipython kernel extension is not configured correctly. The JS frontend is unable to start a comm channel with the kernel extension, possibly because the kernel extension has not started. There are 3 components to this extension, A jupyter frontend extension in JavaScript, an IPython Kernel extension, and a Jupyter Webserver extension. Please also check your Jupyter Version, it has to be 5.x for the Jupyter comm APIs to work. |
Yeah, I seeing that error in the jupyter console. And my jupyter version is 4.4.0, ipython version is 5.5.0. I'm a newbie, and I don't konw how to solve this issue. Can you tell me some details? Thanks! |
Can you try |
I am using: I am getting this same issue. I ran the steps mentioned in https://krishnan-r.github.io/sparkmonitor/install.html
Im using Amazon AWS |
Yes this issue seems to be real. I am getting this problem now. I think it may be some problem in the kernel side. Some breaking change with the Jupyter protocol perhaps. The communication mechanism between the frontend and the kernel seems to be broken. #7 is also due to the same problem I think. |
I have identified the issue. I am quite embarrassed that this has propagated for this long. The instructions provided here in the quick install are outdated. The quick install instructions in the readme are correct. This kernel extension line is not supposed to be: Initially the kernel extension lived in the package namespace of sparkmonitor But I forgot to update the install instructions in the website and the dockerfile, but only the readme was updated. Please confirm if this solves the problem. If the kernel extension is successfully loaded, a SparkConf object named conf will be declared in the global namespace. |
I changed this, but it still does not show any dashboard to monitor the spark job.
|
Based on your output, I think the kernel extension, server-extension and front-end-extension have loaded. May I know what kind of notebook you are running. Have you tried running this example. Can you give me the output of the conf object created by the extension. What version of Spark are you running? |
I just did a
I can see the "Toggle sparkmonitor display" button on the top. when I restarted my kernel I think i got the following in the logs from jupyter:
There seems to be a warning from |
When the SparkMonitor kernel-extension starts it creates a For this to work, the Now in your case, you seem to be using the findspark module. try:
from pyspark import SparkConf
except ImportError:
spark_imported = False and if pyspark is imported this happens if spark_imported:
# Get conf if user already has a conf for appending
conf = ipython.user_ns.get("conf")
if conf:
logger.info("Conf: " + conf.toDebugString())
if isinstance(conf, SparkConf):
configure(conf)
else:
conf = SparkConf() # Create a new conf
configure(conf)
ipython.push({"conf": conf}) # Add to users namespace My guess is that the kernel extension is failing due pyspark import failing. Integration with findspark could be a nice to have feature. The warning you are getting when restarting the kernel is not an issue, I can confirm that I have the warning with the extension working. |
Works, got a few errors and issues for which I have made new github issues. |
Closing this for now. If anyone else encounters this problem, feel free to open an issue. |
OS: macOS (10.13.5) Hi, If I launch my notebooks using: /path/to/jupyter notebook <args> and importing pyspark inside, sparkmonitor works. However if I use PYSPARK_DRIVER_PYTHON_OPTS="/path/to/jupyter notebook" pyspark --py-files ... the sparkmonitor is not displayed and I get the following warning: [IPKernelApp] WARNING | No such comm: 65c8bde216794811ac29bfa7996796d7 Any ideas? |
That error is because the ipython kernel extension is not loaded. I think the way jupyter is started, the kernel configuration is not read. I will try to reproduce this issue. The sparkmonitor ipython kernel extension is configured to start in |
Thanks for looking into it. So far I couldn't find a solution :-( |
[IPKernelApp] WARNING | No such comm: 13ab45b693e542368311fca97aa2f7a8 |
@chaoyue729 can you explain further? If you can print the SparkConf object the IPython kernel extension has started, the problem is with the frontend extension Are you extending the same conf object and starting spark with it? |
I tried all the above options and I meet all the requirements . I still get "[IPKernelApp] ERROR | No such comm target registered: SparkMonitor". I tried pyspark invoked from PYSPARK_DRIVER_PYTHON_OPTS as well as by just jupyter notebook. I also have tried with and without findspark. I didnt get any errors during installation. Instructions look simple but hard to make it to work. |
@AbdealiJK are you trying to run the extension using jupyterlab? I got the same error when trying to run it using jupyterlab. But I am able to run it on jupyter notebook just fine. |
I don't remember honestly - it was a long time ago The logs from my comments above say: So I'm assuming I was running lab |
I installed the "sparkmonitor" follow the document, but there is an issue just like "[IPKernelApp] ERROR | No such comm target registered: SparkMonitor" when I start notebook. So how to solve it? Thanks very much!
The text was updated successfully, but these errors were encountered: