Error generating image, no error log I am new to Drupal, I am trying to move an existing site from serverA to serverB. 

When I visit

http://serverB/sites/default/files/styles/thumbnail/public/publications/43026/cover.jpg


I get Error generating image.

I am using Drupal 7.22, on an ubuntu server, PHP Version 5.4.9, have php5-gd and mod_rewrite installed and activated. Error log of apache server is empty. I also have the following directories created.

mkdir -p /var/www/sites/all/files/styles/thumbnail
mkdir -p /var/www/sites/default/files/styles/thumbnail
chmod 777 /var/www/sites/all/files/styles -R
chmod 777 /var/www/sites/default/files/styles -R


How can I fix/find the source of this problem. Where should I look for some useful error logs.
Problem is - you are trying to generate styled image, but you do not provide security token. In Drupal 7.20 and later security token is required so images are only generated when Drupal site itself tries to use them. To turn it off, just add the following line to your settings.php file:

$conf['image_allow_insecure_derivatives'] = TRUE;


Solution taken from this answer and 7.20 release notes.