ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
428 stars 120 forks source link

v251 database module crashes #3248

Open germa89 opened 3 months ago

germa89 commented 3 months ago

It seems that latest v25.1 docker image crashes when testing database module.

The detailed output is below, but it seems the error is due to the starting the DATABASE:

return self._mapdl.run("/DBS,SERVER,STATUS")

Pytest output

Details

```bash ============================= test session starts ============================== platform darwin -- Python 3.10.13, pytest-8.2.2, pluggy-1.5.0 -------------------------------Testing variables-------------------------------- Session dependent: ON_CI (False), TESTING_MINIMAL (False), SUPPORT_PLOTTING (True) OS dependent: ON_LINUX (False), ON_UBUNTU (False), ON_WINDOWS (False), ON_MACOS )(True) MAPDL dependent: ON_LOCAL (False), ON_STUDENT (False), HAS_GRPC (True), HAS_DPF (True), IS_SMP (True) -----------------------------Environment variables------------------------------ PYMAPDL_START_INSTANCE ('False'), PYMAPDL_PORT ('50072'), PYMAPDL_DB_PORT ('50075'), DPF_PORT ('50056'), DPF_START_SERVER ('false'), ------------------------------Pytest configuration------------------------------ rootdir: /Users/german.ayuso/pymapdl configfile: pyproject.toml plugins: cov-5.0.0, anyio-4.3.0, rerunfailures-14.0, pytest_pyvista-0.1.9, sphinx-0.6.3, memprof-0.2.0 collected 28 items tests/test_database.py s.EEEEEEEEEEEEEEEEEEEEEEEEEE [100%] ==================================== ERRORS ==================================== _____________________ ERROR at setup of test_database_repr _____________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _________________________ ERROR at setup of test_save __________________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _________________________ ERROR at setup of test_clear _________________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_repr _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_first ______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_next _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_info _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ____________________ ERROR at setup of test_nodes_num[True] ____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ___________________ ERROR at setup of test_nodes_num[False] ____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _____________________ ERROR at setup of test_nodes_max_num _____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_coord ______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _____________________ ERROR at setup of test_nodes_asarray _____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_nodes_push _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_elems_repr _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_elems_first ______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_elems_next _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_elems_info _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ____________________ ERROR at setup of test_elems_num[True] ____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ___________________ ERROR at setup of test_elems_num[False] ____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _____________________ ERROR at setup of test_elems_max_num _____________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _______________________ ERROR at setup of test_elems_get _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ______________________ ERROR at setup of test_elems_push _______________________ mapdl = @pytest.fixture(scope="session") def gen_block(mapdl): """Generate nodes and elements in a simple block.""" > mapdl.clear() tests/test_database.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_extended.py:1272: in clear self._create_session() src/ansys/mapdl/core/mapdl_grpc.py:3302: in _create_session self._run(f"{SESSION_ID_NAME}='{id_}'") src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, "__PYMAPDL_SESSION_ID__='33737da769854347a40ed9a4860'") kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-07-08T12:47:14.711853+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _____________________ ERROR at setup of test__channel_str ______________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ________________________ ERROR at setup of test_off_db _________________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ___________________ ERROR at setup of test_wrong_api_version ___________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError _________________________ ERROR at setup of test_repr __________________________ mapdl = @pytest.fixture(scope="session") def db(mapdl): from ansys.api.mapdl import __version__ as api_version api_version = tuple(int(each) for each in api_version.split(".")) if api_version < (0, 5, 1): pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.") ## Checking MAPDL versions mapdl_version = str(mapdl.version) if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION): pytest.skip( f"This MAPDL version ({mapdl_version}) is not compatible with the Database module." ) ## Exceptions # Exception for 22.2 if mapdl_version == "22.2" and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) if mapdl_version == "24.1" or mapdl_version == "24.2": pytest.skip( f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database." ) if mapdl._server_version < (0, 4, 1): # 2021R2 ver_ = ".".join([str(each) for each in mapdl._server_version]) pytest.skip( f"This version of MAPDL gRPC API version ('ansys.api.mapdl' == {ver_}) is not compatible with 'database' module." ) mapdl.clear() > mapdl.db.start() tests/test_database.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/ansys/mapdl/core/mapdl_grpc.py:2682: in db self._db.start() src/ansys/mapdl/core/database/database.py:262: in start is_running = self.active src/ansys/mapdl/core/database/database.py:213: in active return "NOT" not in self._status() src/ansys/mapdl/core/database/database.py:338: in _status return self._mapdl.run("/DBS,SERVER,STATUS") src/ansys/mapdl/core/mapdl_core.py:2212: in run text = self._run(command, verbose=verbose, mute=mute) src/ansys/mapdl/core/mapdl_grpc.py:904: in _run response = self._send_command(cmd, mute=mute) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, '/DBS,SERVER,STATUS') kwargs = {'mute': False}, old_handler = class_name = 'MapdlGrpc' mapdl = @wraps(func) def wrapper(*args, **kwargs): """Capture gRPC exceptions and KeyboardInterrupt""" # capture KeyboardInterrupt old_handler = None if threading.current_thread().__class__.__name__ == "_MainThread": if threading.current_thread().is_alive(): old_handler = signal.signal(signal.SIGINT, handler) # Capture gRPC exceptions try: out = func(*args, **kwargs) except (_InactiveRpcError, _MultiThreadedRendezvous) as error: # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ except: class_name = "" if class_name == "MapdlGrpc": mapdl = args[0] elif hasattr(args[0], "_mapdl"): mapdl = args[0]._mapdl # Must close unfinished processes mapdl._close_process() > raise MapdlExitedError( f"MAPDL server connection terminated with the following error\n{error}" ) from None E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error E <_InactiveRpcError of RPC that terminated with: E status = StatusCode.UNAVAILABLE E details = "Socket closed" E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-07-08T12:47:14.380734+02:00"}" E > src/ansys/mapdl/core/errors.py:319: MapdlExitedError ========================= memory consumption estimates ========================= pymapdl::tests::test_database.py::test_database_start_stop - 176.0 KB ========================= PyMAPDL Pytest short summary ========================= [ERROR] test_database_repr - E > [ERROR] test_save - E > [ERROR] test_clear - E > [ERROR] test_nodes_repr - E > [ERROR] test_nodes_first - E > [ERROR] test_nodes_next - E > [ERROR] test_nodes_info - E > [ERROR] test_nodes_num[True] - E > [ERROR] test_nodes_num[False] - E > [ERROR] test_nodes_max_num - E > [ERROR] test_nodes_coord - E > [ERROR] test_nodes_asarray - E > [ERROR] test_nodes_push - E > [ERROR] test_elems_repr - E > [ERROR] test_elems_first - E > [ERROR] test_elems_next - E > [ERROR] test_elems_info - E > [ERROR] test_elems_num[True] - E > [ERROR] test_elems_num[False] - E > [ERROR] test_elems_max_num - E > [ERROR] test_elems_get - E > [ERROR] test_elems_push - E > [ERROR] test__channel_str - E > [ERROR] test_off_db - E > [ERROR] test_wrong_api_version - E > [ERROR] test_repr - E > =================== 1 passed, 1 skipped, 26 errors in 3.88s ==================== ```

MAPDL output

 /OUTPUT FILE= anstmp

 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE                  25.1BETA ***
 Ansys Mechanical Enterprise                       
 00000000  VERSION=LINUX x64     10:47:13  JUL 08, 2024 CP=      1.104

 ** WARNING: PRE-RELEASE VERSION OF MAPDL 25.1BETA
  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **

          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****

 /OUTPUT FILE= anstmp

 /OUTPUT FILE= anstmp

 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE                  25.1BETA ***
 Ansys Mechanical Enterprise                       
 00000000  VERSION=LINUX x64     10:47:14  JUL 08, 2024 CP=      1.112

 ** WARNING: PRE-RELEASE VERSION OF MAPDL 25.1BETA
  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **

          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****

 /OUTPUT FILE= anstmp

 /OUTPUT FILE= anstmp

 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE                  25.1BETA ***
 Ansys Mechanical Enterprise                       
 00000000  VERSION=LINUX x64     10:47:14  JUL 08, 2024 CP=      1.116

 ** WARNING: PRE-RELEASE VERSION OF MAPDL 25.1BETA
  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **

          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****

 /OUTPUT FILE= anstmp

 /OUTPUT FILE= anstmp

 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE                  25.1BETA ***
 Ansys Mechanical Enterprise                       
 00000000  VERSION=LINUX x64     10:47:14  JUL 08, 2024 CP=      1.120

 ** WARNING: PRE-RELEASE VERSION OF MAPDL 25.1BETA
  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **

          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****

 /OUTPUT FILE= anstmp

 ***** ROUTINE COMPLETED *****  CP =         1.123

 CLEAR MAPDL DATABASE AND RESTART

 Ansys Mechanical Enterprise                       

 ***** ROUTINE COMPLETED *****  CP =         1.224

 /OUTPUT FILE= anstmp

 /OUTPUT FILE= anstmp

 Current ANSYS Traceback:
     DBServer                        
     Mapdl::SendCommand              
     Mapdl::SendCommand              
     Mapdl::SendCommand              
     GRPC_Start                      
     gRPCMapdlStart                  
     ANSYS
/ansys_inc/ansys/bin/mapdl: line 412:   158 Segmentation fault      /ansys_inc/ansys/bin/linx64/ansys.e -grpc -m 8192 -db 2048 -meba -smp -np 4
germa89 commented 3 months ago

Notes: never forget to update PYMAPDL_DB_PORT env var when testing locally.

germa89 commented 3 months ago

Code to replicate:

Launch MAPDL

ansys251 -grpc -port 50053

Python code

from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core.examples import vmfiles
# from vm1 import vm1

ip = "REDACTED" # leon5
port = 50053

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port)
mapdl._ctrl("set_verb", 5)

print(mapdl.run("/DBS,SERVER,STATUS")) # Crash
germa89 commented 3 months ago

The above code fails at the second attemp on a live instance.

germa89 commented 2 months ago

Given the following script:

from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core.examples import vmfiles

ip = "leon5"
port = 50052

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port)
mapdl._ctrl("set_verb", 5)

mapdl.db.start()

## Just trying combinations
mapdl.db.stop() # not relevant

mapdl.db.start() # not relevant
mapdl.db.stop() # not relevant

mapdl.exit() # not relevant
##

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port)
mapdl._ctrl("set_verb", 5)

mapdl.db.start() # always crash

It always crashes at the last mapdl.db.start() call.

However in:

from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core.examples import vmfiles

ip = "leon5"
port = 50052

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port, clear_on_connect=False)
mapdl._ctrl("set_verb", 5)
mapdl.db.start()

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port, clear_on_connect=False)
mapdl._ctrl("set_verb", 5)

mapdl.db.start() # always crash

there is no crash. It seems that mapdl.clear is deleting something that MAPDL DB server needs. I am still investigating.

germa89 commented 2 months ago

it seems that /CLEAR does kill APDL Math instance (cleardb.F -> APDLMathReset -> C_APDLMath::Kill()).

germa89 commented 2 months ago

Interestingly, if I try to relunch the plugin mechanism:

mapdl = launch_mapdl(start_instance=False, ip=ip, port=port, clear_on_connect=False)
mapdl._ctrl("set_verb", 5)
mapdl.db.start()

mapdl.clear()
mapdl.run("*PLUG,LOAD,GrpcDb")

I get:

 /OUTPUT FILE= anstmp
cmd: *PLUG,LOAD,GrpcDb
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1723020316.195199 1988648 descriptor_database.cc:633] File already exists in database: mapdl_db.proto
F0000 00:00:1723020316.195783 1988648 descriptor.cc:2120] Check failed: GeneratedDatabase()->Add(encoded_file_descriptor, size) 
*** Check failure stack trace: ***
linking # this is my changes
linking
linking
forrtl: error (76): Abort trap signal
Image              PC                Routine            Line        Source             
libc.so.6          00007F6407E3E6F0  Unknown               Unknown  Unknown
libc.so.6          00007F6407E8B94C  Unknown               Unknown  Unknown
libc.so.6          00007F6407E3E646  raise                 Unknown  Unknown
libc.so.6          00007F6407E287F3  abort                 Unknown  Unknown
libabsl_log_inter  00007F629808B1C2  _ZN4absl12lts_202     Unknown  Unknown
libabsl_log_inter  00007F629808B4C5  Unknown               Unknown  Unknown
libabsl_log_inter  00007F629808B714  _ZN4absl12lts_202     Unknown  Unknown
libabsl_log_inter  00007F629808B859  _ZN4absl12lts_202     Unknown  Unknown
libprotobuf.so.25  00007F629D201DF4  Unknown               Unknown  Unknown
libprotobuf.so.25  00007F629D2BA407  _ZN6google8protob     Unknown  Unknown
ld-linux-x86-64.s  00007F6448BF407E  Unknown               Unknown  Unknown
ld-linux-x86-64.s  00007F6448BF416C  Unknown               Unknown  Unknown
libc.so.6          00007F6407F561A5  _dl_catch_excepti     Unknown  Unknown
ld-linux-x86-64.s  00007F6448BFAB5E  Unknown               Unknown  Unknown
libc.so.6          00007F6407F56148  _dl_catch_excepti     Unknown  Unknown
ld-linux-x86-64.s  00007F6448BFAF5F  Unknown               Unknown  Unknown
libc.so.6          00007F6407E85CBC  Unknown               Unknown  Unknown
libc.so.6          00007F6407F56148  _dl_catch_excepti     Unknown  Unknown
libc.so.6          00007F6407F56213  _dl_catch_error       Unknown  Unknown
libc.so.6          00007F6407E8578E  Unknown               Unknown  Unknown
libc.so.6          00007F6407E85D71  dlopen                Unknown  Unknown
libCKernel.so      00007F6415990112  _ZN12C_DynLibrary     Unknown  Unknown
libansys.so        00007F641D8D3A02  _ZN11C_PluginMgr1     Unknown  Unknown
libansys.so        00007F641D9816C2  _ZN14C_APDLMathPl     Unknown  Unknown
libansys.so        00007F641D980473  _ZN14C_APDLMathPl     Unknown  Unknown
libansys.so        00007F641D086930  _ZN10C_APDLMath14     Unknown  Unknown
libansys.so        00007F641D084F4B  apdlmath_             Unknown  Unknown
libansys.so        00007F6426246927  Unknown               Unknown  Unknown
libansys.so        00007F6426231E1E  rdcmd_                Unknown  Unknown
libansys.so        00007F64273C802B  utcmd_                Unknown  Unknown
ansys.e            00000000004100A6  Unknown               Unknown  Unknown
libansys.so        00007F64204DAF01  runcommand_           Unknown  Unknown
libGrpcMapdl.so    00007F629FFBB188  _ZN18C_MapdlServi     Unknown  Unknown
libGrpcMapdl.so    00007F62A007C924  Unknown               Unknown  Unknown
libgrpc++.so.1.60  00007F629F463BF8  _ZN4grpc6Server11     Unknown  Unknown
libgrpc++.so.1.60  00007F629F464B88  _ZN4grpc6Server24     Unknown  Unknown
libgrpc++.so.1.60  00007F629F468673  _ZN4grpc13ThreadM     Unknown  Unknown
libgrpc++.so.1.60  00007F629F4687EC  _ZN4grpc13ThreadM     Unknown  Unknown
libgpr.so.37.0.0   00007F629DCE1763  Unknown               Unknown  Unknown
libc.so.6          00007F6407E89C02  Unknown               Unknown  Unknown
libc.so.6          00007F6407F0EC40  Unknown               Unknown  Unknown
/ansys_inc/v251/ansys/bin/ansysdis251: line 87: 1988518 Aborted                 (core dumped) /ansys_inc/v251/ansys/bin/linx64/ansys.e -grpc

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 1 PID 1987985 RUNNING AT leon5
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 2 PID 1987986 RUNNING AT leon5
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 3 PID 1987987 RUNNING AT leon5
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

The above protobuff error:

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1723020316.195199 1988648 descriptor_database.cc:633] File already exists in database: mapdl_db.proto
F0000 00:00:1723020316.195783 1988648 descriptor.cc:2120] Check failed: GeneratedDatabase()->Add(encoded_file_descriptor, size) 

seems to mean that the plugin code links against two libs which use protobuf and, apparently, use the same protobuf objects.

Reference: https://groups.google.com/g/protobuf/c/RZRCnOywdSk/m/s5QvifLCBgAJ

Trying to unload the plugin (before or after the mapdl.clear()) does not avoid the crash:

mapdl.run("*PLUG,UNLOAD,GrpcDb")

mapdl.clear()

# mapdl.run("*PLUG,UNLOAD,GrpcDb")
mapdl.run("*PLUG,LOAD,GrpcDb")

I will keep reporting

I'm kent Brockman

How to deal with "File already exists in database:" error correctly?
germa89 commented 2 months ago

Surprisingly, cleaning up the database (/CLEAR) does not break the DB plugin when not using PyMAPDL (using interactive MAPDL session: ansys251).

Well.. actually not that surprising... the above error seems to say the libs were already linked. If we are not using PyMAPDL gRPC server, there is a good chance that the libs are not double linked, not raising the error.

I think the plugin should be unloaded properly (unload method does seems to do nothing) during cleanup.

germa89 commented 2 months ago

Related to this, I was under the impression that v24.1 and v24.2 were broken too

However, I just installed v241 on Windows 11 and I kind of got it working:

(.venv_win) PS C:\Users\gayuso\pymapdl> pytest .\tests\test_database.py
============================================================================================ test session starts ============================================================================================= 
platform win32 -- Python 3.10.5, pytest-8.2.2, pluggy-1.5.0 -- C:\Users\gayuso\pymapdl\.venv_win\Scripts\python.exe
-----------------------------------------------------------------------------------------------Testing variables-----------------------------------------------------------------------------------------------
Session dependent: ON_CI (False), TESTING_MINIMAL (False), SUPPORT_PLOTTING (True)
OS dependent: ON_LINUX (False), ON_UBUNTU (False), ON_WINDOWS (True), ON_MACOS (False)
MAPDL dependent: ON_LOCAL (True), ON_STUDENT (False), HAS_GRPC (True), HAS_DPF (False), IS_SMP (True)
---------------------------------------------------------------------------------------------Environment variables---------------------------------------------------------------------------------------------
PYMAPDL_PORT ('50053'),
----------------------------------------------------------------------------------------------Pytest configuration---------------------------------------------------------------------------------------------
cachedir: .pytest_cache
rootdir: C:\Users\gayuso\pymapdl
configfile: pyproject.toml
plugins: cov-5.0.0, pytest_pyvista-0.1.9, rerunfailures-14.0
collected 28 items                                                                                                                                                                                             

tests/test_database.py::test_failure_on_non_allowed_versions FAILED                                                                                                                                     [  3%]
tests/test_database.py::test_database_start_stop FAILED                                                                                                                                                 [  7%]
tests/test_database.py::test_database_repr PASSED                                                                                                                                                       [ 10%]
tests/test_database.py::test_save PASSED                                                                                                                                                                [ 14%]
tests/test_database.py::test_clear PASSED                                                                                                                                                               [ 17%]
tests/test_database.py::test_nodes_repr PASSED                                                                                                                                                          [ 21%]
tests/test_database.py::test_nodes_first PASSED                                                                                                                                                         [ 25%]
tests/test_database.py::test_nodes_next PASSED                                                                                                                                                          [ 28%]
tests/test_database.py::test_nodes_info PASSED                                                                                                                                                          [ 32%]
tests/test_database.py::test_nodes_num[True] PASSED                                                                                                                                                     [ 35%]
tests/test_database.py::test_nodes_num[False] PASSED                                                                                                                                                    [ 39%]
tests/test_database.py::test_nodes_max_num PASSED                                                                                                                                                       [ 42%]
tests/test_database.py::test_nodes_coord PASSED                                                                                                                                                         [ 46%]
tests/test_database.py::test_nodes_asarray PASSED                                                                                                                                                       [ 50%]
tests/test_database.py::test_nodes_push PASSED                                                                                                                                                          [ 53%]
            )

        # Exception for 22.2
        if mapdl_version == "22.2" and ON_CI:
            pytest.skip(
                f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does."
            )

        if mapdl_version in FAILING_DATABASE_MAPDL:
            pytest.skip(
                f"This MAPDL version ({mapdl_version}) docker image does not support Database module."
            )

        # verify it can be created twice
        mapdl.prep7()
        for _ in range(2):
            database = MapdlDb(mapdl)
>           assert not database.active
E           assert not True
E            +  where True = <ansys.mapdl.core.database.database.MapdlDb object at 0x000001FB2BE8ABF0>.active

tests\test_database.py:130: AssertionError
======================================================================================== PyMAPDL Pytest short summary ======================================================================================== 
[FAILED] test_failure_on_non_allowed_versions - E           Failed: DID NOT RAISE <class 'ansys.mapdl.core.errors.MapdlVersionError'>
[FAILED] test_database_start_stop - E            +  where True = <ansys.mapdl.core.database.database.MapdlDb object at 0x000001FB2BE8ABF0>.active
================================================================================== 2 failed, 26 passed in 92.01s (0:01:32) =================================================================================== 

I shall revisit this.