ansys / pyaedt

AEDT Python Client Package
https://aedt.docs.pyansys.com
MIT License
185 stars 101 forks source link

AEDT port not returned in client-server mode #4844

Closed nathmay closed 3 days ago

nathmay commented 1 week ago

Before submitting the issue

Description of the bug

When connecting to a server running pyaedt_service_manager(), cannot retrieve aedt_port from the RPyC client object. The correct port is displayed in pyaedt log, and if I manually use that port number, it functions okay.

cl1 = create_session(machine_name, launch_aedt_on_server=True, non_graphical=True)
PyAEDT INFO: Created new session on port 19581
INFO:Global:Created new session on port 19581
Service has started on port 19723
PyAEDT INFO: Aedt started on port 19723
INFO:Global:Aedt started on port 19723
>>> cl1.aedt_port
0
# cl1.aedt_port should be 19723 in this example, instead of 0
# If I use port 19723 for a new Dektop session, it works fine

Additional context: I am starting the server through a slurm submission, not sure if that would have any effect on this.

Steps To Reproduce

...

Which Operating System are you using?

Linux

Which Python version are you using?

3.10

Installed packages

about-time==4.2.1 alive-progress==3.1.5 annotated-types==0.7.0 ansys-api-fluent==0.3.24 ansys-api-platform-instancemanagement==1.1.0 ansys-fluent-core==0.20.1 ansys-platform-instancemanagement==1.1.2 ansys-pythonnet==3.1.0rc3 ansys-units==0.3.2 attrs==23.2.0 beartype==0.17.2 certifi==2024.6.2 cffi==1.16.0 charset-normalizer==3.3.2 clr-loader==0.2.6 contourpy==1.2.1 cycler==0.12.1 defusedxml==0.7.1 distro==1.9.0 docker==6.1.3 dotnetcore2==3.1.23 fonttools==4.53.0 fpdf2==2.7.9 grapheme==0.6.0 grpcio==1.64.1 grpcio-health-checking==1.62.2 idna==3.7 importlib_metadata==7.1.0 jsonschema==4.22.0 jsonschema-specifications==2023.12.1 kiwisolver==1.4.5 lxml==4.9.4 matplotlib==3.9.0 numpy==1.26.4 packaging==24.1 pandas==1.5.3 pillow==10.3.0 platformdirs==3.11.0 plumbum==1.8.3 pooch==1.8.2 protobuf==4.25.3 psutil==5.9.8 pyaedt==0.9.4 pycparser==2.22 pydantic==2.7.4 pydantic_core==2.18.4 pyedb==0.14.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 pytomlpp==1.0.13 pytz==2024.1 pyvista==0.43.10 PyYAML==6.0.1 referencing==0.35.1 requests==2.32.3 rpds-py==0.18.1 rpyc==6.0.0 Rtree==1.2.0 ruamel.yaml==0.18.6 ruamel.yaml.clib==0.2.8 scipy==1.13.1 scooby==0.10.0 six==1.16.0 toml==0.10.2 typing_extensions==4.12.2 urllib3==2.2.2 vtk==9.3.0 websocket-client==1.8.0 zipp==3.19.2