nginxinc/nginx-ldap-auth

Invalid option `--url` in `nginx-ldap-auth.default`

m4rcu5 opened this issue · 4 comments

Hi,

#URL="--url ldap://example.com:389"

The variable URL includes the option --url which results in error: unrecognized arguments: --url. The abbreviated option -u works fine.

works fine for me. Which python version and/or argparse module version are you using?

~ # python -c "import argparse; import sys; print sys.version; print argparse.__version__"
2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
1.1

Defaults of Debian 9.5

Just tested on Debian 9 fresh image, all works fine:
(package was built with uncommented URL)

user@deb uname -a
Linux deb 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
user@deb python -c "import argparse; import sys; print sys.version; print argparse.__version__"
2.7.13 (default, Nov 24 2017, 17:33:09) 
[GCC 6.3.0 20170516]
1.1
user@deb:~$ sudo /etc/init.d/nginx-ldap-auth start
[ ok ] Starting nginx-ldap-auth (via systemctl): nginx-ldap-auth.service.
user@deb:~$ ps aux|grep nginx
nginx-l+  2580  1.5  1.4  71148 15136 ?        Ss   13:42   0:00 python2 -u /usr/bin/nginx-ldap-auth-daemon --url ldap://example.com:389

Also, it works if started manually:
user@deb ./nginx-ldap-auth-daemon.py -u foo
Start listening on localhost:8888...
^Cuser@deb ./nginx-ldap-auth-daemon.py --url foo.bar.baz
Start listening on localhost:8888...

Are you sure you are using recent version of nginx-ldap-auth ? How do you run it?

Feedback timeout.
If you still have problems, feel free to reopen to add more details.