kakwa / ldapcherry

Web UI for managing users and groups in multiple directory services.
MIT License
225 stars 70 forks source link

No Output when execute the start command from docker #11

Closed mohamess closed 5 years ago

mohamess commented 6 years ago

I have an issue with starting ldapcherry with: root@09ee463a4295:/app# ldapcherryd -c /etc/ldapcherry/ldapcherry.ini -D root@09ee463a4295:/app#

I just got nothing and no errors/logs. the docker image is based on python2.7 and installation passed successfully:

"Installing collected packages: six, pytz, more-itertools, backports.functools-lru-cache, jaraco.functools, tempora, portend, cheroot, CherryPy, pyasn1, pyasn1-modules, python-ldap, PyYAML, MarkupSafe, Mako, ldapcherry Running setup.py install for python-ldap: started Running setup.py install for python-ldap: finished with status 'done' Running setup.py install for PyYAML: started Running setup.py install for PyYAML: finished with status 'done' Running setup.py install for MarkupSafe: started Running setup.py install for MarkupSafe: finished with status 'done' Running setup.py install for Mako: started Running setup.py install for Mako: finished with status 'done' Running setup.py install for ldapcherry: started Running setup.py install for ldapcherry: finished with status 'done' Successfully installed CherryPy-17.0.0 Mako-1.0.7 MarkupSafe-1.0 PyYAML-3.13 backports.functools-lru-cache-1.5 cheroot-6.3.3 jaraco.functools-1.20 ldapcherry-0.5.0 more-itertools-4.2.0 portend-2.3 pyasn1-0.4.3 pyasn1-modules-0.2.2 python-ldap-3.1.0 pytz-2018.5 six-1.11.0 tempora-1.13"

mohamess commented 6 years ago

root@cb4cd7a88e51:/etc/ldapcherry# ldapcherryd -c '/etc/ldapcherry/ldapcherry.ini' -D [25/Jul/2018:11:18:25] uncaught exception: [[Errno 2] No such file or directory] [25/Jul/2018:11:18:25] application failed to start

vlitvin commented 6 years ago

@mohamess No files in template_dir and tools.staticdir.dir after installation with default config. Maybe https://github.com/Informatic/ldapcherry/tree/dockerfile can help.

kakwa commented 5 years ago

Hello,

I do not recommend running ldapcherry with the -D flag.

It will set the log level to 'debug', and in this mode, everything is logged, including passwords.

(I've just added a warning in the doc regarding 'debug' log level)

For docker users, I've added an 'stdout' log mode starting with 1.1.0, which should ease this use case.

With previous versions, a trick was to use the file logger and set /dev/stdout as the log file, it doesn't work with python 3, and the logs are not really pretty, but it works.

As for the error, you need to set templates.dir and tools.staticdir.dir correctly in ldapcherry.ini, probably with something like /usr/share/ldapcherry/templates/ and /usr/share/ldapcherry/static/, but this could depend on your installation pattern.