Personal tools
About this blog
This is where I maintain running notes of my thoughts

Syndicate my Blog

 Subscribe in a reader


Number of visitors since 27 March 2006
Site Meter
Add to Technorati Favorites

 
Document Actions

Open Source

Up one level
Posts related to Open Source Software

Document Actions

Hosting photos on your Plone site

by Mukul Dharwadkar posted at 2006-04-12 10:19 last modified 2006-04-12 10:19

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

In my attempt to host pictures on my websites, I tried out multiple things. From evaluating different products (CMFPhotoAlbum, CMFPhoto, ATPhoto) to installing add-on components to modifying source code. I learnt a lot of things during those two days (nights)  when I was trying to get it working. I initially thought about just posting a note here, but then I thought I won't do justice to the entire content and let my thoughts trail off here. So now I have decided to write up an article on my experiences and learning so that someone else can benefit from it and not waste so much time in doing the same thing.

In a nutshell, the lessons I learnt are:

  1. Plone can handle photos natively since v 2.1. Just change the view from standard to thumbnail.
  2. You need PIL / JPEG support installed on your linux computer / python compilation for it work
  3. There is bug in the ArcheTypes product in the way plone renders the image using the image_view or atct_album_image viewing method. More on that later.
  4. If you are stuck anywhere, ask the experts. Open source community is so much helpful and forthcoming, it would be a waste not to ask for help.
The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/plonephoto/tbping

Firefox hogs memory

by Mukul Dharwadkar posted at 2006-07-05 16:08 last modified 2006-07-05 16:08

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

Firefox was known to use up more memory than IE, especially if you opened a lot of tabs Memory hog Firefoxat the same time. But suddenly it now acting as a memory hog (at least on my computer) with the memory utilization going as high as 260MB with just 4 tabs open and funny thing is it does not go down if I close all but one tab. It acts like a runaway process and keeps on eating up memory and CPU till the time it becomes unusable. I then have to close the window and open a new session for my PC to be usable again.

Is this a vulnerability in Firefox that could be exploited I know not. I am not an expert in reading code and finding out bugs, but I know enough to identify a problem when I see one. I intend to submit this to the maintainers of Firefox after I do a little bit more research to ascertain that it is not a problem with my computer.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/firefox/tbping

Re:Firefox hogs memory

Posted by Anonymous User at 2007-08-30 01:20
It is now happening to me as well. The slowdown is severe when you are using old systems with only 128MB of RAM and slow hard drives. Since Windows shifts memory to the pagefile in the harddrive, moving from one open program to another drags by the minute as the system moves data from ram to hard drive.

Re:Firefox hogs memory

Posted by sbec at 2007-10-19 00:28
that's so true. no offense but i like IE 7 now than firefox for ordinary browsing. i still use firefox to check if my devt site appears correctly & for credit card processing. but my fave is opera. minimize opera and you will notice that the memory usage goes down. both opera and firefox have good plug-ins.

Fight back against SPAMBots

by Mukul Dharwadkar posted at 2006-09-29 03:14 last modified 2006-09-29 03:14

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

In the end, I think it was just too easy. I searched over the internet on ways to prevent comment spam. Some of the ways I came across were:

  1. Change the label of the link from "Comments" to something else. From what I understand, spambots look for specific words and go in and dump spam. The changed label should be inituitive enough to let human readers understand that it is the link to leave comments but hard enough for the bot not to understand.
  2. Employ Turing test to defeat the bots. Turing test is used on many websites nowadays to distinguish man from machine. But the latest advances in technology can also defeat this approach with OCR technology embedded in it. So can a person determined enough to hire cheap labour to dump spam.
  3. Do not allow unmoderated comments. Moderate the comments so that the comments do not appear on the website / weblog without your approval. I found a link to this article when I searched for ways to moderate comments. The technique described in the article applies to CoreBlog running on Plone or Zope, but can be extended to almost any software. In fact most of the weblogging sites give options to moderate comments.

In the end, I chose the third option. For the first two, I would have needed to hack and program and spend a lot of time and effort, which I don't have to spare. The third one was quite easy and I could do it within 15-20 minutes while reading the article itself. To moderate the comments in Coreblog2 running on Plone and / or Zope the workflow needs to be modified. Coreblog2 inherits the default workflow from Plone / Zope which allows unmoderated comments to be displayed on the website.

The details of the steps are given in the article so I won't repeat the same here.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/spambots2/tbping

Broken Website

by Mukul Dharwadkar posted at 2006-10-20 15:50 last modified 2006-10-20 15:50

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

Don't you just hate it when you break something when trying to carry out some maintenance or clean-up. Two days back I shot myself in the foot and didn't even realise it till today when I came to post on my weblog after six days.

As I have mentioned earlier, I was under attack by Spambots who posting comments with links to porn sites on my weblog. I thought I had taken care of that. But some smart guy outfoxed me by putting a trackback to my website. When I went to delete it, I inadvertently deleted the entire comments folder (place holder) in my weblog (CoreBlog2.0.8b running on Plone 2.5.1). When I posted a new blog entry earlier today, I found out that I could save the entry but it would give me an error that related comments. The error looked like:

Exception Type
KeyError
Exception Value
'comments'

I am not a programming guy and I tried very hard to read the code all over the place to understand and find out if I had deleted some key file. I even compared it with my other website and did not find anything wrong there. I spent almost 3 hours trying to find out what was wrong. I even though about raising a ticket with the CoreBlog team and re-installing the CoreBlog software. But that would have been done later today when I reached home. Till that time, my website would be partially inaccessible and I didn't like the sound of it.

So when I again compared my working website and this one, I focused my attention to the weblog object inside the Plone website. I noticed that the comments object is missing from there. I knew that it was a folder, but whenever I tried to add from the ZMI, all I could do was add a weblog entry with the name comments. Although that was fixing the website, it was not the optimum solution that I was looking for. Next thing I did was to check the Portal Types section and saw that the only allowed object type under Coreblog was a new CoreBlog Entry. I added CoreBlogCommentFolder as an allowed type and then came back to the weblog on Plone (it does not work through ZMI though) and added a CoreBlogCommentFolder.

This has fixed my problem and brought my website back up till the time I break it again.

Category(s)
Open Source
The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/repair_break/tbping

Posted by at 2006-11-07 12:19
very nice site!

Posted by at 2006-11-07 12:21
adding to my bookmarks...

Posted by at 2006-11-07 12:22
nice choice of colors.

Posted by at 2006-11-07 12:48
cool design. i like it!

Install Linux or troubleshoot wireless

by Mukul Dharwadkar posted at 2006-10-30 17:55 last modified 2006-10-30 17:55

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

How easy it is to lose focus of the end objective once you hit a problem? Very very easy if you ask me. As I had posting in my articles over in the Linux category on my attempts to get wireless working on first Ubuntu Desktop and then Fedora Core, I suddenly realised the getting the wireless to work is not what I want. I wanted to test Ubuntu and check it's feasibility in running webserver and support for my current website.

Once I realised that, I stopped my efforts to make wireless work and concentrated on the task at hand. That is to get Ubuntu to run Zope and Plone on my hardware (Dell Latitude D400). Well, Ubuntu desktop was no problem, The installation and setup ran like a charm and the OS was up and running in no time. But I faced major hurdles in getting the Ubuntu Server running. As I have mentioned earlier, the server won't boot up on my laptop and when I tried it using VMWare, it booted up, but the X server was not starting at all. I checked everything I knew and finally gave up.

The Fedora Project has released it's latest offering Fedora Core 6 (FC6) on 24th October. I downloaded it and instead of upgrading my FC4 to FC5, I decided it would be worth my while to upgrade it directly to FC6. Well the installation was easy if lengthy, but a different set of challenges awaited me.

More on that later.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/linux_wlan/tbping

Re:Install Linux or troubleshoot wireless

Posted by Anonymous User at 2006-10-31 09:25
"As I have mentioned earlier, the server won't boot up on my laptop and when I tried it using VMWare, it booted up, but the X server was not starting at all."

Ubuntu server does not install X by default..

Kernel issues with FC6

by Mukul Dharwadkar posted at 2006-10-30 18:54 last modified 2006-10-30 18:54

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

The Fedora project released their newest offering of the linux operating system last week. Roughly 7 months after their last release of Fedora Core 5 which is phenomenal as compared to "You Know Who". The cumulative upgrade is also good apart from the eye-candy changes with respect to the content  and applications included in the OS package. The newer kernel is XEN enabled by default. I understand that XEN was included in Fedora from its Core 3 release, but I never really paid attention to it.

This time it caught my attention during installation with the application support & inclusion to XEN virtualisation. It caught more than my eye when the computer refused to boot up. FC6 uses a PAE (Physical Address Extension) enabled kernel (version 2.6.18-1.2798) and somehow it fails to identify the limitation of the CPU that it is being installed on if the CPU does not have PAE. On booting, the kernel went in to panic with the following message

KERNEL PANIC: Cannot execute a PAE-enabled kernel on a PAE-less CPU!

I tried really hard to recover from this. Even reinstallting the OS and going into GRuB command line to try and load another kernel. But it failed. I could install FC5 and then upgrade to FC6 from there without any issues. The FC5 and earlier versions do not enable PAE. I am yet to check out how FC5 would behave if I put in the same PAE enabled kernel on it. Probably it would faile too.

Anyway, I did not like the idea of giving up on solving this and upgrading from FC5 to FC6. Because, if this is a kernel issue, then I would definitely face this issue sooner of later when I upgraded my kernel so I got books from the library and search on the internet for whatever I could for the kernel and the bug (?) that was troubling me. On searching exhaustively with no results, I finally found something which I felt would work. I knew that I had to set a kernel option. But which one and what?

I found one list on XEN which talked about the same issue that I was facing and it noted that a workaround to the problem I was facing was to use

swiotlb=force

as a kernel parameter when booting. Although it talks about DomU, I was ready to try it on my computer. So I started the installation in rescue mode and at the kernel prompt, I gave this as a kernel parameter and the kernel did not panic. The FC6 went through first boot steps and got me to configure everything and then promptly hung.

It took a reboot to get the computer back on track and start working smoothly. After that it has been working quite nicely and I have done some testing on it that I will post here.

I will also post a detailed installation write-up here in the Technology section.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/fc6_kernel/tbping

Re:Kernel issues with FC6

Posted by Anonymous User at 2006-11-01 18:43
What does your grub.conf look like because I cant get mine working. Don't know how I should use the swiotlb parameter?

Re:Kernel issues with FC6

Posted by mukul at 2006-11-01 21:08
Here's how my grub.conf looks like:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 swiotlb=force
initrd /initrd-2.6.18-1.2798.fc6.img

I started the installation in upgrade mode and just gave this parameter at the time of kernel configuration, but I guess you can get achieve this by:
1. Pressing ESC while booting before the timeout
2. Starting the installation in rescue mode and mounting the fs from there.

Re:Kernel issues with FC6

Posted by Jim Wright at 2006-11-03 09:23
Well done for putting you thoughts online! I have the same problem.

I am not sure why you cannot select your boot option in grub (after installing - on booting new system) and edit it using e, append swiotlb=force to the line that mentions vmlinuz and then boot. But apparently you cannot because I just tried it ;-)

Is this where XEN comes in? I still have the default grub config:

kernel /xen. ...
module /vmlinuz ...

and it looks like you abandaned that in favour of:

kernel /vmlinux ...

I will post this and reboot to try it...

Re:Kernel issues with FC6

Posted by Mukul Dharwadkar at 2006-11-03 15:05
Thanks Jim for your feedback.

Well I tried to set the kernel options at the boot menu, but I couldn't because I didn't know how and what. I know now.

I noticed that the installation process did not install XEN enabled kernel when I tried to fiddle with the XEN virtualisation environment. The next TO-DO thing on my list is to use the XEN-enabled kernel and see what happens.

Re:Kernel issues with FC6

Posted by Jon Longoria at 2007-01-02 03:18
I've encountered this same issue when attempting to enable virtualization on a cold install of Fedora Core 6 on a Dell Latitude D600 notebook. Of course, the swiotlb=force option couldn't be set from the grub boot loader interface, at least not that I found, which was moderately troubling. Rather than slip into /boot and edit grub.conf, I've continued on with another fresh install while, of course, bypassing the virtualization. Later, I will determine if I can force on a fresh system through the entry you located - cross your fingers, haha.

Your entry here cleared up the issue though. I was nearly steered away from further experimentation with this kernel/distribution - evaluating for a non-profit organization to determine whether it will meet the needs of their constituents. Although I am an avid FreeBSD user, I recognize the need for a lighter, mobile computing OS for this group. I've poured through several distributions using a list of criteria with emphasis on usability for fairly *nix illiterate end-users. Fedora really seems to bring the goods to the table and the setup is one of the best I've seen to date.

Thanks for the post!

Running Zope on Fedora Core 6

by Mukul Dharwadkar posted at 2006-11-07 17:40 last modified 2006-11-07 17:40

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

My website runs on Zope + Plone / Apache / Fedora core 4. I am in the process ofZope first screen upgrading the OS to FC6 from FC4. As I have mentioned in my article in the Linux / Technology section, FC6 comes with Zope and Plone included. Till FC5 you had to download Zope and Plone and install and configure it. I had incorrectly mentioned in my earlier article that Zope takes the native root user and password for management. It is not so. You have to create a user account even before you start Zope for the first time. Zope starts without any problems if you try to start it before creating an account. However when you open the browser and go to the Zope page (http://localhost:8080) Zope tells you that you have not created any users and you must create one in order to manage the site. To create an account to manage zope run the following commands from the command shell from root login or su.

#cd /var/lib/zope/bin
#./zopectl adduser <username> <password>

Once the user account is created, you can start the zope instance from the same place with the following command.

#./zopectl start

In the previous versions and combinations, I had tried to make the Zope as a servicezope as a service and start at the time Linux started. Since I am not a Linux expert, I could not do it at that time easily without writing a script. This time Zope is tightly integrated with the OS and it is included in the Service Manager (System --> Administration --> Server Settings --> Services) as a service. You can either start zope from there. You can also check the box next to zope so that it starts up every time I reboot my box.

Once you create the user and can get to the management screen, you can add a Plone site and you are on your way to create a great website.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/zope_fc6/tbping

How to use re-write module of Apache web server 2.2.3 on FC6

by Mukul Dharwadkar posted at 2006-11-15 18:53 last modified 2006-11-15 18:53

MeetMeNow 14-day free trial; easy web meetings VistaPrint.com

Digg!

I finished upgrading my web server to better hardware and latest OS and web server just yesterday. Installation of FC6 was seamless once I found out that I could not run XEN on my computer because of CPU limitations. My CPU does not have PAE on which XEN requires to operate. So finally I figured out that not installing virt-manager solves my problem by installing a non-XEN kernel (Duh!!). So once that problem was out of the way, I moved on to the next task of migrating my web server to the new box.

Migrating a Plone website from one box to another is very well documented. However, there are some things to watch out for which I will post here shortly. After a lot of research and trouble-shooting, I finally managed to get the Zope and Plone working on my box. Since Apache is much more secure, robust and modular in management, I use Apache server as a front-end to my website and use URL re-writing to have Apache forward those to Zope.

Last week I moved my website to the new box and copied the re-write configuration from the old httpd.conf file to the new one and switched off the old one. I did not test Apache functionality trusting that it would work in the new setup, if it worked in the old setup. On trying to access the URL, the browser refused to serve the page instantly throwing up a Error 503 on the screen. At first I thought, it was the new Apache server which did not understand the re-write commands from older (2.0.54) version and tried to find out what had changed. I checked forums, website and even Apache release and change notes, but could not find anything that could possibly solve my problem. I worked for around 4 hours on a wild goose chase and then gave up. As the site traffic had also returned to normal, the urgency to upgrade was also not there till yesterday when my son kept on switching off the box as it was accessible to him.

So I started my work again yesterday; this time on a fresh FC6 installation inside a VMWare and worked through the Virtual Hosting Monster and re-write tutorial from the Zope book just to make sure, I was doing everything correctly. The VHM was working correctly, but as soon as switched on Apache URL re-write I started getting the same errors. So it was not my configuration file or version issue with Apache. I again searched for the same and this time I was a bit more successful. One of the forums posts mentioned something about the permissions being correct and it lit a light in my head and I knew the problem was not with Apache but with permissions issue. I checked my error log (which I admit I should have done earlier, but since I am not really "expert" in Linux, I didn't do it. Partly because I never thought of it and mostly because I didn't know the location. Anyway.) and found the following entries in the error_log.

[Tue Nov 14 16:03:53 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:04:20 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:22:17 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:26:44 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:26:47 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:28:08 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:28:12 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:45:43 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:47:14 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:47:17 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed

I checked the permissions on all the folder and didn't find anything that would SE Linux Configurationhave caused any problems. Suddenly a thought came to my mind to check the security level issue as I had faced issues with security level (firewall) in the past. The only difference this time being, I disable Linux firewall as I have hardware firewall. So I opened up the Security Configuration screen and started reviewing the SELinux policy settings. As I have already mentioned I am not an expert in Linux, I started experimenting with the SELinux policy for HTTPD Service by enabling one setting at a time and checked if Apache URL re-writing worked or not. The second option I chose to "Allow HTTPD scripts and modules to connect to the network" did the trick and the re-writing started flowing correctly.

I made the similar change in my production web server and happily it started working and I was able to move the website to the new server and switch off the old one. Because I am not an expert in Linux and these things are not documented anywhere, I thought I would add my two cents to the documentation and make Linux a better OS and usable to non-techie guys like me. Now that SELinux is an integral part of Linux (at the Fedora and Ubuntu flavours) I am sure many more people will face this same issue. I hope this will help them to save time and effort that I had to spend to get this issue resolved. If there is a better way of doing this out there, please direct me to it so that I can update my piece and knowledge.

The URL to Trackback this entry is:
http://www.dharwadkar.com/weblog/apache_fc6_01/tbping

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Jim, Washington, DC at 2006-02-27 00:10
Awesome find! I have been struggling with this for several days. Very nice detailed post that clearly pointed out the problem and why.

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by mukul at 2006-12-10 16:07
I am glad I could be of help to you Jim. Let me know if you need any further help.

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Anonymous User at 2007-02-08 18:47
You ARE THE MAN. Thank you, Thank you, Thank you. I was beating my head against the wall until i found your post. Lost 3-4 hours.

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Jono McKay at 2007-04-23 14:19
Very well done! If only the internet linux Community had more more people like you. Thanks.

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Aditya/Nitin at 2007-05-08 00:43
Thanks a lot for help!!

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Anonymous User at 2007-07-17 16:13
Mukul, you may not be a linux guru but you really helped me out! Thanks!

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Andrew at 2007-08-01 00:53
Can only add to the praise - nice post. Helped me out lots.

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Anonymous User at 2007-08-29 02:58
Thank you! I was trying to figure out for days what the problem was. You da man!

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by DimaS at 2007-11-07 18:07
It's greate. Exactly what I need. Thank you

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Wil at 2008-02-06 11:36
What is the command line to set this Selinux conf without graphical interface?

Re:How to use re-write module of Apache web server 2.2.3 on FC6

Posted by Chris Shenton at 2008-02-07 14:28
My server's in across town and I don't have no stinkin' GUI. Besides, I'm a real man, I use a CLI. Too bad it took this FreeBSD bigot so long to figure it out:

# /usr/sbin/setsebool httpd_can_network_connect 1
Listed on BlogShares
Recent entries
My experience with virtualization Mukul Dharwadkar 2008-06-30
Happy Father's day Mukul Dharwadkar 2008-06-16
Use the plain old notepad as your personal diary Mukul Dharwadkar 2008-05-07
Taxing time to file tax returns Mukul Dharwadkar 2008-02-29
Fedora 8 - Still not there yet Mukul Dharwadkar 2008-02-28
Recent comments
Re:Configuring Gmail POP on Lotus Notes Anonymous User 2008-08-22
Re:How to repair a broken Ubuntu Desktop installation Anonymous User 2008-08-20
Re:Configuring Gmail POP on Lotus Notes Beery 2008-07-24
Re:How to install IDLE on Fedora 7 Anonymous User 2008-07-17
Re:Google Docs does not measure up.... yet Mukul Dharwadkar 2008-07-09
Recent trackbacks
2006-11-07
2006-11-07
2006-11-07
2006-11-07
2006-11-07
« August 2008 »
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
 

This site is:

Powered by Plone, the Open Source Content Management System