Quantcast
Channel: Active questions tagged zeromq - Stack Overflow
Viewing all articles
Browse latest Browse all 193

Jupyter server zmq connection using php client

$
0
0

I am trying to connect to communicate to jupyter server using zmq messages sent by my PHP script. But the connection between zmq server and my PHP script is not being established.

I tried assigning ports in jupyter notebook config which is located at

~/.jupyter/jupyter_notebook_config.py c.NotebookApp.ip = '127.0.0.1'c.NotebookApp.port = 9992c.Session.key = b'00f2400c-bea977d0c80f0'c.ConnectionFileMixin.shell_port = 37971c.ConnectionFileMixin.iopub_port = 36612c.ConnectionFileMixin.control_port = 51091c.ConnectionFileMixin.hb_port = 55613c.NotebookApp.token = '12345'c.ConnectionFileMixin.ip = '0.0.0.0'c.KernelManager.autorestart = True

and the PHP script trying to connect is

<?php// Load the ZMQ extension$context = new ZMQContext();// Create a new socket of type Request (REQ)$socket = $context->getSocket(ZMQ::SOCKET_REQ);// Connect to the server$socket->connect("tcp://127.0.0.1:55613");for ($request = 0; $request < 10; $request++){    echo "Sending request $request...\n";    // Command to send.    $socket->send("Heartbeat");    // Get the reply.    $reply = $socket->recv();    echo "Received reply $request: [$reply]\n";}

when I connect to the notebook after starting it, no response is coming back from server.


Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>