plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
6 stars 23 forks source link

bin/instance.exe fails on Windows #144

Closed jensens closed 3 years ago

jensens commented 4 years ago

Using a fixed buildout.coredev 5.2 (branch fix-windows) in an Administrator PowerShell the startup of Plone fails with:

Traceback (most recent call last):
  File "C:\Users\niho2\buildout.coredev\bin\instance-script.py", line 259, in <module>
+ sys.argv[1:]))

  File "c:\users\niho2\buildout.coredev\src\plone.recipe.zope2instance\src\plone\recipe\zope2instance\ctl.py", line 988, in main
    c = ZopeCmd(options)
  File "c:\users\niho2\buildout.coredev\eggs\zdaemon-4.3-py3.7.egg\zdaemon\zdctl.py", line 124, in init
    self.get_status()
  File "c:\users\niho2\buildout.coredev\src\plone.recipe.zope2instance\src\plone\recipe\zope2instance\ctl.py", line 469, in get_status
    ZDCmd.get_status(self)
  File "c:\users\niho2\buildout.coredev\eggs\zdaemon-4.3-py3.7.egg\zdaemon\zdctl.py", line 242, in get_status
    resp = self.send_action("status")
  File "c:\users\niho2\buildout.coredev\eggs\zdaemon-4.3-py3.7.egg\zdaemon\zdctl.py", line 218, in send_action
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
AttributeError: module 'socket' has no attribute 'AF_UNIX'
fazalsulaiman commented 4 years ago

We are getting the same error in Windows system

jensens commented 4 years ago

There is a way to get it up and running, I described it here: https://community.plone.org/t/plone-5-2-2-soft-released/12487/66

jensens commented 4 years ago

@plone/framework-team May you please take this on your agenda?I think it is strategical very important to come to a solution here. I know this is more than reviewing PLIPs, but I don't know who else is in charge to push this.

mauritsvanrees commented 4 years ago

After much waiting on fixes and releases, we are finally really close to a Plone 5.2.2 release, including lots of Windows fixes. If there is a fix for this issue, I could still include it, but it will have to be soon. I need to do a few more package releases, and then want to make it final on Friday or Saturday. I don't want to delay further.

jensens commented 4 years ago

I quick fix would be to not generate instance scripts and to generate a different [server:main] section here. Then in the docs we would point Windows users to run .\bin\runwsgi.exe -dv parts/instance/etc/wsgi.ini`.

Not optimal, but I do not see how to quickly refactor instance scripts b/c there bound to Unix-only zdaemon.

jensens commented 4 years ago

@mauritsvanrees I try to address the most urgent issues in #144 - but it wont does not close this one.

icemac commented 4 years ago

@jensens Did #151 (the actual PR) fix this issue so it can be closed?

jensens commented 4 years ago

well, its enables using workaround and does not fix the actual problem

jensens commented 3 years ago

I dont see how to fix this, close