Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10391 (closed)

Opened 6 years ago

Closed 3 years ago

Bug: win32 errors on bin\omero (admin, web, ...)

Reported by: jamoore Owned by:
Priority: minor Milestone: 5.x
Component: Deployment Version: OMERO-5.2.0
Keywords: n.a. Cc: khgillen
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Error when not in a console as an admin:

C:\>python %HOMEPATH%\OMERO-qa-upgrade.py
...
Traceback (most recent call last):
 File "C:\OMERO-CURRENT\lib\python\omero_web_iis.py", line 73, in <module>
   permit_iis(CONFIG)
 File "C:\OMERO-CURRENT\lib\python\omero_web_iis.py", line 69, in permit_iis
   SetNamedSecurityInfo(filename, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, None, None, fileDacl, None )
pywintypes.error: (5, 'SetNamedSecurityInfo', 'Access is denied.')
Traceback (most recent call last):
 File "\Users\ome\OMERO-qa-upgrade.py", line 392, in <module>
   u = WindowsUpgrade(dir)
 File "\Users\ome\OMERO-qa-upgrade.py", line 224, in __init__
   self.stop(_)
 File "\Users\ome\OMERO-qa-upgrade.py", line 240, in stop
   self.stopweb(_)
 File "\Users\ome\OMERO-qa-upgrade.py", line 339, in stopweb
   _("web iis --remove")
 File "\Users\ome\OMERO-qa-upgrade.py", line 296, in _
   self.cli.invoke(command, strict=True)
 File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 748, in invoke
   self.assertRC()
 File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 737, in assertRC
   raise NonZeroReturnCode(self.rv, "assert failed")
omero.cli.NonZeroReturnCode: assert failed

Cause unknown:

c:\>OMERO-CURRENT\bin\omero admin restart
Server not running
No descriptor given. Using etc\grid\windefault.xml
OMERO.master service startup failed: (1058) The service cannot be started, either because it is disabled or because it has no
Traceback (most recent call last):
  File "c:\OMERO-CURRENT\bin\\omero", line 125, in <module>
    rv = omero.cli.argv()
  File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 1195, in argv
    cli.invoke(args[1:])
  File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 745, in invoke
    stop = self.onecmd(line, previous_args)
  File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 814, in onecmd
    self.execute(line, previous_args)
  File "c:\OMERO-CURRENT\lib\python\omero\cli.py", line 894, in execute
    args.func(args)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\prefs.py", line 68, in open_and_close_config
    return func(*args, **kwargs)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\admin.py", line 512, in restart
    self.start(args, config)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\prefs.py", line 68, in open_and_close_config
    return func(*args, **kwargs)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\admin.py", line 444, in start
    self.startasync(args, config)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\prefs.py", line 68, in open_and_close_config
    return func(*args, **kwargs)
  File "c:\OMERO-CURRENT\lib\python\omero\plugins\admin.py", line 432, in startasync
    win32service.DeleteService(hs)
pywintypes.error: (1072, 'DeleteService', 'The specified service has been marked for deletion.')

We will need to handle these and likely all exceptions that come from the use of win32 directly.

Change History (17)

comment:1 Changed 6 years ago by bpindelski

After discussing with Josh, two possible solutions came to mind:
1) Review omero/plugins/admin.py and make sure to catch all pywintypes.error elements. Also look at omero_web_iis.py and see where to catch the exception.
2) Create a decorator for CLI actions needing Administrator privileges that checks if the Command Prompt has been started with elevated privileges.

comment:2 Changed 6 years ago by bpindelski

Last edited 6 years ago by bpindelski (previous) (diff)

comment:3 Changed 6 years ago by jmoore

Another issue on bin\omero web iis:

C:\>OMERO-CURRENT\bin\omero web iis

0 static files copied to 'C:/OMERO-CURRENT/lib/python/omeroweb/static' (804 unmodified).
Traceback (most recent call last):
  File "C:\OMERO-CURRENT\lib\python\omero_web_iis.py", line 73, in <module>
    permit_iis(CONFIG)
  File "C:\OMERO-CURRENT\lib\python\omero_web_iis.py", line 64, in permit_iis
    iusr, domain, type = LookupAccountName("", "IUSR")
pywintypes.error: (1332, 'LookupAccountName', 'No mapping between account names and security IDs was done.')

comment:4 Changed 6 years ago by jmoore

  • Cc khgillen added
  • Summary changed from Bug: win32 errors on bin\omero admin to Bug: win32 errors on bin\omero (admin, web, ...)

comment:5 Changed 6 years ago by bpindelski

The new error reported by Josh might be related to the line:
iusr, domain, type = LookupAccountName("", "IUSR")
in components/tools/OmeroPy/src/omero_web_iis.py
that expects the IIS user to be IUSR. The script has been run with IIS6 on Windows Server 2003.

comment:6 Changed 6 years ago by bpindelski

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 6 years ago by bpindelski

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:8 Changed 6 years ago by bpindelski

  • Sprint set to Bugs Fixing
  • Status changed from reopened to accepted

comment:9 Changed 6 years ago by bpindelski

Similar bug that would be worth fixing along the way: https://trac.openmicroscopy.org.uk/ome/ticket/6980

comment:10 Changed 6 years ago by bpindelski

  • Sprint changed from Bugs Fixing to 2013-03-12 (6))

comment:11 Changed 6 years ago by jburel

  • Sprint changed from 2013-03-12 (6)) to 2013-04-09 (7))

Moved from sprint 2013-03-12 (6))

comment:12 Changed 6 years ago by jburel

  • Sprint changed from 2013-04-09 (7)) to 2013-05-07 (8)

Moved from sprint 2013-04-09 (7))

comment:13 Changed 6 years ago by bpindelski

  • Sprint 2013-05-07 (8) deleted

comment:14 Changed 6 years ago by bpindelski

  • Priority changed from major to minor

comment:15 Changed 6 years ago by bpindelski

  • Owner bpindelski deleted

comment:16 Changed 6 years ago by bpindelski

  • Owner set to bpindelski

comment:17 Changed 3 years ago by jamoore

  • Resolution set to duplicate
  • Status changed from accepted to closed
  • Version set to OMERO-5.2.0
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.83791 sec.)

We're Hiring!