Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start multprocTCPBase on thespian shell #74

Open
jemferraz opened this issue Sep 24, 2024 · 12 comments
Open

Unable to start multprocTCPBase on thespian shell #74

jemferraz opened this issue Sep 24, 2024 · 12 comments

Comments

@jemferraz
Copy link

Hi,
I've been trying to create an actor system in my windows 10 laptop, without success: I keep receiving the message thespian.actors.InvalidActorAddress: ActorAddr-(T|:1900) is not a valid ActorSystem admin, although this port is not being used by any program, as given by netstat -ano -p tcp:

C:\Users\josee>netstat -ano -p tcp

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1616
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:2179           0.0.0.0:0              LISTENING       3324
  TCP    0.0.0.0:5040           0.0.0.0:0              LISTENING       7148

I then tried to start the the actor system in the thespian shell, to no avail:

Microsoft Windows [Version 10.0.19045.4894]
(c) Microsoft Corporation. All rights reserved.

C:\Users\josee>d:

D:\>cd D:\Dados\quant\research\actor_model

D:\Dados\quant\research\actor_model>python -m thespian.shell
Thespian Actor shell.  Type help or '?' to list commands.'

thespian> start multprocTCPBase
Starting multprocTCPBase ActorSystem
Capabilities: {}
***ERROR starting ActorSystem with specified Base: multprocTCPBase
Traceback (most recent call last):
  File "D:\ProgramData\Anaconda3\lib\site-packages\thespian\shell.py", line 122, in do_start
    self.system = ActorSystem(base, caps)
  File "D:\ProgramData\Anaconda3\lib\site-packages\thespian\actors.py", line 637, in __init__
    systemBase = self._startupActorSys(
  File "D:\ProgramData\Anaconda3\lib\site-packages\thespian\actors.py", line 673, in _startupActorSys
    module = importlib.import_module('thespian.system.' + systemBase)
  File "D:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'thespian.system.multprocTCPBase'
thespian>

I've already tried to turn off Mcafee firewall, as well as uninstall and re-install thespian, but without success.

Do you have any idea of what might be happening and what can I do?
Thank you for your attention,

@dpeschman
Copy link

Howdy. Regarding the shell start, the base has an “i” in multi - multiprocTCPBase.

@jemferraz
Copy link
Author

@dpeschman Thank you very much for your observation! That was a very stupid error...

However, I am still unable to create the actor system:

Microsoft Windows [Version 10.0.19045.4894]
(c) Microsoft Corporation. All rights reserved.

C:\Users\josee>d:

D:\>cd D:\Dados\quant\research\actor_model

D:\Dados\quant\research\actor_model>cd
D:\Dados\quant\research\actor_model

D:\Dados\quant\research\actor_model>python -m thespian.shell
Thespian Actor shell.  Type help or '?' to list commands.'

thespian> start multiprocTCPBase
Starting multiprocTCPBase ActorSystem
Capabilities: {}
***ERROR from Actor System: ActorAddr-(T|:1900) is not a valid ActorSystem admin
thespian>

Any idea?

@kquick
Copy link
Member

kquick commented Sep 26, 2024 via email

@jemferraz
Copy link
Author

@kquick Thank you very much for your suggestions!

However, after turning off both the antivirus firewall (McAfee LiveSafe) and the Windows firewall & network protection (Domain, Private and Public networks), I was still unable to start the actor system. I've also tried to use different ports (1901 and 16385), and I've also added an inbound rule for ports 1901 to 1950 in the Windows Defender Firewall to allow Pyhon programs, but none of these actions worked out, and I kept on receiving the same type of error, namely:

ActorAddr-(T|:16385) is not a valid ActorSystem admin

Sorry to bother, but do you have any suggestion? Do you think that there might be a problem in the hardware (I am currently testing using a Dell Inspiron 7580 laptop, with Windows 10 Pro, but previously I have run the model in a different machine, a Dell desktop without any problem...)?

@mistrey
Copy link

mistrey commented Oct 9, 2024

This bug is a regression that was introduced after version 3.10.5. This version is still working for me with the multiprocTCPBase implementation under Windows. The newest version doesn't.

@jemferraz
Copy link
Author

@mistrey Ah, got it... May have to revert back to the previous version then. Thanks for the insight!

@gbanasiak
Copy link
Contributor

#79 fixed this. I was still getting the same symptom on Windows with 4a7b522, but not with acf5cb2.

@jemferraz
Copy link
Author

@gbanasiak Thanks for your warning!
I've uninstalled thespian and reinstalled it (with the --no-cache-dir option), but to no avail: I still received the same error, namely

Starting multiprocTCPBase ActorSystem
Capabilities: {}
***ERROR from Actor System: ActorAddr-(T|:1900) is not a valid ActorSystem admin

Perhaps this is still not the correct commit. Do you have any suggestion?

@gbanasiak
Copy link
Contributor

@jemferraz #79 was not released yet. The latest release is 3.10.7 from January 2023.

Can you verify the fix by installing Thespian directly from the source?

pip uninstall thespian
pip install git+https://github.com/thespianpy/Thespian.git

Example run:

% pip install git+https://github.com/thespianpy/Thespian.git
Collecting git+https://github.com/thespianpy/Thespian.git
  Cloning https://github.com/thespianpy/Thespian.git to /private/var/folders/fy/mlp_1k2s5yx_vm9gt82dc3140000gn/T/pip-req-build-ozw1s1r0
  Running command git clone --filter=blob:none --quiet https://github.com/thespianpy/Thespian.git /private/var/folders/fy/mlp_1k2s5yx_vm9gt82dc3140000gn/T/pip-req-build-ozw1s1r0
  Resolved https://github.com/thespianpy/Thespian.git to commit acf5cb2543da2979f0866013d0c6af3c8481dec6
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: thespian
  Building wheel for thespian (setup.py) ... done
  Created wheel for thespian: filename=thespian-3.10.7-py3-none-any.whl size=278693 sha256=e8996f410342e09d7c15433fc2279be790447c68986c6c77588c1c38cc007321
  Stored in directory: /private/var/folders/fy/mlp_1k2s5yx_vm9gt82dc3140000gn/T/pip-ephem-wheel-cache-a2bp9smd/wheels/d2/04/a7/a7a55a1de021f3acdac08a20c8a8d5ec68e42fafaa0c4c7fe2
Successfully built thespian
Installing collected packages: thespian
Successfully installed thespian-3.10.7

The version was not bumped up yet in the source, so it will still show 3.10.7 but hopefully the behavior will be different.

@jemferraz
Copy link
Author

@gbanasiak Sure!
I reinstalled Thespian as you instructed, and now it is working perfectly:

thespian> start multiprocTCPBase
Starting multiprocTCPBase ActorSystem
Capabilities: {}
Started multiprocTCPBase ActorSystem
thespian>

Thank you very much for your help!!!

@gbanasiak
Copy link
Contributor

@jemferraz Note this is just a temporary solution. You should upgrade to 3.10.8 once it is released.

@jemferraz
Copy link
Author

@gbanasiak I'll do that as soon as it is released!
Thanks for the advice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants