TAGGED: rocky-dem
-
-
August 28, 2026 at 7:11 pm
jlcyr
SubscriberIs the API supposed to work with the student edition/licence of ansys/rocky 2026R1?
My script is working correctly with commercially licensed rocky but crash with student edition.
I could launch rocky with the code correctly then it lost the connection. If I launch Rocky manually and try to connect from the script it can't connect at all.
#1- launch rocky implicitely, rocky launched then connection is lost
rocky = pyrocky.launch_rocky(headless=False)
#2 - Launch rocky explicitely, same, it launch then connection is lost
from pathlib import Path
rocky_exe_path = Path(r"C:Program FilesANSYS IncANSYS Studentv261rockybinRocky.exe")
rocky = pyrocky.launch_rocky(rocky_exe=rocky_exe_path, server_port=5061, headless=False)#3- Launch rocky manually (in a shell or thru windows menu) then launch the script, can't connect
rocky = pyrocky.connect_to_rocky()
Yes, firewall rules are opened explicitely on windows defender both on input and output for rocky.exe application
The same code work flawless (any of it) with a teaching/research licence, but I want student to be able to run them at home with their personnal student version/license.
Â
-
August 28, 2026 at 10:49 pm
jlcyr
SubscriberOk! It was really weird, on windows 11, Rocky always bind it's service on IPV6 port by default and python is always trying on IPV4
A Port dump givesÂ
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess, @{Name="ProcessName"; Expression={(Get-Process -Id $_.OwningProcess).ProcessName}} | Format-Table -AutoSize
::1Â Â Â Â Â 18615 Â Â Â Â 15228 Rocky
and nothing on localhost ipv4 127.0.0.1
After forcing (supposedly) windows on IPV4 in the registry (and rebooting) It finally listen on IPV4
Setting "DisabledComponents" = 0x20 under
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpip6Parameters
will set that machine to use IPv4 instead of IPv6 in prefix policies.
Create the registry key if it doesn't exist.
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess, @{Name="ProcessName"; Expression={(Get-Process -Id $_.OwningProcess).ProcessName}} | Format-Table -AutoSize
127.0.0.1 Â Â Â Â 18615 Â Â Â Â 15228 Rocky
So it has nothing to do with student version licensing but TCP/IP handling. I've search for a simplier solution like adding some command line arguments (IA and Forum suggestions) like Rocky.exe -schost=127.0.0.1 -scport=18615 but no success at all with this method.
Even in the official documentation cmd line args are for headless mode, choosing/running a simulation, but nothing about the API Server.
-
- You must be logged in to reply to this topic.
-
6880
-
1906
-
1544
-
1344
-
1217
© 2026 Copyright ANSYS, Inc. All rights reserved.