Forum Problems Installing LAMS: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login


 
You may request notification for LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login.
Search: 

1: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
11/21/08 09:25 PM
[ Reply | Forward ]
I've been working with Geoff Davidson to get Lams working, nand figure it will save time if I just post directly ...

I've removed jboss, deleted teh lams2 database and re-installed everything from scratch ... in the server/default/log/lams.log file, when I try and login with sysadmin/sysadmin, I just see:

2008-11-22 03:11:51,202 [http-0.0.0.0-8080-7:] INFO org.lamsfoundation.lams.security.UniversalLoginModule - initialize
2008-11-22 03:11:51,202 [http-0.0.0.0-8080-7:] INFO org.lamsfoundation.lams.security.UniversalLoginModule - login
2008-11-22 03:12:18,269 [http-0.0.0.0-8080-7:] INFO org.lamsfoundation.lams.security.UniversalLoginModule - abort

I've checked server.log in that same directory, no errors being generated ...

I've tried to reset the password in the database itself, just in case it didn't get set right, using:

update lams_user set password = sha1('sysadmin') where login = 'sysadmin';

which I found in setLamsConfiguration.sql

So ... what obvious to everyone else step have I missed here? something else I should be checking?

Thank you ...

Posted by Marc Fournier

2: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 1 11/21/08 11:30 PM
[ Reply | Forward ]
Just re-restarted jboss, and the first time I try to login, I get a 'NullPointerException:

2008-11-22 05:21:15,155 [http-0.0.0.0-8080-1:] INFO org.lamsfoundation.lams.security.UniversalLoginModule - initialize
2008-11-22 05:21:15,156 [http-0.0.0.0-8080-1:] INFO org.lamsfoundation.lams.security.UniversalLoginModule - login
2008-11-22 05:21:15,161 [http-0.0.0.0-8080-1:] ERROR org.lamsfoundation.lams.security.UniversalLoginModule - ===> exception: java.lang.NullPointerException
java.lang.NullPointerException
at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:53)
at org.lamsfoundation.lams.security.UniversalLoginModule.validatePassword(UniversalLoginModule.java:98)
at org.lamsfoundation.lams.security.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)

It doesn't appear to happen on subsequent attempts, only that first one ...

Posted by Marc Fournier

3: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 2 11/23/08 05:55 PM
[ Reply | Forward ]
Hello Marc.

I'm not sure whats going wrong here, but perhaps if I can ask you a few more questions and get some more information from you we can get to the root of this problem.

I assume from the postings in the other thread that you have used the 2.1 unix installer? If so, could you zip up the log directory from the installer package and send it our way? Also, If there were any configurations that were out of the ordinary like mysql installed on a seperate server, please let me know.

Finally, If you could zip up the jboss-4.0.2/server/default/log directory and send it to us we might find something in there that is more telling.

Thanks,

Luke Foxton

Posted by Luke Foxton

4: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 3 11/23/08 09:46 PM
[ Reply | Forward ]
to the best of my knowledge, nothing out of the ordinary for the install ... mysql is local to the machine, etc ... tried to keep it as simple as possible ...

as to the logs ... how do I upload those? to where?

Posted by Marc Fournier

Attachments:
5: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 4 11/23/08 09:46 PM
[ Reply | Forward ]
Oops, meant to attach both, sorry ...

Posted by Marc Fournier

Attachments:
6: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 5 11/23/08 10:15 PM
[ Reply | Forward ]
Hey Marc,

Looks like you found out how to upload the log files.

I had a look in the logs specifically server.log and I found a "java.lang.OutOfMemoryError: Java heap space" memory error.

This may be the cause of your difficulties, so hopefully we can configure this so it doesnt happen again.

Are you using the wrapper in the installer? if so, check the jboss-4.0.2/conf/wrapper.conf and make sure it has the following lines before restarting lams:

wrapper.java.maxmemory=512
wrapper.java.additional.2=-XX:MaxPermSize=256m

Otherwise, if you are not using the wrapper, check jboss-4.0.2/bin/run.conf, and make sure it has this code in it:

#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-server -Xms128m -Xmx512m -XX:MaxPermSize=256m"
fi

Restart lams after making these changes and hopefully this will fix the problem

Luke

Posted by Luke Foxton

7: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 6 11/23/08 11:01 PM
[ Reply | Forward ]
Change made, still no go ... lams.log just showing:

initialize -> login -> abort

I've wiped out all the old logs and am attaching just what was created since restarting with new java_opts settings, and up until after I've attempted to login ...

Posted by Marc Fournier

Attachments:
8: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 7 11/23/08 11:03 PM
[ Reply | Forward ]
I'm suspecting this is all in the logs, but, just in case:

we're running on FreeBSD 7-STABLE amd64 with Jdk 1.5.0 ... jboss is 4.0.2, and just LAMS 2.1, I haven't installed the update or anything yet ...

Posted by Marc Fournier

11: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 8 11/24/08 09:18 PM
[ Reply | Forward ]
Hi,

Thanks for the extra info, just wondering what version of MySQL you're running? Your last log attachment appears to be the same as the first one though.

If you're not getting OutOfMemory: heap space errors in your server.log anymore and you still can't login with sysadmin, then we might need you to send your latest logs again. You can check whether your changes to the JVM arguments have kicked in by looking at the command line output of 'ps', e.g. this is the full path and arguments of lams running via the wrapper:

/usr/lib/jvm/java-1.5.0-sun/bin/java -Dprogram.name=run.sh -XX:MaxPermSize=256m -Xms256m -Xmx768m -Djava.library.path=../lib -classpath ../lib/wrapper.jar:../bin/run.jar:/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar -Dwrapper.key=zFmIgGTGwu1lfkjz -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=17164 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.jboss.Main

In this case the maximum heap space is set to 768MB.

Posted by Jun-Dir Liew

12: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 11 11/24/08 11:03 PM
[ Reply | Forward ]
See my comment further on ... I suspect something else is involved here ... logging in as one of the test? users that are created seems to work, just not sysadmin ...

Posted by Marc Fournier

13: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 12 11/24/08 11:17 PM
[ Reply | Forward ]
Yes, that is weird. Do you see any exceptions in the logs when you try to login as sysadmin? If you're not sure, can you post them anyway?

Can you have a look at the lams_user table (possibly something invalid there?):

select * from lams_user where login='sysadmin' or login='test2';

Posted by Jun-Dir Liew

14: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 13 11/24/08 11:38 PM
[ Reply | Forward ]
they have slight differences:

| 1 | sysadmin | a159b7ae81ba3552af61e9731b20870515944538 | The | System | Administrator | NULL | NULL | NULL | Sydney | NSW | NULL | Australia | NULL | NULL | NULL | NULL | sysadmin@x.x | 0 | 2008-06-13 10:57:05 | 1 | 51 | 1 | 2 | NULL | NULL | NULL | 0 | 1 |
| 6 | test2 | a159b7ae81ba3552af61e9731b20870515944538 | Dr | Two | Test | 2 | Test Ave | NULL | Nowhere | NSW | NULL | Australia | 0211111111 | 0211111112 | 0411111111 | 0211111113 | test2@xx.os | 0 | 2004-12-23 00:00:00 | 1 | 6 | 1 | 2 | NULL | 1 | NULL | 0 | 1 |

Posted by Marc Fournier

15: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 14 11/25/08 12:14 AM
[ Reply | Forward ]
There we have a problem in sysadmin, locale_id is null. Not sure how it happened, but do this and it should fix it:

update lams_user set locale_id=1 where user_id=1;

Posted by Jun-Dir Liew

16: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 15 11/25/08 07:26 AM
[ Reply | Forward ]
Woo hoo ... we have lift off ... will pass it back over to Geoff to find the 'next issue' :)

Thx

Posted by Marc Fournier

17: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 16 11/25/08 09:04 AM
[ Reply | Forward ]
Marc, are you suggesting that I'm good a breaking things, or just warning folks HOW good I am at finding and breaking things ;)

Thanks to everyone here in the forum who helped us. This gives us what we need to begin beating up the apps to make sure they'll do everything we need both internally and for our external clients. Hopefully I won't be pushing the limits so far that I break it too badly with my efforts.

Geoff

Posted by Geoffrey S Davidson

18: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 15 11/25/08 02:38 PM
[ Reply | Forward ]
Ah, Right!

Marc, what was the language and locale you have set up in your configuration file? If it a language and locale that LAMS wouldn't support, then I believe the NULL value is set. I believe we fixed this for the next 2.2 installer.

Thanks,

Ernie

Posted by Ernie Ghiglione

19: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 18 11/25/08 03:56 PM
[ Reply | Forward ]
# Default language locale and text direction for LAMS, see section 3 of the readme
LOCALE=en_US
LOCALE_DIRECTION=LTR

Posted by Marc Fournier

20: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 19 11/25/08 04:32 PM
[ Reply | Forward ]
Precisely!

> LOCALE=en_US

en_US as language does not exist in LAMS. The English translation we have is LAMS so far is the Australia version (en_AU).

The installer when trying to create the sysadmin user, couldn't find the id for the en_US language so it left it as NULL... causing all this problem.

We make sure we fix this and set the language to a default language in the case that the language set at configuration is not supported.

Thanks Marc!

Ernie

Posted by Ernie Ghiglione

9: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 3 11/24/08 04:18 PM
[ Reply | Forward ]
Luke ... stupid question, maybe, but I went with the pre-built binaries ... is it possible that the DB connection is failing? That its not finding the mysql shared library or something stupid like that? Or is the DB connection established when the lams server is started?

Posted by Marc Fournier

10: Re: Re: Re: Re: LAMS 2.1 + jBoss 4.0.2 + Reinstall != Login
In response to 9 11/24/08 08:55 PM
[ Reply | Forward ]
Well, on a whim, I tried to login with the 'test1' account, and it, and test2, and test3 all seem to login fine .. it is only when I try to login as sysadmin that I can't get connected ...

checked the lams_user table, and password all looks to be set the same ...

*shrug*

Posted by Marc Fournier

Reply to first post on this page
Back to Problems Installing LAMS