theweaselking: (Default)
[personal profile] theweaselking
You are a Fedora 4 server running Apache with Tomcat 5.5 and Sun Java 1.5.0, MySQL 4, and Alfresco 1.3.0

You crash suddenly and without warning, locking up *solid*. After a reboot and a good fscking, you're up again. Everything works normally, EXCEPT Alfresco.

Alfresco, for those of you playing at home, is java web application that runs under Tomcat and holds data in a MySQL database. That's the most important thing to remember, here.

Now: MySQL is working, because I can see it working and because Bugzilla is working.
Apache is working because I can get to Tomcat.
Tomcat is working because I can reach the "OMG YOU INSTALLED TOMCAT LOL" page, and because Tomcat itself is delivering the error messages I'm receiving.
Java *says* it's working, but I don't have any easy way to test that claim.

Whenever I try to reach any of Alfresco's pages, I get a 404 "the specified resource is not available" message from Tomcat. It doesn't matter if the page is jsp, HTML, or a text file I added. The permissions on the entire folder set are 755 with owner tomcat:tomcat.

The files in question are, to the best of my ability to tell, really where they should be.

Pop quiz: Where do you go next?

(re Shooting the hostage: Alfresco was the hostage, and has already been shot. The hostage is bleeding on the ground as we speak. While shooting the hostage *AGAIN* is very very tempting, I'd rather not go right to that solution quite yet.)

(no subject)

Date: 2007-01-30 12:40 am (UTC)
From: [identity profile] zenten.livejournal.com
Check to see if Alfresco is actually running? If not, try running it manually from an open console, and see what messages it gives on exit.

(no subject)

Date: 2007-01-30 12:53 am (UTC)
From: [identity profile] theweaselking.livejournal.com
I should have been clearer: Alfresco is web-based. The startup script for Alfresco starts *Tomcat* and the JVM, and those process the jsp files as the browser requests them. There is no "Alfresco" process to begin - it's like MediaWiki. In the same way that MediaWiki isn't a program, it's a collection of PHP scripts that front a MySQL database and the real program is Apache/MySQL/PHP, Alfresco isn't a program, either.

(no subject)

Date: 2007-01-30 01:21 am (UTC)
ext_8707: Taken in front of Carnegie Hall (sherman)
From: [identity profile] ronebofh.livejournal.com
Why does Alfresco start Tomcat, anyway? Won't it run fine in a plain httpd?

(no subject)

Date: 2007-01-30 01:42 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Short answer: Because that's how the voodoo works. You wouldn't play with the voodoo, would you?

Long answer: The setup instructions for Alfresco say it requires Tomcat, the startup process is by scripts provided by Alfresco and they start Tomcat, and the person who set it up and installed it (not me) was very much a big fan of defaults and out-of-the-box setups. I don't really blame him, given the shit-poor state of the documentation for virtually everything involved.

For me, it worked before the reboot, and my interest is solely and exclusively *making it work again*.

As for "won't it run in plain httpd" - I don't know, but I doubt it. If it would, *somebody* would have mentioned it in the hundreds of pages on it. I know it requires JavaServer Pages and I'm fairly certain it needs JavaServer Faces, both of which are functionality in Tomcat.

(no subject)

Date: 2007-01-30 01:47 am (UTC)
ext_8707: Taken in front of Carnegie Hall (quiet)
From: [identity profile] ronebofh.livejournal.com
Hmm, this is a good point. I was thinking it was just PHP, but if it's .jsp... ugh.

I know this is not helpful, but we're using resin instead of tomcat. Tomcat gives me the heebiejeebies.

On the plus side, if the installer was a fan of leaving everything to defaults, reinstalling (if it comes to that) shouldn't be too bad.

(no subject)

Date: 2007-01-30 01:51 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Oh, no, it's all jsp.

And the real problem isn't reinstalling. It's reinstalling *without losing the current data*.

Alfresco is a royal pain in the ass, and I've only been working there for two days. Apparently it's *always* been a royal pain in the ass - I'm trying to convince them that between Samba and Subversion, they've already got all the file sharing and revision control stuff they need, so trashing Alfresco is a Great Plan For The Future.

(no subject)

Date: 2007-01-30 02:11 am (UTC)
ext_8707: Taken in front of Carnegie Hall (i think too much)
From: [identity profile] ronebofh.livejournal.com
Hmm, the data should be in a MySQL DB, no? Should be fairly safe there (or make a backup to be sure).

(no subject)

Date: 2007-01-30 02:40 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Here's the thing: I don't know.

There's a MySQL DB, but it's full of non-human-readable entries.

There's a folder called alf_data under webapps, with subfolders for 2006 and 2007, but everything underneath it is numbered folders (not corresponding to dates) and then numerically named .bin files.

And, given that this program died completely *last* time because somebody removed the Guest account's home folder, I think it might be far easier than I would like to screw the thing up so it won't let you in at all.

As such, again, I'd rather repair than reinstall. I was REALLY hoping somebody would say "Tomcat 5.5? John, you silly little man, EVERYONE know that you need to start Tomcat 5.5 with the -q:7 option the first time after a reboot! It's not documented anywhere because everyone knows it! That will fix everything!"

That would have been nice.

(no subject)

Date: 2007-01-30 03:46 am (UTC)
ext_8707: Taken in front of Carnegie Hall (frangendo)
From: [identity profile] ronebofh.livejournal.com
Sounds like you need a MySQL DBA. I would venture that the data's safely in the DB, but that AlFresco forgot how to find it. Sadly, my DBA skills can fit in this asterisk: *.

I would go look at the instructions for setting up AlFresco and just making sure everything looks normal to start with. If it does... i'm out of suggestions.

(no subject)

Date: 2007-01-30 03:43 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
Having a brain again (now that this is the morning), I realised that if MySQL and Apache were showing absolutely nothing in the logs, then maybe I should check to see what Tomcat is logging and not just rely on there being no log files named Tomcat.

Finding Tomcat's logs (which were located FAR AWAY from Tomcat, and not named "tomcat") told me that the problem was that the machine didn't know it's own name. Why? Because Java didn't just rely on something like "localhost" or "127.0.0.1", it demanded a DNS entry that matched 127.0.0.1 to the name the machine was trying to use. For some stupid reason, that wasn't working after the reboot.

vi /etc/hosts
127.0.0.1 localhost localhost.localdomain machinename machinename.domain

Restart Tomcat/Alfresco
Problem solved.

I really, really hate this machine.

(no subject)

Date: 2007-01-30 05:42 pm (UTC)
ext_8707: Taken in front of Carnegie Hall (southpark)
From: [identity profile] ronebofh.livejournal.com
Finding Tomcat's logs (which were located FAR AWAY from Tomcat, and not named "tomcat")

Ha ha. Isn't that a joy? I love Tomcat... TO PIECES.

I salute your effort and success. Also, you might want to check /etc/resolv.conf to make sure it's pointing at a working DNS server and that the server has a localhost entry.

(no subject)

Date: 2007-01-30 05:52 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
The server's got working DNS, it uses it all the time and I checked that after the reboot. I'll definitely check the file, regardless.

(no subject)

Date: 2007-01-30 02:42 am (UTC)
From: [identity profile] zenten.livejournal.com
Ah, ok.

What breeds of chicken have you tried sacrificing already?

(no subject)

Date: 2007-01-30 02:49 am (UTC)
From: [identity profile] theweaselking.livejournal.com
I thought about the black chicken, black candles, black altar, silver knife combination, but then I remembered that's for SCSI.

(no subject)

Date: 2007-01-30 12:41 pm (UTC)
From: [identity profile] jsbowden.livejournal.com
No, you sacrifice a goat to a SCSI chain, not a chicken.

You sacrifice a chicken in the Monastery.

(no subject)

Date: 2007-01-30 01:05 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
I thought you waved a dead chicken over Monastery posts, but it didn't matter when or how the chicken actually died.

(no subject)

Date: 2007-01-30 01:12 pm (UTC)
From: [identity profile] jsbowden.livejournal.com
It doesn't. I'm just mean that way.

(no subject)

Date: 2007-01-30 04:15 pm (UTC)
kjn: (SCSI)
From: [personal profile] kjn
Nah, see the icon for the proper start for a sacrifice to the SCSI God.

(It used to hang over the notoriously fragile, unmovable and temperemental seed Powerbook G4 that we had at a former job.)

(no subject)

Date: 2007-01-30 03:44 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
Fixed it (http://theweaselking.livejournal.com/2190572.html?thread=6877420#t6877420), thanks for the feedback.

(no subject)

Date: 2007-01-30 01:07 am (UTC)
ext_8707: Taken in front of Carnegie Hall (bofh)
From: [identity profile] ronebofh.livejournal.com
log4j.properties: everything on DEBUG.

Alternatively, shoot Tomcat because it's a mole.

(no subject)

Date: 2007-01-30 01:20 am (UTC)
From: [identity profile] mrbankies.livejournal.com
I'd hazard a guess that there's a lock file somewhere. Have you tried doing a date based file search in the Alfresco directories?

(no subject)

Date: 2007-01-30 03:44 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
I did, thanks for the suggestion, but that didn't work.

I did fix it (http://theweaselking.livejournal.com/2190572.html?thread=6877420#t6877420), though.

(no subject)

Date: 2007-01-30 12:43 pm (UTC)
From: [identity profile] jsbowden.livejournal.com
What is apache logging when you try and access Alfresco crapola?

What is MySQL logging?

A 404 error is almost as useful as a random hex dump.

(no subject)

Date: 2007-01-30 03:03 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
Apache: Apparently nothing.
Mysql: Apparently nothing.

Seriously. Neither one has log entries, in access or error, at the time of the problem.

However, having slept and now possessing a brain, I have found Tomcat's logs, helpfully called "catalina.log" and located nowhere near Tomcat - and that tells me that it's got an exception starting up alfresco because the hostname of the machine isn't right.

And THAT, I think I can fix.

(no subject)

Date: 2007-01-30 03:23 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
Okay, the problem is apparently that Tomcat isn't starting correctly because it doesn't recognise the machine's own host name.

(no subject)

Date: 2007-01-30 03:41 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
Finding Tomcat's logs (which were located FAR AWAY from Tomcat, and not named "tomcat") told me that the problem was that the machine didn't know it's own name. Why? Because Java didn't just rely on something like "localhost" or "127.0.0.1", it demanded a DNS entry that matched 127.0.0.1 to the name the machine was trying to use.

vi /etc/hosts
127.0.0.1 localhost localhost.localdomain machinename machinename.domain

Restart Tomcat/Alfresco
Problem solved.

(no subject)

Date: 2007-01-30 03:48 pm (UTC)
From: [identity profile] jsbowden.livejournal.com
You should only need "localhost.dom.tld localhost" in there (".localdomain" is a placeholder, not a permanent entry). I've NEVER had to add the actual hostname and FQDN to a localhost line, and there's absolutely no reason why it should ever be required.

(no subject)

Date: 2007-01-30 03:57 pm (UTC)
From: [identity profile] theweaselking.livejournal.com
The redundancy, frankly, doesn't worry me, and I don't mind leaving it that way until I can get back into that office in person. I don't like relying on log files to tell me that alfresco is running, and it's entirely inaccessible from the internet.

Profile

theweaselking: (Default)theweaselking
Page generated Feb. 5th, 2026 04:53 pm