import socket try: test_sock = socket.create_connection(("127.0.0.1", 9200), timeout=2) print(" --> DEBUG: ¡El puerto 9200 está abierto para Python!") test_sock.close() except Exception as e: print(f" --> DEBUG: Error de socket puro: {e}")