HELP : Habari blog suddenly inaccessible via HTTP

74 views
Skip to first unread message

Scorpion

unread,
Oct 6, 2011, 6:24:15 AM10/6/11
to habari-users
I've been using Habari for http://www.bluesmaster.nl/ fro almost 3
years now, but - suddenly & inexplicably - I can no longer access my
blog with a browser. For several months I've been running 0.7.1 and my
most recent post was on September 24th (
http://webcache.googleusercontent.com/search?q=cache:dMGoKgAbdDcJ:www.bluesmaster.nl/+bluesmaster.nl&cd=1&hl=en&ct=clnk&client=safari
)

Now all my browser(s) show is an attempt to 'contact bluesmaster.nl'.
The domain is still alive & kicking, as a test page from my hosting
provider shows : http://www.bluesmaster.nl/test/ (please note the file
has the .html extension, changing this to .php fails to load it)

I've filed a support ticket with my hosting provider, but no
explanation for this most annoying problem has been forthcoming since.
FYI, I've not touched any Habari files since the 0.7.1 upgrade several
months ago, only posted. All required files are still present (I can
still reach them via FTP, accessible for my IP address only) and none
show 'suspicious' dates.

AFAICS, all required PHP modules are still present, a text file
listing all PHP 5 modules present on the server of my hosting provider
is available here : http://www.mediafire.com/?w3kbxupq364u43x

Any thoughts ? I'd hate to change hosting providers or to leave
Habari. But since I just like to keep blogging I'm currently
contemplating a static blog generator ( e.g. jekyll, blazeblogger
etc. ) and have my hosting provider serve plain html files.

Colin

unread,
Oct 6, 2011, 7:58:00 AM10/6/11
to habari...@googlegroups.com
Sounds like your hosting provider has changed something.  I'd ask them for details of any changes and maintenance made to your hosting env recently.  They should know what they've changed.

A simple test worth trying is to place the following in a file, eg phpinfo.php...

<?php phpinfo(); ?>

... and see if you can view the contents.

If you can't, then something is seriously wrong with your hosting, specific to PHP, which you hosting provider will need to resolve.

HTH


--
To post to this group, send email to habari...@googlegroups.com
To unsubscribe from this group, send email to habari-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/habari-users



--
Colin Seymour
Blog: http://colinseymour.co.uk
Tech Stuff: http://lildude.co.uk
Barefoot Running: http://barefootrunner.co.uk
IRC: lildude #habari

Scorpion

unread,
Oct 6, 2011, 8:20:15 AM10/6/11
to habari-users
Colin,

Thanks for responding so quickly. Actually it was the first thing I
thought about, so I've asked them exactly that in my support ticket.
No response yet.

Meanwhile I've been able to access the most recent part (last 100
lines) of my error log, which I've made available here as a textfile :
http://www.mediafire.com/?r9iy95jwbr21955 for download.

It frequently mentions this :
-quote-
/home/sites/bluesmaster.nl/public_html/system/classes/
databaseconnection.php on line 271
[Thu Oct 06 12:02:09 2011] [error] [client 67.195.111.58] PHP
Warning: PDOStatement::execute() [<a
href='pdostatement.execute'>pdostatement.execute</a>]:
SQLSTATE[HY000]: General error: 5 database is locked in
-unquote-

Perhaps it helps to pinpoint the problem ? Any help is much
appreciated.

On Oct 6, 1:58 pm, Colin <lild...@gmail.com> wrote:
> Sounds like your hosting provider has changed something.  I'd ask them for
> details of any changes and maintenance made to your hosting env recently.
> They should know what they've changed.
>
> A simple test worth trying is to place the following in a file, eg
> phpinfo.php...
>
> <?php phpinfo(); ?>
>
> ... and see if you can view the contents.
>
> If you can't, then something is seriously wrong with your hosting, specific
> to PHP, which you hosting provider will need to resolve.
>
> HTH
>
>
>
>
>
>
>
>
>
> On Thu, Oct 6, 2011 at 11:24 AM, Scorpion <blu35m45...@gmail.com> wrote:
> > I've been using Habari forhttp://www.bluesmaster.nl/fro almost 3
> > years now, but - suddenly & inexplicably - I can no longer access my
> > blog with a browser. For several months I've been running 0.7.1 and my
> > most recent post was on September 24th (
>
> >http://webcache.googleusercontent.com/search?q=cache:dMGoKgAbdDcJ:www...
> > )
>
> > Now all my browser(s) show is an attempt to 'contact bluesmaster.nl'.
> > The domain is still alive & kicking, as a test page from my hosting
> > provider shows :http://www.bluesmaster.nl/test/(please note the file

Scorpion

unread,
Oct 6, 2011, 8:23:50 AM10/6/11
to habari-users
Forgot to mention in previous post : I've uploaded the <?php
phpinfo(); ?> file via FTP : I can't access it, likely due to the .php
file extension, but I think the module list I've uploaded earlier
( see original post above) should provide all this info.

On Oct 6, 1:58 pm, Colin <lild...@gmail.com> wrote:
> Sounds like your hosting provider has changed something.  I'd ask them for
> details of any changes and maintenance made to your hosting env recently.
> They should know what they've changed.
>
> A simple test worth trying is to place the following in a file, eg
> phpinfo.php...
>
> <?php phpinfo(); ?>
>
> ... and see if you can view the contents.
>
> If you can't, then something is seriously wrong with your hosting, specific
> to PHP, which you hosting provider will need to resolve.
>
> HTH
>
>
>
>
>
>
>
>
>
> On Thu, Oct 6, 2011 at 11:24 AM, Scorpion <blu35m45...@gmail.com> wrote:
> > I've been using Habari forhttp://www.bluesmaster.nl/fro almost 3
> > years now, but - suddenly & inexplicably - I can no longer access my
> > blog with a browser. For several months I've been running 0.7.1 and my
> > most recent post was on September 24th (
>
> >http://webcache.googleusercontent.com/search?q=cache:dMGoKgAbdDcJ:www...
> > )
>
> > Now all my browser(s) show is an attempt to 'contact bluesmaster.nl'.
> > The domain is still alive & kicking, as a test page from my hosting
> > provider shows :http://www.bluesmaster.nl/test/(please note the file

Scorpion

unread,
Oct 6, 2011, 8:35:31 AM10/6/11
to habari-users
Update : I've just viewed my support ticket status and my hosting
provider states that no changes whatsoever to their server software
was made.

On Oct 6, 2:23 pm, Scorpion <blu35m45...@gmail.com> wrote:
> Forgot to mention in previous post : I've uploaded the <?php
> phpinfo(); ?> file via FTP : I can't access it, likely due to the .php
> file extension, but I think the module list I've uploaded earlier
> ( see original post above) should provide all this info.
>
> On Oct 6, 1:58 pm, Colin <lild...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Sounds like your hosting provider has changed something.  I'd ask them for
> > details of any changes and maintenance made to your hosting env recently.
> > They should know what they've changed.
>
> > A simple test worth trying is to place the following in a file, eg
> > phpinfo.php...
>
> > <?php phpinfo(); ?>
>
> > ... and see if you can view the contents.
>
> > If you can't, then something is seriously wrong with your hosting, specific
> > to PHP, which you hosting provider will need to resolve.
>
> > HTH
>
> > On Thu, Oct 6, 2011 at 11:24 AM, Scorpion <blu35m45...@gmail.com> wrote:
> > > I've been using Habari forhttp://www.bluesmaster.nl/froalmost 3
> > > years now, but - suddenly & inexplicably - I can no longer access my
> > > blog with a browser. For several months I've been running 0.7.1 and my
> > > most recent post was on September 24th (
>
> > >http://webcache.googleusercontent.com/search?q=cache:dMGoKgAbdDcJ:www...
> > > )
>
> > > Now all my browser(s) show is an attempt to 'contact bluesmaster.nl'.
> > > The domain is still alive & kicking, as a test page from my hosting
> > > provider shows :http://www.bluesmaster.nl/test/(pleasenote the file

Colin

unread,
Oct 6, 2011, 8:50:46 AM10/6/11
to habari...@googlegroups.com
It concerns me that you "can't view" a file because it has a .php extension.  What exactly happens when you try to view the phpinfo.php I suggested?  Do you just get a blank screen or are you prompted to download the file? (It may download automatically in the background if your browser is configured to do this).

If it does, then this would be a server config error.  Of course your web server config could also be configured as such to not allow the use of this extension whilst still allowing the use of PHP.

As for the...

 [Thu Oct 06 10:19:26 2011] [error] [client 178.21.118.100] PHP Warning:  PDOStatement::execute() [<a href='pdostatement.execute'>pdostatement.execute</a>]: SQLSTATE[HY000]: General error: 5 database is locked in /home/sites/bluesmaster.nl/public_html/system/classes/databaseconnection.php on line 271

... errors.  I'm guessing you may be using Sqlite for the backend DB.  If this is the case, your DB has a lock which needs removing.  At a guess, you may find you already have a process open locking the database in this file, or the last process to access the DB failed to remove the lock when it exited.

You should be able to clear the lock by doing the following:

$ sqlite3 /path/to/habari/user/habari.db
sqlite> .backup main habari.db.bak
sqlite> .exit
$ mv /path/to/habari/user/habari.db /path/to/habari/user/habari.db.old
$ mv /path/to/habari/user/habari.db.bak /path/to/habari/user/habari.db

This should remove the lock on the DB and should resolve the above errors.

HTH

Scorpion

unread,
Oct 6, 2011, 2:27:06 PM10/6/11
to habari-users
Colin,

I created a file test_php with the line you suggested and dropped it
in my public_html folder via FTP. I can't access it, the result is the
same as trying to access my blog's index.php : nothing happens. The
browser is not loading anything (but will load the test page mentioned
in my 1st post above).

I'll get busy with your suggestion for trying to clear the lock on my
SQLite db tomorrow. Please stay tuned ...
> > > > > provider shows :http://www.bluesmaster.nl/test/(pleasenotethe file

Scorpion

unread,
Oct 6, 2011, 2:29:58 PM10/6/11
to habari-users
Forgot to mention : in my public_html folder is an unknown file called
*habari.db-journal*, size 0 bytes, last modified sometime earlier
today ... I'm clueless.

On Oct 6, 2:50 pm, Colin <lild...@gmail.com> wrote:
> > > > > provider shows :http://www.bluesmaster.nl/test/(pleasenotethe file

Colin

unread,
Oct 7, 2011, 1:02:16 AM10/7/11
to habari...@googlegroups.com
The fact you can't even view a simple php file tells me there could be something wrong with your hosting configuration.

You could try make it even simpler and try creating a test file with the contents:

<?php echo "Hello"; ?>

If you don't see the word Hello when you view the page, it means your hosting is not configured correctly for PHP and your provider needs to look into it.  Alternatively, you could have made a mistake and there was an error which should have been written to the error log.

As for the habari.db-journal file: this file is normal, however it should be deleted at the end of every transaction by default.  If it isn't, it means some other application (not Habari) has probably enabled exclusive locking mode on this DB.

This could also explain the lock errors you get in the error log.

You can check if this is the case as follows:

$ sqlite3 /path/to/habari/user/habari.db
sqlite> PRAGMA locking_mode;

If this returns "exclusive" then you can change this to normal using:

sqlite> PRAGMA locking_mode=NORMAL;

This should hopefully remove the exclusive locking on the DB file.

More details on the -journal file and exclusive locking can be found at http://www.sqlite.org/tempfiles.html

HTH
Colin

Scorpion

unread,
Oct 7, 2011, 7:49:45 AM10/7/11
to habari-users
I've uploaded your hello.php to my public_html folder : it will not
load, let alone show the expected result. Exactly the same as with me
trying to access bluesmaster.nl : the browser says it's busy
contacting the domain but nothing eventually happens. Updated my still
open support ticket with this result and asked for an explanation.

Couldn't open my habari.db with terminal on the server (likely a
password should've been included somewhere ?) FYI : I'm not very
comfortable with terminal use (being a Mac OS X aficionado). So I've
downloaded habari.db via FTP and now accessed the file on my desktop
successfully: the answer was 'normal', but I'm afraid that doesn't say
much about the file on the remote server ? BTW, would deleting
habari.db on the server and replacing it with the copy on my desktop
be essentially the same as the result of the terminal session :
-quote-
$ sqlite3 /path/to/habari/user/habari.db
sqlite> .backup main habari.db.bak
sqlite> .exit
$ mv /path/to/habari/user/habari.db /path/to/habari/user/
habari.db.old
$ mv /path/to/habari/user/habari.db.bak /path/to/habari/user/habari.db
-unquote-

On Oct 7, 7:02 am, Colin <lild...@gmail.com> wrote:
> The fact you can't even view a simple php file tells me there could be
> something wrong with your hosting configuration.
>
> You could try make it even simpler and try creating a test file with the
> contents:
>
> <?php echo "Hello"; ?>
>
> If you don't see the word Hello when you view the page, it means your
> hosting is not configured correctly for PHP and your provider needs to look
> into it.  Alternatively, you could have made a mistake and there was an
> error which should have been written to the error log.
>
> As for the habari.db-journal file: this file is normal, however it should be
> deleted at the end of every transaction by default.  If it isn't, it means
> some other application (not Habari) has probably enabled exclusive locking
> mode on this DB.
>
> This could also explain the lock errors you get in the error log.
>
> You can check if this is the case as follows:
>
> $ sqlite3 /path/to/habari/user/habari.db
> sqlite> PRAGMA locking_mode;
>
> If this returns "exclusive" then you can change this to normal using:
>
> sqlite> PRAGMA locking_mode=NORMAL;
>
> This should hopefully remove the exclusive locking on the DB file.
>
> More details on the -journal file and exclusive locking can be found athttp://www.sqlite.org/tempfiles.html

Scorpion

unread,
Oct 7, 2011, 8:02:04 AM10/7/11
to habari-users
Update : please disregard the first paragraph of my reply above. Using
http://www.bluesmaster.nl/hello.php *does* show the expected result. I
now realise I forgot to include the .php extension and now the
info.php works as expected : http://bluesmaster.nl/info.php

I deeply apologise for having made such a mess of my reporting this
issue : it shows my stupidity to the fullest.

Back to you, I hope ...

Colin

unread,
Oct 7, 2011, 8:11:33 AM10/7/11
to habari...@googlegroups.com
No probs.  Good to hear PHP is actually working so we can concentrate on Habari now.

Yup, removing the habari.db and habari.db-journal files and uploading the local copy of habari.db that you have should get rid of the lock too.  Don't worry about creating the habari.db-journal file.

This is very similar to the first procedure I gave to clear the lock.

Scorpion

unread,
Oct 7, 2011, 1:38:18 PM10/7/11
to habari-users
Hurray !! Bluesmaster.nl is back !! HAPPY !!

Deleting the habari.db on the server & subsequently uploading the
untouched backup from my desktop, as you've suggested above, did the
trick !

PS : I'm still 'suffering' more often than not from this issue :
http://groups.google.com/group/habari-users/browse_thread/thread/4306fe5132b2bb0f#
, which also occassionaly hampers commands issued when working in the
backend. Not sure if it has anything to do with my most recent woes,
but it's especially disconcerting now ...

Colin,

Thank you so much for jumping on this from the start and, more
importantly, for staying with me over the course. You've noticed I
need a lot of handholding, not being proficient with terminal commands
and such, but you didn't flinch ;-)

I commend you for your patience and determination to help me fix
this : you've helped me enormously (not for the first time I might
add) and I'm delighted to have bluesmaster.nl back again.
Suffice to say I'll be a Habari aficionado for the foreseeable
future ;-)

Finally : I hope the Habari devs will come to grips with the cause of
this issue if it turns out to be a serious one. I'll stay tuned ...

On Oct 7, 2:11 pm, Colin <lild...@gmail.com> wrote:
> No probs.  Good to hear PHP is actually working so we can concentrate on
> Habari now.
>
> Yup, removing the habari.db and habari.db-journal files and uploading the
> local copy of habari.db that you have should get rid of the lock too.  Don't
> worry about creating the habari.db-journal file.
>
> This is very similar to the first procedure I gave to clear the lock.
>
>
>
>
>
>
>
> On Fri, Oct 7, 2011 at 1:02 PM, Scorpion <blu35m45...@gmail.com> wrote:
> > Update : please disregard the first paragraph of my reply above. Using
> >http://www.bluesmaster.nl/hello.php*does* show the expected result. I
> > > > > > bluesmaster.nl/public_html/system/classes/databaseconnection.phpon line
> ...
>
> read more »

Colin

unread,
Oct 8, 2011, 6:15:55 AM10/8/11
to habari...@googlegroups.com
You're welcome and good to hear it's back up and running.

Regarding your other issue... I wonder if this is possibly a caching (possibly DNS or server side PHP) related issue. It could of course be something else like the server terminating the transaction early, but it's all speculation at the moment.

I've just visited bluesmaster.nl for the first time and indeed saw the issue.  Rather than refreshing that window, I opened up a completely different browser and loaded your site again and didn't see the issue.  This is what makes me think it could be a caching issue of sorts.

So I then fired up my laptop running Ubuntu and I didn't see the issue there.

Unfortunately, this makes it incredibly hard to troubleshoot and diagnose.

I'll try remember to keep checking every once in a while to see if I can capture a network trace of this phenomenon to see if that reveals anything.
Reply all
Reply to author
Forward
0 new messages