zhangjiuyang1993 commented on issue #6708:
URL: https://github.com/apache/iceberg/issues/6708#issuecomment-1411402841

   Sometimes i run some sql scripts, the server occurs connection refused,for 
example:
   %%sql
   
   SELECT COUNT(*) as cnt
   FROM nyc.taxis
   
   ---------------------------------------------------------------------------
   ConnectionRefusedError                    Traceback (most recent call last)
   Cell In[15], line 1
   ----> 1 get_ipython().run_cell_magic('sql', '', '\nSELECT COUNT(*) as 
cnt\nFROM nyc.taxis\n')
   
   File 
/usr/local/lib/python3.9/site-packages/IPython/core/interactiveshell.py:2422, 
in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
      2420 with self.builtin_trap:
      2421     args = (magic_arg_s, cell)
   -> 2422     result = fn(*args, **kwargs)
      2423 return result
   
   File ~/.ipython/profile_default/startup/00-prettytables.py:61, in sql(line, 
cell)
        59         return _to_table(df, num_rows=args.limit)
        60 else:
   ---> 61     return _to_table(spark.sql(cell))
   
   File /opt/spark/python/pyspark/sql/session.py:1034, in 
SparkSession.sql(self, sqlQuery, **kwargs)
      1032     sqlQuery = formatter.format(sqlQuery, **kwargs)
      1033 try:
   -> 1034     return DataFrame(self._jsparkSession.sql(sqlQuery), self)
      1035 finally:
      1036     if len(kwargs) > 0:
   
   File /opt/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/java_gateway.py:1320, 
in JavaMember.__call__(self, *args)
      1313 args_command, temp_args = self._build_args(*args)
      1315 command = proto.CALL_COMMAND_NAME +\
      1316     self.command_header +\
      1317     args_command +\
      1318     proto.END_COMMAND_PART
   -> 1320 answer = self.gateway_client.send_command(command)
      1321 return_value = get_return_value(
      1322     answer, self.gateway_client, self.target_id, self.name)
      1324 for temp_arg in temp_args:
   
   File /opt/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/java_gateway.py:1036, 
in GatewayClient.send_command(self, command, retry, binary)
      1015 def send_command(self, command, retry=True, binary=False):
      1016     """Sends a command to the JVM. This method is not intended to be
      1017        called directly by Py4J users. It is usually called by
      1018        :class:`JavaMember` instances.
      (...)
      1034      if `binary` is `True`.
      1035     """
   -> 1036     connection = self._get_connection()
      1037     try:
      1038         response = connection.send_command(command)
   
   File /opt/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/clientserver.py:284, 
in JavaClient._get_connection(self)
       281     pass
       283 if connection is None or connection.socket is None:
   --> 284     connection = self._create_new_connection()
       285 return connection
   
   File /opt/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/clientserver.py:291, 
in JavaClient._create_new_connection(self)
       287 def _create_new_connection(self):
       288     connection = ClientServerConnection(
       289         self.java_parameters, self.python_parameters,
       290         self.gateway_property, self)
   --> 291     connection.connect_to_java_server()
       292     self.set_thread_connection(connection)
       293     return connection
   
   File /opt/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/clientserver.py:438, 
in ClientServerConnection.connect_to_java_server(self)
       435 if self.ssl_context:
       436     self.socket = self.ssl_context.wrap_socket(
       437         self.socket, server_hostname=self.java_address)
   --> 438 self.socket.connect((self.java_address, self.java_port))
       439 self.stream = self.socket.makefile("rb")
       440 self.is_connected = True
   
   ConnectionRefusedError: [Errno 111] Connection refused


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to