Repository navigation
Replies: 32 comments 4 replies
|
Hi, could you please check and possibly post the debug output? Adding "debug = -1 debug redirect = /dev/stderr" in the "tac_plus-ng" section should work for containers. Thanks, Marc |
|
Hi Paul, no, please place it inside the "id = tac_plus-ng {" ... "}" section. Cheers, Marc |
|
Marc, Still not seeing anything within the directories, or is that supposed to add more output of any errors to the container's logs? Thanks, |
|
Hi Paul, yes, debug output is written to stderr and should show up in the "docker logs" output. Cheers, Marc |
|
Marc, I have added as follows: And this is everything im seeing in docker logs: Cheers, |
|
Hi Paul, ok, and there are no additional docker log entries generated when a request is processed, right? The debug "creating profile" output you're seeing is at "config" debug level, that's 16 and actually matches your docker-compose spec. I think that overrides the "debug = -1" statement and I'm wondering why, this is not the intended behavior. Please retry with That should provide more output. Cheers, Marc |
|
Marc, Fantastic that seems to have fixed that issue, is there any way I can test the ldap connection? Does the mavis module need to be set to |
|
Hi Paul, testing the LDAP connection from a container shell is certainly possible, you'd need to set the environment variables you're using in the "mavis module" section in shell context and then run the Perl script with printf "0 TACPLUS\n4 $USER\n8 $PASS\n49 AUTH\n=\n" | /usr/local/lib/mavis/mavis_tacplus-ng_ldap.pl Cheers, Marc |
|
Marc, I will mention again that my Testing with and with: Cheers, |
|
Hi Paul, the Perl backend requires the same environment variables for testing as for production: Cheers, Marc |
|
Hi Paul, thanks for the details. So the environment variables are set (I think I actually put extra spaces in my example, due to copy-paste, these should be there obviously), and the -ng backend still reports "32 No answer from LDAP backend."? This would indicate that the container can't reach out to LDAP server. You could use ldapsearch, telnet, nc, whatever suitable program is available in your container to check whether it can actually reach the server. Cheers, Marc |
|
Hi Paul, thanks, if there's no communication issue it's worth to have another look at the Perl backend and the environment variables. I didn't catch that before, but setenv LDAP_SERVER_TYPE = "microsoft" is likely incompatible. I'd retry with setting LDAP_HOSTS, LDAP_BASE, LDAP_USER and LDAP_PASSWD only. What's the "printf..." command returning in that case? Thanks, Marc |
|
Marc, Still the same i'm afraid, I have tested the user in Any other ideas? / # printf "0 TACPLUS\n4 $USER\n8 $PASS\n49 AUTH\n=\n" | /usr/local/lib/mavis/mavis_tacplus-ng_ldap.pl Cheers, |
|
Hi Paul, pretty strange ... another guess: perhaps Net::LDAP (or the OpenLDAP lib) in Alpine don't like the "ldap://" prefix. Does using the plain IP address give better results? LDAP_HOSTS="192.168.22.10" You could also use trivial Perl script to test this, e.g. something like I'm not sure about your LDAP_USER either, I think that should be a DN, no idea whether binding with a plain cn works. You could perhaps test that using ldapsearch. Cheers, Marc |
|
Good morning Marc, Just wanted to say I really appreciate your support with this annyoing issue. Test comes back with the same problem, LDAP cannot bind to server. Also in the Cheers, |
|
Hi Paul, that Perl script snippet was from memory, slightly corrected variant that includes a LDAP bind: Cheers, Marc |
|
Marc, Script returns "ok"! :) I've got a test Cisco9200 configured and not able to login to it. Cheers, |
|
Hi Paul, does calling the "printf ... | /usr/local/lib/mavis/mavis_tacplus-ng_ldap.pl" sequence return useful output now? Cheers, Marc |
|
Marc,
Is there a chance i've missed dependencies, could that be affecting it? Cheers, |
|
Hi Paul, the "no answer from LDAP ..." is the result from Net::LDAP->new() failing. I don't think there are any missing Perl dependencies, this looks more like an issue with LDAP_HOSTS, which is the only dependency. Running the Perl script with strace should show whether it attempts to connect to your LDAP server at all. printf "..." | strace -e connect .../mavis_tacplus-ng_ldap.pl Also, you could add something like print STDERR "LDAP_HOSTS=$LDAP_HOSTS\n"; to the Perl script just before the Net::LDAP->new() call to check the actual value of the LDAP_HOSTS environment variable in script context. Cheers, Marc |
|
Correction: print STDERR "LDAP_HOSTS=@$LDAP_HOSTS\n"; (LDAP_HOSTS is an array) |
|
Hi Paul, the idea was to add the print STDERR ... statement to the mavis_tacplus-ng_ldap.pl script. I still think that the environment variable LDAP_HOSTS isn't set. The strace shows a connection attempt to ldaps://localhost, and that's what LDAP_HOSTS defaults to. Could you please double-check thatLDAP_HOSTS/BASE/USER/PASSWD actually show up in "env" output and then retry the "printf ..." sequence? Cheers, Marc |
|
Good morning Marc, Apologies, my bad there, I did not think that the values need to be loaded in the container environment. NOTE: I did change the DN of the bind user back to sAMAccountName. Sadly still not seeing logs being generated in the mounts of the container, and am still not able to login to the switch, switch returns user rejected with all my test users. Cheers, |
|
Hi Paul, I'd try running tac_plus-ng from the command line with full debug output, this should shed some details on session handling. tac_plus-ng -d -1 -f -1 /path/to/tac_plus-ng.cfg Cheers, Marc |
|
Hi Marc, Am looking at the output of the logs and not seeing anything specific in there. Sorry, this is my first time troubleshooting logs for this app, should i be looking at anything specific? Cheers, |
|
Hi Paul, thanks, there's debug output, and that's fine. Did you try authenticating at the switch while running the daemon in debug mode? This looks like the parsing output only, and there are no indications that anything did actually try to talk to the daemon. Cheers, Marc |
|
Hi Marc, I did login to it with debug mode, that is the only way that i'm seeing that bit in the cointainer logs, i've also noticed something else while testing earlier. If I declare a different user for the The bind user returns an ACK where any other user I declare inside the container says wrong credentials? Cheers, |
|
Hi Paul, that DSID-... id comes from AD, likely something like bad credentials. So, did you actually try to log in to your switch while having the tac_plus-ng daemon running in debug mode, in a separate window? Cheers, Marc |
|
Hi Marc, Best way to run it: Cheers, |
|
Hi Paul, yes, running it from the container manually with full debug output looks like the best option right now. If I remember correctly, the variants (debug = -1 et al.) didn't show anything usable in your docker logs. Cheers, Marc |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Good morning.
First of all would like to say a massive thank you for your work on this project.
Trying to run
tac_plus-ngin an alpine container and not any seeing logs generated.Config passes and the container starts. Am trying to test with non-secure LDAP server before moving into production, am wondering if im doing something wrong in the config. Trying to login to the switch does not generate any logs in
/var/log/.Below is the
tac_plus-ngconfig anddocker-composeused to start the container:All reactions