Archive for the ‘Error Message’ Category

ec2-consistent-snapshot fails during cron

I was getting the following errors when running ec2-consistent-snapshot to create automatic nightly backups of an EBS volume. You can find Eric Hammond’s ec2-consistent-snapshot script here.

Backing up volume vol-06ca566f
Can't exec "xfs_freeze": No such file or directory at /usr/bin/ec2-consistent-snapshot
line 470.
ec2-consistent-snapshot: ERROR: xfs_freeze -f /vol: failed(-1)
snap-3a387653
Can't exec "xfs_freeze": No such file or directory at /usr/bin/ec2-consistent-snapshot
line 470.
ec2-consistent-snapshot: ERROR: xfs_freeze -u /vol: failed(-1)
PHP Notice:  Undefined index: v in /opt/scripts/backup/remove_old_snapshots.php on
line 28
PHP Notice:  Undefined index: v in /opt/scripts/backup/remove_old_snapshots.php on
line 31
PHP Notice:  Undefined index: n in /opt/scripts/backup/remove_old_snapshots.php on
line 34
ERROR: Please provide number of snapshots to keep (-n option)
Completed

This batch job ran fine manually, but fails when executed via cron. The problem is that cron has a different path than a shell environment.

You can fix the issue by adding the following line to the beginning of the cron. This adds the path to the cron so that it can execute files in various directories.

$ sudo crontab -e

add this line

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Problem creating an AMI from a running instance with ec2-bundle-vol

I’m writing this blog post in the hopes that some wise soul out there happens to read this post and responds with the answer. I am truly stumped.

I’m running an instance store instance at Amazon. I would like to bundle a custom AMI in case something happens to the instance as it did to our instance a few days ago.

Our instance is built from a high availability, high performance AMI built by Pantheon. After we spin up the instance, we still have a bit of customizations. Namely setting up the mail/mailboxes, setting the hostname, installing Webmin, etc. etc.

We wanted to bundle our customizations into a new AMI in case something happened to the instance again and we could simply spin up a new instance from the AMI, change the public DNS and MX record, and re-attach the EBS volume where our /var/www and MySQL data is located.

After searching various and sundry locations on the web on how to re-bundle an AMI from a running instance, I came up with the following commands.

I’m using this command where 123456789123 is not my actual Amazon user ID, and I’ve copied my Amazon private key and certificate to the /mnt/ids directory.

$ sudo ec2-bundle-vol -d /mnt/amis -k /mnt/ids/pk-*.pem -c /mnt/ids/cert-*.pem -u 123456789123 -r i386

I get the following:

Copying / into the image file /mnt/amis/image...
Excluding:
/sys/kernel/debug
/sys/kernel/security
/sys
/var/log/mysql
/var/lib/mysql
/mnt/mysql
/proc
/dev/pts
/dev
/dev
/media
/mnt
/proc
/sys
/etc/udev/rules.d/70-persistent-net.rules
/etc/udev/rules.d/z25_persistent-net.rules
/mnt/amis/image
/mnt/img-mnt
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00273375 s, 384 MB/s
mkfs.ext3: option requires an argument -- 'L'
Usage: mkfs.ext3 [-c|-l filename] [-b block-size] [-f fragment-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G meta group size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
ERROR: execution failed: "mkfs.ext3 -F /mnt/amis/image -U 2c567c84-20a1-44b9-a353-dbdcc7ae863b -L "

Here are the results of df -h, so I know I’ve got plenty of room on /mnt:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.9G  2.1G  7.4G  22% /
devtmpfs              834M  124K  834M   1% /dev
none                  851M     0  851M   0% /dev/shm
none                  851M   96K  851M   1% /var/run
none                  851M     0  851M   0% /var/lock
none                  851M     0  851M   0% /lib/init/rw
/dev/sda2             147G  352M  139G   1% /mnt
/dev/sdf             1014M  237M  778M  24% /vol

Does anybody have any clue what the mkfs.ext3 errors are all about? I’ve posted this over at the Amazon EC2 discussion forum and the Pantheon Drupal group with no response and I have scoured google and I can’t find anything like this.

Solution: Unable to load frame’s content: Error rebuilding the view. Invalid data.

Have you ever seen this message when opening a mail database? From time to time we see this after an upgrade. Normal Fixup, Compact, Updall, and even template replace will not fix the issue.

However, Compact -D will do the trick.
The -D switch discards any built view indexes

You can try this for B-tree structure is invalid! errors as well.

For good measure you can run Updall -R afterwards to rebuild all the view indexes.

Monitor Error in Database e:\lotus\notes\data\filename.nsf: Entry not found in index

Have you ever seen this error message in your console or statrep.nsf?

I see hundreds in my statrep.nsf all the time.

The cause is that the user with mailbox called filename.nsf has mail rules set to file messages to a folder that doesn’t exist anymore.

Invalid collection data was detected

I’ve just upgraded some of our Domino severs from 6.5.6 FP3 HF63 to 7.0.3 FP1 HF517. I put alot of testing into it so it has been relatively smooth.

I did find that I had some template replication issues, so I went around, deleted every template in our environment except on one isolated 7.0.3 server. I then signed all the templates on that server and used the admin client to create replicas on our hub servers which had also been upgraded to 7.

I had real problems with the following templates: activity.ntf, admin4.ntf, certlog.ntf, dba4.ntf, and webadmin.ntf.

admin4.ntf, certlog.ntf, and dba4.ntf had a bad ACL set, so I couldn’t sign any of them, and the LocalDomainServers group couldn’t replicate. I fixed that and signed the templates and replicated them.

One of them was set to temporarily disable replication, and I fixed that.

All that was left was activity.ntf and webamin.ntf. For some reason, activity.ntf wouldn’t initialize. I had to try several times before I got it working through adminp.

I could never get webadmin.ntf to replicate because the error message that shows up when the temporarily disable replication tickbox is checked kept appearing, but the template did not in fact have that checked.

I starting looking through DDM today, and found that one template and one database generate errors when design runs.

Design error for database ‘help\readme.nsf’: Invalid collection data was detected.
Design error for database ‘dominoblog.ntf’: Invalid collection data was detected.

I looked in R7 admin help, Notes 6 and 7 discussion forums, and google, and “Invalid collection data was detected” appears nowhere.

These are all small things, but wouldn’t expect finicky templates from 7.0.3.

Consulting

I'm currently available
for Lotus Notes / Domino consulting engagements.

LinkedIn

Connect with me:

LinkedIn

Advertisement
Advertisement
Categories