Forum Problems Installing LAMS: problems with building LAMS from source


 
You may request notification for problems with building LAMS from source.
Search: 

1: problems with building LAMS from source
07/12/09 09:26 AM
[ Reply | Forward ]
I am trying to compile LAMs from the source.
Among others, i tried refering http://lamscommunity.org/dotlrn/clubs/technicalcommunity/forums/message-view?message_id=776405

I am stuck at the first of the ant commands - "ant rebuild-db"
I get the following error:

http://pastebin.com/f5af049f5


I am sure that the db username/password are correct as i can access the database using "mysql -u root -p -D lams" (i am using root credentials... i know its unethical.. but thats another nagging problem i've kept for a addressing later)

I am new to "ant", "jboss".. thats not my area. I am only trying to integrate Moodle and LAMS for testing. How can i solve this problem? Are there more detailed logs i can find somewhere on the system?

Posted by Navin Jathan

2: Re: problems with building LAMS from source
In response to 1 07/12/09 03:58 PM
[ Reply | Forward ]
Is MySQL listening on port 3306? Check if /etc/my.cnf has the directive 'skip-networking' - if so, comment it out and restart mysql.

Posted by Jun-Dir Liew

4: Re: Re: problems with building LAMS from source
In response to 2 07/15/09 01:20 PM
[ Reply | Forward ]
Jun,

MySQL is indeed running on 3306 (the directives in the cnf files say so)
and the "skip-networking" directive is already commented out by default...

Posted by Navin Jathan

6: Re: Re: Re: problems with building LAMS from source
In response to 4 07/15/09 06:43 PM
[ Reply | Forward ]
You can make sure that it's running by doing netstat -an | grep 3306, and seeing if anything is listening on that port.

'Connection refused' in the error might also mean a firewall - could that be the problem?

Posted by Jun-Dir Liew

7: Re: Re: Re: Re: problems with building LAMS from source
In response to 6 07/18/09 03:34 AM
[ Reply | Forward ]
netstat -an | grep 3306 does not give any output, however in all the four files in /etc/ - my-huge.cnf, my-large.cnf, my-medium.cnf, my-small.cnf - i can see port = 3306 in the "[mysqld]" section. ( i am not sure which one of the four is exactly to be referred... if somebody can point it out...)

Additionally netstat -an | grep -i sql, i get the following output:

-----------
bash-3.1$ netstat -an | grep -i sql
unix 2 [ ACC ] STREAM LISTENING 8469 /var/run/mysql/mysql.sock
-----------

Posted by Navin Jathan

3: Re: problems with building LAMS from source
In response to 1 07/12/09 04:46 PM
[ Reply | Forward ]
Also, Navin, are you using the code from cvs head or the lams2_3 branch?

Ernie

Posted by Ernie Ghiglione

5: Re: Re: problems with building LAMS from source
In response to 3 07/15/09 01:26 PM
[ Reply | Forward ]
Ernie,
I am using Lams 2.2 Java source obtained from http://wiki.lamsfoundation.org/display/lams/Downloads

Posted by Navin Jathan

8: Re: Re: Re: problems with building LAMS from source
In response to 5 07/19/09 06:30 AM
[ Reply | Forward ]
Bump..... Is there a way to resolve this?

Posted by Navin Jathan

9: Re: Re: Re: Re: problems with building LAMS from source
In response to 8 07/19/09 07:27 AM
[ Reply | Forward ]
Alright... i have sorted out the mysql issue. Now the service is listening on port 3306, and i have successfully run rebuild-db.

However, upon running assemble-ear i get the following error:


BUILD FAILED
/home/navin/software/moodle/lams2.2_source/lams_build/build.xml:62: The following error occurred while executing this line:
/home/navin/software/moodle/lams2.2_source/lams_common/build.xml:168: Compile failed; see the compiler error output for details.

Where is the compiler error output?

I have pasted the complete output here:
http://pastebin.com/f36991665

Posted by Navin Jathan

10: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 9 07/19/09 06:52 PM
[ Reply | Forward ]
Cool about the mysql. The compile problem looks like it can't find some libraries that are in the jboss folder. In lams_build/unix.properties is configured the path to jboss, by default this is /usr/local/jboss-4.0.2 - have you extracted jboss 4.0.2 to this path?

Posted by Jun-Dir Liew

11: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 10 07/19/09 08:04 PM
[ Reply | Forward ]
I had modified the unix.properties file to point the variables at the right directories. However i am using JBoss 5.1.0 GA (the latest). Am i necessarily supposed to use 4.0.2?

Posted by Navin Jathan

12: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 11 07/19/09 08:26 PM
[ Reply | Forward ]
If your source is 2.2, jboss 4.0.2 - if you're using the latest from head, jboss 5.

Posted by Jun-Dir Liew

13: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 11 07/21/09 12:03 AM
[ Reply | Forward ]
Hi Navin,

I'll put a wiki page on how to build from source using JBoss5 and the code from head shortly.

Thanks,

Ernie

Posted by Ernie Ghiglione

14: Re: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 13 07/21/09 11:39 PM
[ Reply | Forward ]
Building LAMS 2.4 from source:

http://tinyurl.com/nyhq3j

Posted by Ernie Ghiglione

15: Re: Re: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 14 07/22/09 01:44 PM
[ Reply | Forward ]
Thanks a lot Ernie for this mini-guide!

From what it looks, lams 2.4 looks a little different from 2.2... please bear with me if the questions look a bit noobish..
One of the lines in the above link says "There are a few settings you would need to change in the file insert_lams_unix_config_data.sql under lams_common/db/sql/ directory. Some important that you want to review are: ServerURL, EARDir, TempDir, DumpDir."
What are the ideal values for these variables supposed to look like?
Say, i have just downloaded and have lams 2.4 directory tree in the directory /var/www/htdocs/lams , and jboss in /var/www/htdocs/jboss5.1.0GA... Thus i haven't got anything in /var/opt (as suggested by the TempDir, DumpDir in the sample insert_lams_unix_config_data.sql .
Also, is the ServerURL supposed to be something like http://lams.local , where i have defined something like this in the httpd.conf file:

<VirtualHost *:80>
ServerAdmin navin@lams.local
DocumentRoot /var/www/htdocs/lams/
<Directory "/var/www/htdocs/lams">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
ServerName lams.local
</VirtualHost>

Where, again, i have the recently downloaded lams2.4 directory tree in /var/www/htdocs/lams ?

Posted by Navin Jathan

17: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 15 07/22/09 02:43 PM
[ Reply | Forward ]
I have compiled lams as per the hot-to, however, without correctly configuring the insert_lams_unix_config_data.sql i think.. i did not get any errors while executing the "ant" commands.. Does this mean the build was successful?

The last line in the how-to says "Go into your jboss-5 directory and start it". I ran the run.sh file in the jboss5.1.0GA directory. It looked to have started after a little more than 4 minutes... but now i dont know what next! how do i access lams?

Posted by Navin Jathan

18: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 17 07/22/09 03:33 PM
[ Reply | Forward ]
Hi Navin,

Make sure you start jboss using the run.sh script. In JBoss5, it seems that you need to bind the IP to it. So run it as ./run.sh -b {here-goes-your-IP}

Once JBoss starts, point your browser to http://{here-goes-your-IP}:8080/lams

And that should do.

ernie

Posted by Ernie Ghiglione

16: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: problems with building LAMS from source
In response to 15 07/22/09 02:47 PM
[ Reply | Forward ]
Navin,

JBoss has an embedded Tomcat which includes a webserver.

LAMS requires an servlet container and we use JBoss for that. The embedded Tomcat webserver "serves" the LAMS application. If you try to put the jboss directory in your /var/www/htdocs you are actually serving the whole jboss :-)

If you really need to serve LAMS using Apache, then you can use mod_jk which is a way acts as a proxy for Tomcat. However, you would generally use mod_jk for clustering and/or to server static content faster. Here are instructions on how to use LAMS with mod_jk

Thanks,

Ernie

Posted by Ernie Ghiglione

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