Getting stated with local development

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting stated with local development

rantav
I'd like to work on the console locally, so I forked linkedin/glu on github, cloned locally and followed the instructions on this page http://linkedin.github.com/glu/docs/latest/html/dev-setup.html

Where I get stuck is - not able to login to the console (using the default admin/admin user/pass).
So I think I did everything right, I didn't see any errors during the process, however when I open the browser and try to login I can't. (Invalid username and/or password).

Here's what the logs have:

~/dev/glu/console/org.linkedin.glu.console-webapp $ grails run-app
Welcome to Grails 1.3.5 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /grails/grails-1.3.5

Base Directory: /Users/ran/dev/glu/console/org.linkedin.glu.console-webapp
Resolving dependencies...
Dependencies resolved in 2757ms.
Running script /grails/grails-1.3.5/scripts/RunApp.groovy
Environment set to development
     [copy] Copying 1 file to /Users/ran/.grails/1.3.5/projects/org.linkedin.glu.console-webapp/resources
   [delete] Deleting directory /Users/ran/.grails/1.3.5/projects/org.linkedin.glu.console-webapp/tomcat
Running Grails application..
2011/08/03 14:22:46.761 INFO [BeanBuilder] [RuntimeConfiguration] Configuring data source for environment: DEVELOPMENT
2011/08/03 14:22:47.406 INFO [BeanBuilder] Registering realm: org.linkedin.glu.console.realms.ShiroLdapRealm
2011/08/03 14:22:55.018 INFO [BootStrap] Starting up... [DEVELOPMENT mode]
2011/08/03 14:22:55.063 WARN [BootStrap] console.ivySettingsURL config parameter not specified, ivy:/ URLhandler is not enabled.
2011/08/03 14:22:56.325 WARN [AuditLog] Could not determine principal (ignored) [No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an invalid application configuration.]
2011/08/03 14:22:56.392 WARN [AuditLog] Could not determine principal (ignored) [No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an invalid application configuration.]
2011/08/03 14:22:56.671 INFO [BootStrap] Console started.
Server running. Browse to http://localhost:8080/console
2011/08/03 14:23:11.140 INFO [FabricServiceImpl] Loaded fabrics: [glu-dev-1, glu-dev-2]
2011/08/03 14:23:15.521 ERROR [ShiroLdapRealm] Could not connect to ldap://localhost:389/: javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused]
2011/08/03 14:23:15.521 ERROR [ShiroLdapRealm] No LDAP server available.
2011/08/03 14:23:15.527 INFO [realm] Unable to authenticate with org.linkedin.glu.console.realms.ShiroLdapRealm - No LDAP server available.
2011/08/03 14:23:15.528 INFO [AuthController] Authentication failure for user 'admin'.


So my conclusion was that for some reason ldap is enabled and since there's no ldap server running on localhost:389 the authentication fails.
However, I haven't myself configured ldap and the code was a clean checkout so to the best of my understanding, ldap should be disabled by default.

help :)
Reply | Threaded
Open this post in threaded view
|

Re: Getting stated with local development

rantav
Well, after having trying to figure this out for the last couple of hours, two seconds after having sent the message I finally did...
Turns out that the user/password is glua/password.
I'm sure I've user those in the past (my browser remembers them) but I could not find a reference to this user/pass on the page http://linkedin.github.com/glu/docs/latest/html/dev-setup.html so I wasted my time on admin/admin.
Might be a good idea to add that to this page (where is glua/password documented anyway?)
What was also confusing was the message regarding LDAP which made me think the problem was that somehow ldap was on, while it was actually probably still off

2011/08/03 14:23:15.521 ERROR [ShiroLdapRealm] No LDAP server available.
2011/08/03 14:23:15.527 INFO [realm] Unable to authenticate with org.linkedin.glu.console.realms.ShiroLdapRealm - No LDAP server available.
2011/08/03 14:23:15.528 INFO [AuthController] Authentication failure for user 'admin'.
2011/08/03 14:25:21.327 ERROR [ShiroLdapRealm] Could not connect to ldap://localhost:389/: javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused]

Anyways, I'm not stuck now...
Reply | Threaded
Open this post in threaded view
|

Re: Getting stated with local development

frenchyan
Administrator
I am pretty sure this used to be documented. I probably lost it when I migrated the documentation to sphinx... The initialization happening for dev is in the Bootstrap class (https://github.com/linkedin/glu/blob/master/console/org.linkedin.glu.console-webapp/grails-app/conf/BootStrap.groovy)

There are 2 fabric created and 3 users with various roles. You may want to edit this file (of course without checking it back in) with some custom values while you develop.

You may want to take a look at the URLMappings class as well which is where you will need to add an entry if you add /graphs for example... The idea is that if it starts with /admin or /release then you must have at least this level of authentication to execute. If it doesn't then pretty much any logged in user can do.

Sorry you wasted time on that.

Yan

On Wed, Aug 3, 2011 at 4:32 AM, rantav [via glu] <[hidden email]> wrote:
Well, after having trying to figure this out for the last couple of hours, two seconds after having sent the message I finally did...
Turns out that the user/password is glua/password.
I'm sure I've user those in the past (my browser remembers them) but I could not find a reference to this user/pass on the page http://linkedin.github.com/glu/docs/latest/html/dev-setup.html so I wasted my time on admin/admin.
Might be a good idea to add that to this page (where is glua/password documented anyway?)
What was also confusing was the message regarding LDAP which made me think the problem was that somehow ldap was on, while it was actually probably still off

2011/08/03 14:23:15.521 ERROR [ShiroLdapRealm] No LDAP server available.
2011/08/03 14:23:15.527 INFO [realm] Unable to authenticate with org.linkedin.glu.console.realms.ShiroLdapRealm - No LDAP server available.
2011/08/03 14:23:15.528 INFO [AuthController] Authentication failure for user 'admin'.
2011/08/03 14:25:21.327 ERROR [ShiroLdapRealm] Could not connect to ldap://localhost:389/: javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused]

Anyways, I'm not stuck now...


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Getting-stated-with-local-development-tp3221984p3221992.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.