Read the fucking logs? Yes, it happened so many times, on so many guys. Something that I always try to avoid.
Say, you hit into a problem, you looked into the log file, you could see a bunch of error messages and stacktrace, you read the first line, you didn't bother to read the second and further.
You tried to change the configurations or something that you thought would make sense but the same (or new) error came out. You spent quite some time on it like an hour or a day.
You asked me / your supervisor to look into it and they found clear error messages or indications somewhere down the error log. You felt sorry, you found yourself stupid to waste so much time, you wished to be in the hall of shame for that day.
If this is a recurring habit of your, can you make "reading logs carefully" as a troubleshooting principle?
Aflexi, FOSS, Java, Software Engineering, Politics, the Beings and Nothingness.
Showing posts with label software. Show all posts
Showing posts with label software. Show all posts
Tuesday, March 31, 2009
Thursday, December 11, 2008
Upgrading/Uninstalling AIR Runtime on Linux
While upgrading my AIR on Linux from Alpha to Beta, I hit into:
That's not too helpful so I guessed I would have to remove the older version before upgrading. You can't uninstall using the installer as it doesn't provide an uninstallation option, you have to look into your package manager, e.g.
The Alpha version appears as adobeair-enu and Beta as adobeair1.0.
yc
An error occurred while installing Adobe AIR. Installation may not be allowed by your administrator. Please contact your administrator.
That's not too helpful so I guessed I would have to remove the older version before upgrading. You can't uninstall using the installer as it doesn't provide an uninstallation option, you have to look into your package manager, e.g.
dpkg -S "*air*" | grep adobe
The Alpha version appears as adobeair-enu and Beta as adobeair1.0.
yc
Monday, December 1, 2008
Hudson SVN Revisions/Changes Went Out of Sync
A project in our Hudson had been stalled for 3 weeks, for its svn revisions/changes, and I had to do a manual svn update in its workspace directory to make sure the build runs correctly. What exactly happened is that, Hudson was not checking out the HEAD revisions of these modules but the old revisions before it ran into this problem, besides, the "Changes" page showed no information other than those builds that happened 3 weeks ago.
So I thought there could be some state being held by it and I tried:
Just a tip if any of you ever hit into this.
yc
So I thought there could be some state being held by it and I tried:
- To turn off using SVN update but SVN checkout for every build.
- To change the revision values in the svnexternals.txt.
- etc.
Just a tip if any of you ever hit into this.
yc
Saturday, June 28, 2008
'publickey' SSH Authorization fails if 'authorized_keys' file is writable by non-owners
I didn't realize this. SSH kept prompting me to fill in password even though I forced it to use just 'publickey' authorization:
Fixed by revoking write permissions (chmod 700) to the authrozied_keys file. Very simple logic, brrr.
Some links that I came across:
- yc
$ ssh -i id_kimmy somewhere.com -v
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/yclian/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/yclian/.ssh/identity
debug1: Trying private key: /home/yclian/.ssh/id_dsa
debug1: Next authentication method: password
yclian@somewhere.com's password:
ssh -i id_kimmy somewhere.com -o 'PreferredAuthentications publickey' -v
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/yclian/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/yclian/.ssh/identity
debug1: Trying private key: /home/yclian/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,password).
Fixed by revoking write permissions (chmod 700) to the authrozied_keys file. Very simple logic, brrr.
Some links that I came across:
- http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
- http://kimmo.suominen.com/docs/ssh/
- http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto.html
- yc
Saturday, June 7, 2008
PGP Signing and Encrypting Emails
In our company, we use PGP to sign or sometimes encrypt emails due to the agreement with customers who demand high security. However, as for my personal mails, I have never put PGP into the equation.
So I spent some time in the afternoon to set up PGP for my personal accounts (and got the chance to play around with revocation too). I got myself to set up Enigmail too, a Thunderbird extension to manage PGP keys and your mails with them. As a Linux user, I actually use GnuPG more (and it works, I'm not sure why uploading keys to MIT server failed a few times on my browser and Enigmail) and here are the commands to share, for GnuPG and support for OpenPGP:
Remember to protect these files, e.g. chmod 700 *.
I will be digitally signing my emails from now on anyway and whenever necessary encrypt them. Here is my public key for yuenchi.lian@gmail.com, which you can also find in the MIT key server:
I have a question, where would be the best place to store my private keys? I actually had them packed in a protected zip and sent over the wire to somewhere. The sites returned by Google suggest to do paper or disk backup.
Now if every one in this world uses PGP and applications are built with its support, will people still be the victims of phishing?
- yc
So I spent some time in the afternoon to set up PGP for my personal accounts (and got the chance to play around with revocation too). I got myself to set up Enigmail too, a Thunderbird extension to manage PGP keys and your mails with them. As a Linux user, I actually use GnuPG more (and it works, I'm not sure why uploading keys to MIT server failed a few times on my browser and Enigmail) and here are the commands to share, for GnuPG and support for OpenPGP:
gpg --gen-key
gpg --export yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.public.gpg
gpg --export-secret-keys yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.private.gpg
gpg --armor --export yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.pub.pgp
gpg --armor --export-secret-keys yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.sec.pgp
gpg --armor -a --export yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.pub.pgp.asc
gpg --armor -a --export-secret-keys yuenchi.lian@gmail.com > yuenchi.lian@gmail.com.sec.pgp.asc
Remember to protect these files, e.g. chmod 700 *.
I will be digitally signing my emails from now on anyway and whenever necessary encrypt them. Here is my public key for yuenchi.lian@gmail.com, which you can also find in the MIT key server:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGP Key Server 0.9.6
Comment: PGP public key for yuenchi.lian@gmail.com
mQGiBEhKUl0RBAChtf+UhgLMq+yzN8J5rNQkl1T2fHBYeP7xELhqEw71bJ1mGx4i
jQ2Ih524rlDgUsSPoAcArVTrN4Tvg7pG8W8XWGJqOh1L62UBYJhwKEmMOC3iQgKx
Uk4N5Ldfum85yhRVZ+78LQuHJUR8OV4Oeg+ny/6d6fIfzru6jO4gBp/A7wCg0PNk
yFyg/slc9Apq4klDhWvXs2UD/3ycSGQvZvd0u+hBgrg3nC40YJ5qUB/fkUYbPS8J
WEi/kMfR9e9PLs3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3i/QICjegiiLzkTozHmzo6kNg3DDHscbyzDzgxMTRQtE
4GYffDRD8KeJjt3wcF8X5zXsOIcYbOqq19pi8XaP4fQXHIqVWbstfprTRqUiuDu4
RNVsg865jXIExBC9uo4zt2DS5/yflHNhLQyY+XH+f4hJBBgRAgAJBQJISlJhAhsM
AAoJEDonh/rtNGxvlhMAn05pvdyvCYA1bO3I8wzRBAo0WBmHAKCL9MWzFb+essGZ
zFm7O2D/hrNcnw==
=Ot82
-----END PGP PUBLIC KEY BLOCK-----
I have a question, where would be the best place to store my private keys? I actually had them packed in a protected zip and sent over the wire to somewhere. The sites returned by Google suggest to do paper or disk backup.
Now if every one in this world uses PGP and applications are built with its support, will people still be the victims of phishing?
- yc
Saturday, April 26, 2008
Hardy Heron
Left office with update manager on to upgrade my work machine "Nemesis" to Hardy Heron. Gotta check it tomorrow. :-)
However, I have no luck on my home machine "Kate". I have filed a bug report at Launchpad and hopefully I can get some help from the community.
- yc
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy
However, I have no luck on my home machine "Kate". I have filed a bug report at Launchpad and hopefully I can get some help from the community.
- yc
Saturday, April 19, 2008
A Review on Adobe Flex Builder Linux Alpha 3
Initially when I started to write this review, I downloaded and set up Adobe Flex Builder Linux Alpha 2 on my Ubuntu machine, faced some troubles which some will be addressed at the Troubleshooting section. It was left with just three days for evaluation and I got stuck with work. By the time I had the time to start a proper review on it (by following the materials provided by Adobe), it was already expired. I had to download the Alpha 3 instead, which was released on 31st of March.
Just in case that you had the wrong idea, Adobe Flex Builder (I will call it the "general release" to avoid confusion), which can be obtained from this address, is not the same project with the Linux release. They are both on two different projects, where the former follows the Flex product schedule; the latter at this stage is not a full release and not all features of the general release are implemented in it. Please read the release notes of it for a list of supported and unsupported features.
To give a short introduction about myself, I have no Flex technical experience prior to doing the review, knowing just general idea of it. However, I'm a supporter of the MyFUG (Malaysian Flex User Group) and I attended most of their meetings.
Eclipse is a mature, feature-rich and extensible IDE. Having Flex Builder to be an extension of it gives developers a very-well integrated environment for different kinds of development that could fall under the same project, e.g. developers can easily switch from Flex Development perspective to the Java Development perspective, etc.
Without a Design View could actually be a big issue to some people, but given that Unix-based users generally love text more than GUI, it could just not be the case. Plus, writing Flex application using vi editor can longer be that quick in comparison as the Flex Builder provides you with features such as content assistant, quick navigation to API source, etc.
Followed the review guidelines, I developed a simple application with an advanced data grid (read also this) which its data is populated from a local XML file through the HTTP service. The advanced data grid is part of the Data Visualization which is shipped as a trial with the Linux release since Alpha 2, it therefore places a "Flex Data Visualization Trial" watermark in the UI as you can see from the screen-shot below. Another feature that comes as a trial is the Automated Testing.
The solution to remove the watermark seems explained in this blog entry.
I am not too sure if the general release has the same behaviour (which I doubt no), content assistant does not work for advanced data grid. It turned out to be quite annoying, but knowing that Data Visualization is still at trial, we can safely say that it is not a bug.
I am also very much concerned with having a Maven 2 plug-in for Flex development. There is a popular issue tracking this at SDK-12730.
The quick workaround to this is to set the AWT_TOOLKIT environment variable with the value XToolkit.
Just in case that you had the wrong idea, Adobe Flex Builder (I will call it the "general release" to avoid confusion), which can be obtained from this address, is not the same project with the Linux release. They are both on two different projects, where the former follows the Flex product schedule; the latter at this stage is not a full release and not all features of the general release are implemented in it. Please read the release notes of it for a list of supported and unsupported features.
To give a short introduction about myself, I have no Flex technical experience prior to doing the review, knowing just general idea of it. However, I'm a supporter of the MyFUG (Malaysian Flex User Group) and I attended most of their meetings.
Environment
Flex Builder is an add-on to Eclipse IDE, a well-known IDE especially for Java-based development. The general release is a commercial add-on but is completely free for educational purpose, it is also available free for 60 days evaluation. The Linux release however is release for evaluation purposes only and it has a fixed expiry date for each release. If you want to find out more about the price and licensing details of Flex Builder, please read this link.Eclipse is a mature, feature-rich and extensible IDE. Having Flex Builder to be an extension of it gives developers a very-well integrated environment for different kinds of development that could fall under the same project, e.g. developers can easily switch from Flex Development perspective to the Java Development perspective, etc.
Features
As you would have already read from the release notes, the Linux release doesn't support design view at this stage. It provides you with Flex SDK version 2 and 3, Flash Player, JSEclipse, Adobe AIR support and more others that you can read from the What's New.Without a Design View could actually be a big issue to some people, but given that Unix-based users generally love text more than GUI, it could just not be the case. Plus, writing Flex application using vi editor can longer be that quick in comparison as the Flex Builder provides you with features such as content assistant, quick navigation to API source, etc.
Followed the review guidelines, I developed a simple application with an advanced data grid (read also this) which its data is populated from a local XML file through the HTTP service. The advanced data grid is part of the Data Visualization which is shipped as a trial with the Linux release since Alpha 2, it therefore places a "Flex Data Visualization Trial" watermark in the UI as you can see from the screen-shot below. Another feature that comes as a trial is the Automated Testing.
The solution to remove the watermark seems explained in this blog entry.Development
So you may question, how bad it is without the Design View. I wrote nearly 50 lines of code with not more than half of them are realizable in the general release via Design View, i.e. <mx:Application/>, <mx:Panel/> and <mx:AdvancedDataGrid/>. The rest of the code is <mx:HTTPService/> and action scripts. Therefore the answer is very subjective to the nature of the application which you are building. If it consists of a lot of UI components, the development can definitely be sped up with drag-and-drop and other features provided by the Design View.I am not too sure if the general release has the same behaviour (which I doubt no), content assistant does not work for advanced data grid. It turned out to be quite annoying, but knowing that Data Visualization is still at trial, we can safely say that it is not a bug.
I am also very much concerned with having a Maven 2 plug-in for Flex development. There is a popular issue tracking this at SDK-12730.
Troubleshooting
I had some issues initially when I tried to install the Flex Builder on my system, which is an Ubuntu 7.10 Gutsy Gibbon running on a 64-bit machine. There were a few requirements mentioned in the release notes that I missed out the first two:- You need a 32-bit Java Virtual Machine, download from here.
- You need a 32-bit Eclipse, download from here.
- You need a 32-bit Flash player on a 32-bit Firefox, read this.
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.5.0-32bit/jre/bin/java 50I also hit into the following error when I was trying to start the installer with JRE6:
Runtime link error - it appears that libXt got loaded before libXm,
which is not allowed.
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
Stack Trace:
java.lang.NoClassDefFoundError
at sun.java2d.SunGraphicsEnvironment.addDirFonts(SunGraphicsEnvironment.java:722)
at sun.java2d.SunGraphicsEnvironment.registerFontsInDir(SunGraphicsEnvironment.java:602)
The quick workaround to this is to set the AWT_TOOLKIT environment variable with the value XToolkit.
Further Reading and Other Resources
Sunday, December 30, 2007
3 Solutions to GNOME/VNC keyboard mapping issue
I am trying to connect to my workstation in the office via vncviewer and I got scrambled keys in GNOME before I applied one of the fixes below. This has bugged me for more than a week and Google couldn't really give me a good answer until I searched for:
Try.
It is a bug reported at #108928 and duplicated at #112955. Appears more like a GNOME issue than a VNC issue.
Solution #1: Use vnc4server -extension XFIXES
No, I did not try this because I simply do not want to change my client. The workaround basically requires you to remove tightvncserver and use vnc4server instead. Refer to this and this for more information.
Solution #2: Avoid executing gnome-session
Instead of running gnome-session, run the following commands in your xstartup script or manually in xterm:
Suggested by Randy at this link.
Solution #3: Reset the keyboard layout via gconf-editor
This solution works the best in my opinion, suggested by Will at this link. Open up gconf-editor in your X then navigate to:
You will probably be seeing empty value [] or [us] for the layouts. Enter anything say foo, close the application and your problem should now be fixed.
- yc, one problem in life down
asdf abfh vnc
Try.
It is a bug reported at #108928 and duplicated at #112955. Appears more like a GNOME issue than a VNC issue.
Solution #1: Use vnc4server -extension XFIXES
No, I did not try this because I simply do not want to change my client. The workaround basically requires you to remove tightvncserver and use vnc4server instead. Refer to this and this for more information.
Solution #2: Avoid executing gnome-session
Instead of running gnome-session, run the following commands in your xstartup script or manually in xterm:
gnome-wm &
gnome-panel &
gnome-cups-icon &
gnome-volume-manager &
Suggested by Randy at this link.
Solution #3: Reset the keyboard layout via gconf-editor
This solution works the best in my opinion, suggested by Will at this link. Open up gconf-editor in your X then navigate to:
desktop > gnome > peripherals > keyboard > kbd
You will probably be seeing empty value [] or [us] for the layouts. Enter anything say foo, close the application and your problem should now be fixed.
- yc, one problem in life down
Sunday, October 21, 2007
Ubuntu 7.10 - Gutsy Gibbon with XGL
Upgraded my Ubuntu to 7.10 yesterday, the coolest add-on to it is the support of Compiz Fusion (Compiz effects came in at 7.04 actually). Some of you might have seen the effects, which I will briefly walk through those that I have experienced later before I end this short blog entry.
A few problems that I experienced after the upgrade were:
To find out what can Compiz effects do, please take a look at this Youtube video. I noticed and managed to discover some newly added effects:
Read these to discover more:
- yc, impressed
A few problems that I experienced after the upgrade were:
- Restricted drivers manager not working. It said something like this:
You need to install the package linux-restricted-modules-* for this program to work.
Solution: Install the restricted module, e.g.apt-get install linux-restricted-modules-2.6.22-14-generic
- Couldn't turn on Compiz effects via System -> Preferences -> Appearance -> Visual Effects. It said something like:
Desktop effects could not be enabled
Solution: Turn on "Composite" in /etc/X11/xorg.conf, i.e.Section "Extensions"
Option "Composite" "1"
However, before that, you have to install the GL based X server, i.e.apt-get install xserver-xgl
Then, restart your X server (ALT + CTRL + Backspace) after you have made configuration changes. - IDE and Java applications such as IntelliJ and Netbeans were broken with blank swing interface. I noticed that the menus were still working when I moved my mouse over them.
Solution: Set AWT_TOOLKIT to MToolkit, for instance, add this entry to /etc/profile:export AWT_TOOLKIT="MToolkit"
Then, reload the profile (source <profile>) and restart your IDE.
To find out what can Compiz effects do, please take a look at this Youtube video. I noticed and managed to discover some newly added effects:
- Shadow effects
- Maximize and Minimize effects
- Blinking/fading effects caused by error/alert, e.g. backspace on an empty text box in Pidgin; filling in invalid phrase in Firefox search box;
- Wobbly window effects while it's dragged
- Transparent effects (use ALT + Wheel Scroll on a window)
- ALT + Tab with real-time snapshots
- M$ + E to choose desktops
- M$ + Wheel Scroll to zoom
- M$ + Right Click to zoom in once
Read these to discover more:
- Compiz documentation
- Novel - Xgl on Suse 10.1 (see Xgl Shortcuts section)
- yc, impressed
Saturday, May 12, 2007
Pidgin was Gaim
Something might have slipped through the cracks of my RSS reader (or simply I wasn't free to read them these days), that I didn't realized that Gaim isn't there anymore. I went to http://gaim.sourceforge.net/ yesterday night, something that I do occasionally as I've been following the development of the version 2.x, shocked by its new name and the change of look-and-feel. As you can read from Wikipedia, all the changes were due to the settlement with AOL, which includes: Gaim would become Pidgin, libgaim would become libpurple, and gaim-text would become finch. The name Pidgin was chosen in reference to the term "pidgin", which describes communication between people who do not share a common language. The name "purple" refers to "prpl", the internal libgaim name for an IM protocol. ![]() Gaim 2.0 Beta 6 was the last version to be called Gaim, and Beta 7 was the first version to be called Pidgin. The final version was released on the 3rd of May. Anyway, if you're interested, please follow the links below:
Have fun! ![]() - yc, sleepy |
Subscribe to:
Posts (Atom)

