Forum Problems Installing LAMS: LAMS on Macs


 
You may request notification for LAMS on Macs.
Search: 

1: LAMS on Macs
09/19/05 09:41 PM
[ Reply | Forward ]
Is it true that LAMS now has an installer for Mac OS X?

Indeed :-)


For the past two weeks we've been testing a new easy-to-use installer for Mac OS X. It's looking quite good but we are after people that want to test it on their systems.

The installer, however, requires you to MySQL (http://dev.mysql.com/downloads/mysql/4.1.html) already installed on your Mac.

If you would like to help us test and improve this installer, just post your name in this thread.

Thanks,

Ernie

Posted by Ernie Ghiglione

2: Internal Server Error
In response to 1 10/07/05 09:34 AM
[ Reply | Forward ]
I get an internal server error after installing LAMS on my OS X server (Tiger10.4.2). I know this install is meant for desktops, but I want to access it from off-campus, so am installing it on a server. MySQl and Xcode are running. I tested as suggested in the instructions. The server error happens before being propmpted for a password.

The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException

Posted by Marc Boots-Ebenfield

3: Re: Internal Server Error
In response to 2 10/07/05 08:56 PM
[ Reply | Forward ]
Hi Marc,

I would probably need a bit more info to help you out.

But before that, let me clarify a bit how the installer works in Mac OS X (10.3.x and 10.4.x).

Once you have Xcode and MySQL installed and MySQL is running, you have green light to install the LAMS package.

The LAMS packages is pkg file that installs basically two things:

* LAMS 1.0.2 server and
* a LAMS server controller (as an application).

If the installation finished successfully, the LAMS server controller application should pop-up automatically prompting you to start the LAMS server. (see attached picture 1). (note:
The LAMS server controller app gets installed in your /Application folder.)

Once you click on "Start Server", you will be asked to enter your password, as LAMS server requires administrator access to be run). For some reason in OS X 10.3.x, you will be prompt to enter your password twice -I know, annoying, I'll work on that). If you enter your password correctly, then the application will tell the LAMS server to get started and it will pop-up a browser telling you to wait for about 45 seconds until the server gets up and running (see picture 2).

After 45 seconds, the browser will be redirected to the LAMS login page: http://localhost:8080/lams (see picture 3)

By default, the administrator user details to login into LAMS are:

u: lamsadmin
p: lamsadminpw

(make sure you change the password once you login for the first time -you change this by going into the Administrator Menu).

Would you be able to tell in which step in the process is it failing for you?

Did the package installer ended up successfully? Did you get to see the LAMS server controller screen? Can you access it from your /Application folder?

Thanks,

Ernie

Posted by Ernie Ghiglione

Attachments:
4: Re: Re: Internal Server Error
In response to 3 10/13/05 10:53 AM
[ Reply | Forward ]
Ernie, I seem to be experiencing the same problem as Marc.

The package installer was successful and the LAMS server controller launched automatically.

I just can't get to the login screen (picture 3), after 45 secs on picture 2 I get the same "org.apache.jasper.JasperException" error report.

The MySQL Server Instance is running, as is the LAMS Server v1.0.2. I have tried turning off my firewall temporarily to see if that helped, but I am now stuck.

Any suggestions?

Cheers, Stewart

Posted by Stewart Cromar

Attachments:
5: Lams start-up log
In response to 1 10/13/05 11:51 AM
[ Reply | Forward ]
Ernie,
I also noticed the start-up error:
11:55:39,540 ERROR [WebService] Starting failed
java.net.BindException: Address already in use

There is nothing else using that port, so I cannot figure it out. I thought that maybe the LAMS service had not completely shut down, so I restarted the server, cheched that everything was off and tried starting LAMS again- same error.

Unless you have something specific for me to try I am giving up for awhile.

Posted by Marc Boots-Ebenfield

6: Re: Lams start-up log
In response to 5 10/13/05 05:47 PM
[ Reply | Forward ]
Marc, Steward,

I had a closer look at your logs and I think I know why your LAMS instance is not working. The answer is MySQL

Althought MySQL was running when you installed LAMS, LAMS was never able to create a database.

If you have a look at the installer.log file in the /usr/local/lams-1.0.2 folder, you'll see that when LAMS attempts to create the database it can't run the initialization scripts. Marc, this is from your installer.log file you sent me:

...
_prep_db:
[echo] This creates the database and sets username/password
[echo] mysql.classpath=/usr/local/lams-1.0.2/lib/mysql-connector-java-3.1.10-bin.jar
[echo] url=jdbc:mysql://localhost/mysql
[echo] userid=root
[echo] password=
...

Then a bit further down, then LAMS tries to add the initialization data into the DB you get:

...
import-db:
[echo] it is unix
[echo] jboss home is: /usr/local/lams-1.0.2/jboss
[echo] LAMS home is: /usr/local/lams-1.0.2
...

The correct log for a successful db creation should be like:

...
_prep_db:
[echo] This creates the database and sets username/password
[echo] mysql.classpath=/usr/local/lams-1.0.2/lib/mysql-connector-java-3.1.10-bin.jar
[echo] url=jdbc:mysql://localhost/mysql
[echo] userid=root
[echo] password=
[sql] Executing commands
[sql] 18 of 18 SQL statements executed successfully


(some more lines here)

import-db:
[echo] it is unix
[echo] jboss home is: /usr/local/lams-1.0.2/jboss
[echo] LAMS home is: /usr/local/lams-1.0.2

_lams_config:
[copy] Copying 1 file to /usr/local/lams-1.0.2/sql

_import_db:
[sql] Executing file: /usr/local/lams-1.0.2/sql/temp-import.sql
[sql] 647 of 647 SQL statements executed successfully

BUILD SUCCESSFUL
...


So, in plain English this means that LAMS wasn't able to create its database and datamodel in MySQL. Most likely that's because LAMS assumes that the MySQL root password is blank (as it is set by default after the MySQL installation).

Now if the password is not blank, then LAMS can't even access the db as I believe it has been the case.

Why does LAMS assumes by default the MySQL root is blank? Well, when I put together this installer my target audience was my grandma that loves Macs but has no idea what a root password for MySQL is. And since on the installation instructions for Mac OS X we go thru the standard MySQL installation, then the need to mention this was seen as adding unnecessary complexity that might not be needed in most cases.

Nevertheless, you can still get LAMS to work if you have changed the MySQL root password. It's a bit more fiddily, but given that you have changed the password of MySQL, this shouldn't be a problem.

Steward, Marc, can you confirm with me if you have changed the MySQL root password to other thing than blank?

I have put the Mac OSX installation instructions up on the web now (http://lamsfoundation.org/downloads/macosx/). If you have a look at the end part of the "Ensure MySQL is setup to run at startup" section, you'll have there the commands to check whether the root password has changed.

Please let me know how you go.

Ernie

Posted by Ernie Ghiglione

7: MySQL root password
In response to 1 10/14/05 09:17 AM
[ Reply | Forward ]
>Nevertheless, you can still get LAMS to work if you have changed the MySQL root password. It's a bit more fiddily, but given that you have changed the password of MySQL, this shouldn't be a problem.

>Steward, Marc, can you confirm with me if you have changed the MySQL root password to other thing than blank?

Oh, definitely. Let's get fiddily. What do I need to do to get LAMS to work?

Posted by Marc Boots-Ebenfield

8: Re: MySQL root password
In response to 7 10/14/05 07:41 PM
[ Reply | Forward ]
Marc,

The fix it's actually quite simple.

1.- Stop the LAMS Server (using the LAMS server controller app)
2.- Open up a terminal (see in the /Applications/Utilities folder)
3.- See the steps I've taken in the attached picture

The summary of commands are:

sudo su -

echo "LAMS_DB_ROOT_PASSWORD=your-password-here" >> /usr/local/lams-1.0.2/ant/build.properties

cd /usr/local/lams-1.0.2/ant/

../apache-ant-1.6.5/bin/ant prepare-db

../apache-ant-1.6.5/bin/ant import-db

Of course, change the "your-password-here" for whatever MySQL root password you have set up.

Once you gone thru these steps in the picture and the output you get looks *exactly* the same, then go to the LAMS Server controller application and LAMS should be working now.

Please let me know how it goes either way.

Thanks,

Ernie

Posted by Ernie Ghiglione

Attachments:
9: MySQL Root Password
In response to 1 10/17/05 02:12 PM
[ Reply | Forward ]
That did it! I could not use su- on the MAC and sudo u- did not do the trick either. Both times i tried to change the password in ant, the command failed. I used sudo, opened build.properties in vi, edited and saved it. The other commands ran fine using sudo. LAMS is now up and running. Thanks for your help.
-Marc

Posted by Marc Boots-Ebenfield

10: auto starts LAMS server
In response to 1 10/20/05 10:46 AM
[ Reply | Forward ]
Is there a setting to make sure that LAMS starts up automatically if the server restarts (power outage, etc.)?

Posted by Marc Boots-Ebenfield

12: Re: auto starts LAMS server
In response to 10 10/28/05 08:31 AM
[ Reply | Forward ]
Marc,

I haven't been able to get the auto start for the LAMS server in Macs. It seems that I have nuked it :-(

However, if you want to give it a try, you can hack the /Library/StartupItems for it.

You can have a look how MySQL does it. Their script is this directory /Library/StartupItems/MySQLCOM

See how they do it for MySQL and then you can just change it for LAMS.

Otherwise, give me a bit more time (until I get LAMS 1.0.2 released) and then I can help you out with this.

Thanks,

Ernie

Posted by Ernie Ghiglione

11: Re: LAMS on Macs
In response to 1 10/28/05 06:28 AM
[ Reply | Forward ]
Ernie,

Success for me also :)

Interestingly, I hadn't changed the MySQL password, it was still blank. But when I followed all your Terminal instructions in Post#8 and used this modified line:

echo "LAMS_DB_ROOT_PASSWORD=" >> /usr/local/lams-1.0.2/ant/build.properties

It all worked fine, and ultimately gave me the LAMS Login page.

Cheers, Stewart

Posted by Stewart Cromar

13: Re: Re: LAMS on Macs
In response to 11 10/28/05 08:34 AM
[ Reply | Forward ]
Hi Steward,

Glad to hear it worked ;-)

I wonder how it didn't work in the first place if MySQL root password was blank already... hmmm. Could it be that MySQL wasn't running?

Hopefully the next version of the installer would be a bit more "efficient" in catching all these issues.

Thanks,

Ernie

Posted by Ernie Ghiglione

14: Re: LAMS on Macs
In response to 1 10/30/05 03:32 PM
[ Reply | Forward ]
I've just joined the LAMS Community and have a mac at home which I'd like to try using the LAMS software on. From the earlier messages re installation on a mac it kind of puts me off trying to use the easy-to-use installer on my mac.

Do you have a set of step-by-step instructions for a non-techie like me to install on Mac OS 10.3.9? If so, then I'll volunteer to try out your software for the mac

Janet

Posted by Janet Fyfe

15: Re: Re: LAMS on Macs
In response to 14 10/30/05 04:10 PM
[ Reply | Forward ]
Hi Janet,

It ain't that bad :-)

As you can see in the previous postings the problem occurs if you already had other software (MySQL specifically) installed and configured.

If that's not the case, you shouldn't have any problems.

Nevertheless, I understand your concern. If you want to use LAMS without having to install it, just get an account in one of our demo servers (http://lamscommunity.org/testdrive) and you'll get an email with all login details.

At any rate, you can have a look at the Mac OS X installation instructions here: http://lamsfoundation.org/downloads/macosx. That's the step-by-step instructions (and a bit more advanced bit towards the end -optional, of course) that you wanted. If you think you can do it, let me know and I'll send you the LAMS package so you can install it.

Thanks,

Ernie

Posted by Ernie Ghiglione

16: Applescript error from password
In response to 1 11/10/05 07:36 PM
[ Reply | Forward ]
All happy about the Mac release until....
I installed from LAMS-1.0.2-Build-20051019, and all went well.
The LAMS 1.0.2 Controller opened...
But on starting the Lams Server by entering my password, an applescript error
is generated instead:

/usr/local/lams-1.0.2/bin/lams: /usr/local/lams-1.0.2/bin/lams: Permission denied (126)

Blast!!
I note that the volume has no user named but all priveledges.

What is the problem?
What is the solution?

John Willis

Posted by John Willis

17: Re: Applescript error from password
In response to 16 11/10/05 08:25 PM
[ Reply | Forward ]
Hi John,

Are you running 10.4 or 10.3?

Is the user that you are using in your mac an administrator? (you can check this out in the "System Preference" | "Accounts" see attachment)

Thanks,

Ernie

Posted by Ernie Ghiglione

Attachments:
18: applescript error from password
In response to 1 11/13/05 03:21 PM
[ Reply | Forward ]
Hi Ernie

I am running 10.4 and logged lin as an administrator

John Willis

Posted by John Willis

19: Re: applescript error from password
In response to 18 11/14/05 01:30 AM
[ Reply | Forward ]
John,

> I am running 10.4 and logged lin as an administrator

Hmmm... That's odd.

OK, can you fire up a terminal (Go into Finder, Applications, Utilities, and there you'll find the terminal app) and type the following at the prompt:

sudo su -

(here it will probably ask you for your password, so type it there. If you type it correctly you will see that the prompt will change to a # character instead of a $ one)

(IN the # type:)

cd /usr/local/

(then)

chown {yourshortusername} -R lams-1.0.2

(note that yourshorusername is in my case ernieg not Ernie Ghiglione!. Make sure that you use your shortusername)

Now that should not return anything, so just close the terminal application.

Now, use the LAMS Application controller (in your Applications folder) and that should do the trick.

If this whole thing looks a bit too scary for you, let me know and I create a small little application that can do that for you :-)

Ernie

Posted by Ernie Ghiglione

20: Re: applescript error from password
In response to 18 11/15/05 05:49 PM
[ Reply | Forward ]
Hi Ernie

Problem still persists and the same applescript error message is generated:

/usr/local/lams-1.0.2/bin/lams: /usr/local/lams-1.0.2/bin/lams: Permission denied (126)

I entered the terminal script as indicated and other than th eusual sensitivity to spaces, it worked:

Last login: Wed Nov 16 09:23:14 on ttyp1
Welcome to Darwin!
littleone:~ johnwillis$ sudo su -
Password:
littleone:~ root# cd /usr/local/chown {johnwillis} -R lams-1.0.2
-su: cd: /usr/local/chown: No such file or directory
littleone:~ root# cd /usr/local/ chown {johnwillis} -R lams-1.0.2
littleone:/usr/local root#

I then closed the terminal without doing anything.......

More help please, as now I have my shackles up

John Willis

Posted by John Willis

21: Re: Re: applescript error from password
In response to 20 11/15/05 06:50 PM
[ Reply | Forward ]
Hi John,

Sorry about that. I must have been that I didn't explain myself properly. Here's strike two:

Open the terminal and type:

Last login: Wed Nov 16 09:23:14 on ttyp1
Welcome to Darwin!
littleone:~ johnwillis$ sudo su -
Password:
littleone:~ root# cd /usr/local/
littleone:/usr/local root# chown johnwillis -R lams-1.0.2
littleone:/usr/local root#

in bold are the commands that you need to execute. Also note that instead of {johnwillis} it should be johnwhillis without the curly brackets.

I think the problem must have been that you were running the cd /usr/local and then chown command all in one line... therefore the system returned "-su: cd: /usr/local/chown: No such file or directory", which means that nothing was changed.

Let me know how this goes.

Thanks,

Ernie

Posted by Ernie Ghiglione

22: Re: applescript error from password
In response to 18 11/21/05 10:11 AM
[ Reply | Forward ]
Hi Ernie

Still no resolution (I was going to say luck, but Hey!!)

I am reviewing unix stuff before I attempt any more

Thanks

John Willis

Posted by John Willis

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