question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ldap2pg takes a long time on ldapwhoami

See original GitHub issue

Hi,

I am using the following version on ldap2pg:

ldap2pg 5.6
psycopg2 2.7.7 (dt dec pq3 ext lo64)
python-ldap 3.1.0
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0]

connecting to ldap with:

ldap:
  uri: ldap://<REDACTED>:389
  binddn: CN=service-account,OU=Service Accounts,DC=domain,DC=local
  password: <REDACTED>

when running ldap2pg --verbose I get this:

[2021-11-15 16:51:27] [ldap2pg.ldap         DEBUG] Connecting to LDAP server ldap://<REDACTED>:389.
[2021-11-15 16:51:27] [ldap2pg.ldap         DEBUG] Trying simple bind.
[2021-11-15 16:51:27] [ldap2pg.ldap         DEBUG] Doing: ldapwhoami -x -D CN=service-account,OU=Service Accounts,DC=domain,DC=local -W
[2021-11-15 16:51:43] [ldap2pg.script       WARNI] Running in dry mode. Postgres will be untouched.
[2021-11-15 16:51:43] [ldap2pg.psql         DEBUG] Connecting to Postgres <REDACTED>.

You can see that ldapwhoami step takes 16 seconds. When I run the same command manually, it runs under a second. What could be the issue here?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
m3nthalcommented, Dec 3, 2021

I think this one could be closed. The root cause was network.

0reactions
bersacecommented, Dec 3, 2021

@m3nthal , you’re welcome. If a better message would help, please suggest 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

ldap2pg/cookbook.md at master - GitHub
Here in this cookbook, you'll find some recipes for various use case of ldap2pg. If you struggle to find a way to setup...
Read more >
Hacking - ldap2pg documentation - Read the Docs
Here is an extended documentation on how to setup a development environment. Feel free to adapt to your cumfort. Automatic tests on CircleCI...
Read more >
Using ldap2pg K8S CronJob to sync Directory Users/Groups ...
Demonstrate with Postgresql and OpenLDAP Helm Charts · Create NOLOGIN roles and grant some db object privileges to those roles. · Create LOGIN...
Read more >
LDAP logins are slow or timing out - IBM
/var/log/messages shows LDAP time outs ... Using ldapsearch (Technote 1973912) from the openldap-clients RPM, conduct a search on a user ...
Read more >
Ldap2pg: Manage PostgreSQL Roles and Privileges ... - Morioh
Logs LDAP queries as ldapsearch commands. Logs every SQL query. Reads settings from an expressive YAML config file. Here is a sample configuration...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found