Forum Problems Installing LAMS: Re: 404 error


 
Search: 

2: Re: 404 error
In response to 1 02/18/07 11:09 PM
[ Reply | Forward ]
Owen,

On the login page, there is a "news" section that is populated from a separate file. This allows administrators to create their own news for their LAMS site. However in LAMS 2.0, when the file can't be accessed for some reason, it breaks the login page.

My guess is that on your installation, it can't access the news file properly. I suspect that the problem will be the setting for the server url.

When you installed LAMS, the installer asks you for the server url by which LAMS will be accessed. I think it defaults to http://localhost:8080/lams/. What did you set it to? You must whatever address you entered there to access LAMS.

If you can't remember what you entered, go into a MySQL client, go to the LAMS database, find the lams_configuration table and look at the entry for ServerURL.  If you don't have a nice GUI program to access MySQL, you can do it from the command line:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -u lams -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 73 to server version: 5.0.24a-community-nt-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use lams2
Database changed
mysql> select * from lams_configuration where config_key = "ServerURL";
+------------+-----------------------------+
| config_key | config_value                |
+------------+-----------------------------+
| ServerURL  | http://localhost:8080/lams/ |
+------------+-----------------------------+
1 row in set (0.00 sec)



If this value ISN'T http://localhost:8080/lams/ then the login page may throw this error.  The value in the database must match the one you enter in the browser. So if you want to access your server as http://lams.someschool.edu.au:8080/lams/ then you should put "http://lams.someschool.edu.au:8080/lams/" as the value in the database.

If the ServerURL setting is wrong, then you will need to correct it directly in the database (as you can't login successfully and do it using the system administrator screen).

You can use a statement like the following in your mysql client. Or reinstall LAMS and make sure you enter the URL correctly.

update lams_configuration set config_value="http://myserver:8080/lams" where config_key = "ServerURL";

Post back here if this doesn't fix it.

Fiona

p.s. We will make the login page more robust in the next version - ie if it can't access the news file then the news will be missing but the login page will still work. Then this problem will be easier to fix. But you won't want to wait till the next release just to fix this.

Posted by Fiona Malikoff

3: Re: Re: 404 error
In response to 2 02/19/07 05:07 PM
[ Reply | Forward ]
Hi Fiona

I chose the default setting for the server http://localhost:8080/lams/, so the problem isn't there.

I tried http://localhost:8080/ which gave the Sun 'your server is up and running' screen, so I'm assumming that I've installed the JDK correctly.

When I'm signed onto my server, and access c:\lams\index.html, I get the LAMS startup screen, however when I click on 'click her to go to the logon page', which is the http://localhost:8080/lams/ link, I then get the 404 error.

I'm reasonably sure I've setup the path statements correc tly.

Any other suggestions?

thanks
Owen

Posted by owen kessell

4: Re: Re: Re: 404 error
In response to 3 02/19/07 05:19 PM
[ Reply | Forward ]
http://localhost:8080 would show a 'Welcome to JBoss' page if it were LAMS that were responding. I think you might have another app running on 8080 on your machine (Sun Java System Application Server Platform Edition 9.0_01 maybe?)

You can check this by checking your C:\lams\jboss-4.0.2\server\default\log\boot.log and server.log - it will have an error about ports being occupied. Alternatively, make sure you've shutdown LAMS, and at a command prompt, run 'netstat -an', and check if port 8080 is open for listening. If it is, you have another app using the port.

Posted by Jun-Dir Liew

5: Re: Re: Re: Re: 404 error
In response to 4 02/19/07 10:57 PM
[ Reply | Forward ]
Hi, yes you are correct, I do have the Sun Java System Application Server Platform Edition 9.0_01 running on 8080.

I followed the installation instructions and left most of the defaults.

What do I need to do to correct this?

thanks
Owen

Posted by owen kessell

6: Re: Re: Re: Re: Re: 404 error
In response to 5 02/19/07 11:17 PM
[ Reply | Forward ]
You can uninstall and reinstall lams, making sure the server url you enter at install time does not use port 8080.  This won't work if your other app uses other ports that jboss also needs, but is the neat way to go about it.

The other way is to edit the config for your current installation to change the port, but the link inside c:\lams\index.html won't work anymore unless you update that too.

To edit your current config, open C:\lams\jboss-4.0.2\server\default\conf\jboss-service.xml in Wordpad, and uncomment the following block (it's commented out by default):

<mbean code="org.jboss.services.binding.ServiceBindingManager"
    name="jboss.system:service=ServiceBindingManager">
    <attribute name="ServerName">ports-01</attribute>
    <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
    <attribute name="StoreFactoryClassName">
      org.jboss.services.binding.XMLServicesStoreFactory
    </attribute>
  </mbean>

In addition to this, follow Fiona's steps above to update the url in the database to be 'http://localhost:8180/lams' instead of the url with 8080.

Then start LAMS.  The URL should now use port 8180 instead of 8080.

Posted by Jun-Dir Liew

7: Re: Re: Re: Re: Re: Re: 404 error
In response to 6 02/22/07 06:41 PM
[ Reply | Forward ]
Okay

I uninstalled LAMS, then reinstalled choosing port 8180 as suggested.

However when I try to run 'http://localhost:8180/lams' I get a HTP 400 error, Bad Request?

How can I check that port 8180 is open and available?

thanks
Owen

Posted by owen kessell

8: Re: Re: Re: Re: Re: Re: Re: 404 error
In response to 7 02/25/07 07:14 PM
[ Reply | Forward ]
There's a freeware program I use that will show you what programs are using which ports - it's called ActivePorts. It doesn't install spyware/malware.

http://www.download.com/3000-2085-10062969.html

Posted by Jun-Dir Liew

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