#186 ✓resolved
Alex Kiernan

JettyCachingLdapLoginModule throws exception when port not set

Reported by Alex Kiernan | January 27th, 2011 @ 07:46 AM | in Rundeck 1.2

If you're using providerUrl, the port option is redundant, but if you don't set it you get an exception on startup:

2011-01-27 11:48:16.579::WARN:
javax.security.auth.login.LoginException:
java.lang.NumberFormatException: null
       at java.lang.Integer.parseInt(Integer.java:417)
       at java.lang.Integer.parseInt(Integer.java:499)
       at com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule.initialize(JettyCachingLdapLoginModule.java:572)
...

A (completely untested) fix would seem to be something like:

diff --git a/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java b/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
index 292a1fa..6a66b9d 100644
--- a/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
+++ b/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
@@ -568,9 +568,11 @@ public class JettyCachingLdapLoginModule extends AbstractLoginModule {
             Map options) {
         super.initialize(subject, callbackHandler, sharedState, options);
 
-        _hostname = (String) options.get("hostname");
-        _port = Integer.parseInt((String) options.get("port"));
         _providerUrl = (String) options.get("providerUrl");
+        if (_providerUrl == null) {
+            _hostname = (String) options.get("hostname");
+            _port = Integer.parseInt((String) options.get("port"));
+        }
         _contextFactory = (String) options.get("contextFactory");
         _bindDn = (String) options.get("bindDn");
         _bindPassword = (String) options.get("bindPassword");

Comments and changes to this ticket

  • Deleted User

    Deleted User March 7th, 2011 @ 03:30 PM

    • State changed from “new” to “resolved”
    • Milestone set to Rundeck 1.2
    • Assigned user set to “Deleted User”
    • Milestone order changed from “10” to “0”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Pages