Week 2 at the Oracle University

Excuse me. Another Oracle Rant.

ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS ! ORACLE SUCKS !

Sample of STUPID error message:

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory

Posted
Unstable breakage

sudo dpkg-reconfigure debconf 2005-07-03-224218_1024x768_scrot

Grrr, my unstable is broken and I don’t know how to fix this. Guess I need to change debconf to readline or something. Help. :)

Posted
Five nines

99.999% availability on service level agreements generally accomodate just one point of failure. So in a cluster if one machine goes down, it copes as there is another one to take it’s tasks on the fly and all the data is replicated elsewhere.

I wonder what High Availability(HA) setups feature two points of failure or how they’re marketed…

Be aware of 99.5% uptime guarantee perticulars. Most providers have a sliding scale of how much they compensate you. The compensation rarely adds up to anything significant.

One example:


If the total Downtime in the calendar month is more than fourteen and four-tenths (14.4) hours, the Service fee for that month shall be reduced by thirty-three percent (33%).

One third of your hosting costs for one month doesn’t quite cover the costs of a client’s business process that went down for an entire business day.

Other considerations:
* Actually monitoring your server – outsource to Netcraft? :)
* DOS attacks etc.
* When dependent link on the net goes down that’s out of your control
* Insurance policies (urgh!)
* Power disruptions – most “UPS” solutions offers just a few seconds to shut down your server. Better setups feature generators, but they only function for as long as there is fuel. ;)

Keep dependencies to a minimum

Posted
Oracle10g

Continuing from my previous Oracle posts.

Week 3 of Oracle and this week I have had a lot of breakthroughs. Most important discoveries were emconsole and dbca.

There are so many weird things going on in Oracle. I could rant all month, but I’ll try make this short. All I can say is that Oracle are on a sweet ride. They get great money from their corporate customers, though their product is so infuriating to use!

For example, release 2 of 10g is 100 upon 100 of megs of odd packages that you sometimes feel like asking your boss to buy the damn CD.

The Oracle bug database, metalink. What a joke. I still have not figured out how to report bugs. I don’t think I’ll bother.

Oracle Documentation on the “oracle database documentation library” SUCKS. It’s so boring to read. The Windows centric 2 day DBA might point you in the right direction.

Make sure ORACLE_SID points to your DB name!

emctl start dbconsole

Probably want to setup the listener by hand:

lsnrctl status
lsnrctl start

About the Enterprise Manager for Oracle 10g console. It’s actually a “self hosted” J2EE (urgh) Web application. It’s a beast and it’s buggy. Though it seems better than the other tools in the 10 million CD suite. My friend’s “Oracle DBA Guy” says it is the bomb. What the hell did Oracle DBAs work with before? ;)

Yes, I have seen that SQL SCRIPTS used to maintain Oracle in an OLD SKOOL way. Christ, what crap.

Tour my screenshots of Oracle 10g.:
* Stupid SYSDBA login
* The console
* Bottom of the console
* Performance graphing with SVG!
* Admin tab
* Maintain tab
* Patching feature. COOL. Pity it doesn’t work very well.

For administrators or “deployment managers” (someone corporates hire when their project is running late to help actually deliver and take the blame) like me, you can do everything there except setup a database. That’s where dbca comes in.

Creating a database in Oracle is tricky. I was presented with a whole bunch of scripts to setup a client’s database. Unfortunately those scripts were dependent on version 9 of Oracle and they were not porting well over to 10g.

In frustration I did create a user and a tablespace in the default orcl database. That’s the wrong way. Use dbca, ok?
Dbca is a Java GUI app that sets up a default database which is amazingly close to my client’s own DB creation scripts. Yay. It does create an HTML file of the specs when you’re done. I don’t see how one can use that as a template for future databases. It’s unparsable FFS.

Hmm, what other tips can I share. Starting it up is hell. If your database is called “rinco” make sure then environment variable ORACLE_SID is equal to that.

Something else mildly interesting. The way you log in. You need to use the /nolog feature and the connect as a sys DBA. Argh:

[oracle@server ~]$ export ORACLE_SID=orcl
[oracle@server ~]$ sqlplus /nolog

SQL*Plus: Release 10.1.0.3.0 – Production on Tue Jul 5 16:37:31 2005

Copyright© 1982, 2004, Oracle. All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> startup

Lastly: Oracle Blogs

Posted
SSL subdomains

I hate SSL.

I am just setting up an SSL website for server.client.com. Turns out the certificate is only for www.client.com. I like to host Web applications off subdomains and this “SSL domain mismatch” error pisses me right off.

Images suck

(Re-)Discovered a TZ conversion bug in coreutil’s date late last night.

Really didn’t expect bugs in shell tools like date.

I could work around it adjusting the epoch with date +%z but that would be an awful hack.

Sadly, I have been writing scripts for handling my pictures again and again. All because EXIFs are FECKED up with by dates by the camera and then by my favourite image viewer feh. And then screenshots etc. don’t have EXIF. narf.

Time is the most important attribute for data.

All the digital images that are taken are going to be very hard to manage without proper dates. The Y2K problem is a joke compared to this IMO.

While we’re here, how about scalable images?

I’ve had this feeling before. If something isn’t designed right from the start, an exponential amount of problems result.

Kiosk Linux

Update: Webconverger is the best Linux Web kiosk out there.

If I could setup a “bounty” I would set it on:

I can’t even find the bug for this. SALT or the current default way it stores profile really really sucks.
If this authentication infomation etc. was stored in PAM or LDAP then I wouldn’t have to bother with XDM. A remote profile service would be even better.

A mass market “Kiosk Linux” could then have a chance work. An end user distribution where the desktop is just a browser. No Gnome, No KDE, No bullshit. Just a browser. That’s the desktop.

Web applications could be made to assist people in say, burning CDs. Playing music from Firefox would be trickier.

mobile Web

Last month I made a few posts at the W3C defending the The Magical Mobile Web Browser.

I asked in the end for some sort of W3C sanctioned certification scheme for Web browsers. W3C has the corporate contacts, I just wish they would use them. I don’t think so with XML loving expert from Vodafone leading an ill concieved work group. :(

Opera’s mobile browser seems the best hope of getting things ship shape with mobiles. Though, funny enough my ex-flatmate Andrei Popescu is working on porting KHTML to Symbian.

In other news I’ve been asked to make a pitch on creating a payment system that will work on a mobile. In order to make a payment, Credit Card payment gateways require:
* Full name or Account name
* Card number (49xx xxxx xxxx xxxx) Isn’t there some checksum for Visa/Mastercards?
* Expiry date mm/yy (could be checked)
* Check code on the reverse of the card. 3 to 4 digits.

I could write this to work on most mobiles, though there must be some existing implementations. Aren’t there? :)

Though I wonder how many mobiles support HTTPS/SSL?

If you have a mobile, please try out the HTTPS and DIGEST test (user:d, pass:p) on dabase.com

svn svk sat

Woke up early to get Harry Potter. My flatmate and I are reading it to each other. It’s been quite fun though straining on the vocal chords.

In the afternoon I spent some time with svk.
It seems stable and since I am doing more work from my Thinkpad, I will make the switch.

Also took a little look at Django. I am not convinced about MVC and the docs are a little thin. I will come back to it before making a final judgement.

I have been writing a few little things in PHP. HTML and logic needs to be tight, that’s why I am unsure about MVC. I am quite pleased with PHP‘s speed. It’s lightning fast.

I also discovered YAML. I like the look of it and it seems easy to parse.

Tonight I’m off to the Opera. Sigh. A comedy. I prefer to finish Nick Hornby’s latest book and act out Harry Potter.

Wordpress spellcheck

One major feature missing from Wordpress was a decent spell check. I did have a setup where I edited the form in vim, but I kept on losing that configuration when swapping machines.

Enter Google’s Firefox toolbar which allows me to spell check my Wordpress posts.

Very cool.

Timeline

After spending too many hours sorting out date and time issues with my picture collection, I am now concerned with date/time standards.

The standard that WHATWG refers to is ISO 8601. Though in order to read this, I need to buy it. Er, no can do. And it seems to be a withdrawn standard. What’s that all about?

OMG date/time has historically been fecked up in software. Remember Y2K?

In WF2 new date/time controls are introduced as extensions to the input element. Attributes like:

  • datetime
  • datetime-local
  • date
  • month
  • week
  • time

Firstly I am not fond of having several attributes when one element could do. This was proposed by Matthew Raymond (as a format element?) though I think it was shot down by the fact that legacy applications would have to ignore this new data type. Ok so it’s not in the domain of WF2, though we still can’t ignore this major problem of dating data!

Other things I am worried about is:
* Negative dates – useful for faux blogs and games
* Timezones – You always need this! And the WHATWG date/time demo doesn’t have it.

Something must be done to address the temporal values of the Web. Take for example the way currently the date/time of this post is marked up. “July 2005” in a “small” element and “title” attribute. That’s not right.

Oracle EM Console security

It’s probably not a wise idea to allow SYSDBAs to connect to Oracle’s Enterprise Manager Console (actually it’s a Web application) over HTTP. Someone could sniff the password and have access to the database.

Create a secure SSH tunnel:

ssh -L 5501:localhost:5501 server.thatrunsoracle.example.com

So I run the above line from my workstation and then connect to localhost:5501/em

Gotcha: Make sure the local and remote port are the same! EM doesn’t work otherwise.

P.S. I’m available for Oracle security auditing for just 100UKP an hour.

In between .NET and JAVA

One of my work colleagues said to me: “If you’re not in the .NET camp or the JAVA camp, where the hell are you?”

Shame not many people know what LAMP is. Though, I see a lot of Perl developers wanted on contracts, at least in Australia. Urgh, Perl. ;)

I refuse to work with Microsoft technologies, so here I am on a JAVA contract.

Since I came across a real nasty bug, I have been migrating the environment to the 1.5 JDK. I could have gone for a bug fix version of 1.4, but since you’re forced to go to 1.5 sooner or later, I decided to make the jump now. While I’m still sane. Everything was going so well, until some clients complained about this error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: xxxxxxxxxxxxx (Unsupported major.minor version 49.0)

I skipped lunch to fix this problem. It turns out that our SWING applications built with the 1.5 JVM don’t run on the 1.4 JVM. That makes sense, though 1.4 applications run fine on a 1.5 JVM. That error message is so stupid, if it said “YOU ARE RUNNING A 1.5 BUILT APP ON A 1.4 JVM”, it would have saved zillions of precious hours. In order to ease SWING deployment I investigated Java Webstart. Die SWING client DIE. It is so going to be a Web application sooner or later.

Another concern of mine is the JBoss4 environment. It’s unstable. I have some experience of IBM Websphere too and I wasn’t impressed with that either. They are all so shaky compared to say a LAMP environment under Debian. I don’t understand how corporations can trust their business processes to them. Insane.

My boss asked me: “is Jboss so bad because it’s free?”

Oh sweet Jesus. Applications that are free software are about 10x better than non-free applications in my experience.

Anyway I was asked to investigate other “Application servers”. Lets take Oracle’s JVM which is part of their 10g suite and hosts their Enterprise Manager.

Check the hilarious comments:


most complicated and hard to use and full of bugs software i’ve ever seen

Finally here is a matrix of all those really crappy application servers.

I think my best advice is stick with Jboss. “sigh”

I would love to see all these sucky frameworks, middleware and application servers disappear. People nowadays prefer using 3 layers of data objects (SLOW) instead of running a simple SQL statement(fast). Get back to basics, UNIX style: small independent programs. You know, using sendmail instead of some buggy “mail framework” to send email.

I guess the problem is most developers develop on a Windows workstation and re-invent a lot of stuff because Windows doesn’t do anything properly.

Though still, object orientated programming is a real fuck up.

Wordpress mass hosting

Why pay more?

Wordpress_1.5.1.3–4 has a little script to assist setting up loads of blogs on one machine. Try it out by putting wptest on your 127.0.0.1 line in /etc/hosts:

debian$ sudo sh /usr/share/doc/wordpress/examples/setup-mysql wptest Constructed database name and user: wptest from wptest /etc/wordpress/config-wptest.php wrote Goto http://wptest to setup Wordpress

Pretty easy huh?

Though, I need to improve this hack and migrate it to dbconfig-common.

Wireless sucks

I have moved in to a hostel in central Melbourne and once again I am without Internet.

The state library’s wireless Internet access is an insane 13AUD an hour.

I wrote to them about it and received a reply. They said they’ve installed their own access point to access their databases, but not the Internet. Their databases are actually quite cool. I was thinking of dumping contents such as all the ISO standards to my laptop’s hard drive and uploading it to some site in Kazakhstan. ;)

Pity I couldn’t get my IBM T30 to connect to any access points whatsoever in the library. It doesn’t work. I am not sure if it’s my configuration or theirs. Argh! :(

This morning I actually managed to build my own Kismet packages and got it working with my laptop.

A miracle. Kismet works better than wavemon which doesn’t seem to work nearly as well with my Thinkpad’s cisco wavelan card as it did with the orinoco. The program has that bluebeep feel. Who remembers bluebeep? ;)

I detected quite a few access points, but once again I can’t seem to connect to any of them via a “dhclient eth1”. I can capture packets, break WEP and do a DoS, but I can’t figure out how to nicely join a network. :/

I want free Wireless Internet dammit. When I try the forums, mailing lists and irc channels people accuse me of aiming to “steal the Internet”. Oh FFS. The Internet should be free assholes.

In other news I managed to get Dynamic Frequency Scaling working on my T30! Joy! Maybe I’ll get 30 minutes extra from my battery. The battery for my T30 is new and lasts about 2 hours on a full charge.

Wireless sucks.

PHP XML

I hate XML.

I investigated storing my GPS co-ords in a really simple XML file with PHP for my map application. I did this thinking that I could only interface data with Google Maps in Javascript with XML. In fact you can use responseText with XmlHttpRequest.

With PHP, I couldn’t get “get_attribute” to work on the child nodes. The PHP docs are frightening. It took me too long to figure out I had to install the php4-domxml debian package just to get started. It is really dumb writing XML code in PHP4, because everything changes in PHP5. Nightmare.

Unix style flat files rule. I hate it how some applications that use CSV are migrating to XML and other stupid interfaces.

Posted
PSP

After seeing a post by Russell about the PSP I decided to visit my local games store and try out a PSP demo device.

Funny how we call small things devices and larger devices machines.

Anyway, I was impressed by the screen. It’s huge. I played Ridge Racer a bit and it fealt great. I love how you can do backward turns in that game.

It seems to be limited to just 1Gig of flash memory. It’s probably designed so that you can’t share movies on a USB stick. I hate CDs so I was a bit disappointed to discover the proprietary Universal Media Disc(UMD).

I am not sure how the wireless works. The staff there seemed to think you can only connect to another PSP.

Battery life seemed a bit small. 3–4 hours. I guess that’s not too bad.

I would have loved to see the browser all the mobitopia geeks are talking about. Argh.

They will come out in September in Melbourne, at 399AUD.

Posted
Jmeter

A collegue of mine DoSsed natalian.org with Jmeter.

It was only pulling the index.php and it seemed to hold up with a 100 concurrent connections. Then after awhile Wordpress seemed to lose contact with the mysql database and my site didn’t respond for more than 200 seconds. :(

It came back pretty quickly after he stopped the test. I was told there was only one error, though I can’t see anything odd in the logs.

I am probably going to move over to Dreamhost in the near future as the machine is quite badly specced and on a home connection.

Oracle 10g on Hoary notes

Helpful:

* Debian specific oracle guide
* RH specific walkthrough

Put in the 10g DVD and had permission denied errors when trying to runInstaller from /media/cdrom. Didn’t quite figure this out as the file did have exectution rights. Ended up copying the db directory from the installation CD to the ~oracle homedir.

“useradd -c “Oracle software owner” -g oinstall -G dba oracle” didn’t seem to create a homedir. Created one after by hand.

I hate Gnome terminal. So slow.

That terminal bell is so annoying.

xhost + didn’t work. Ended up just logging in again as newly created oracle user.

Had to install extra gcc package. Why does Oracle compile stuff on installation?! Those guys are “on crack”.