Ubic
view release on metacpan or search on metacpan
lib/Ubic/Manual/FAQ.pod view on Meta::CPAN
package Ubic::Manual::FAQ;
# ABSTRACT: frequently asked questions about Ubic
__END__
=pod
=encoding UTF-8
=head1 NAME
Ubic::Manual::FAQ - frequently asked questions about Ubic
=head1 VERSION
version 1.60
=head1 QUESTIONS
=head2 I changed my service's user, and now it fails with "Permission denied" error. Please help!
You have to chown your service files manually. Try this:
find /var/lib/ubic -name '*MY_SERVICE_NAME*' | xargs chown -R MY_NEW_USER
In the future, this one-liner will be reimplemented as "ubic fix-permissions" command. Sorry for the inconvenience.
=head2 Can I use ubic with perlbrew? How?
Yes you can, but you have to be careful.
Perlbrew depends on environment variables, so you have to make sure that they are configured correctly in all cases when you call ubic. This especially includes the crontab entry which ubic installs for you. You'll probably have to edit it manually, ...
* * * * * . /home/your_login/perl5/perlbrew/etc/bashrc && ubic-watchdog ubic.watchdog >>/dev/null 2>>/dev/null
=head2 How is ubic compatible with SysV-style /etc/rcX.d/ symlinks?
There are two ways of managing ubic service statuses across reboots.
=over
=item Don't use rc.d
Trust the ubic to manage service statuses for you. If you start a service and then reboot, B<ubic.watchdog> will bring it back to life automatically.
This is the recommended mode of using ubic. (In other words, this is how author uses it.)
Downside: nobody will do C<ubic stop> on your services before reboot. C<shutdown(8)> will send the SIGTERM, though, usually that's all you need.
=item Use rc.d
Turn any ubic service into the init script using L<Ubic::Run>. Register it with rc.d using C<chkconfig> or C<update-rc.d> or however your OS wants you to do it.
Downsides:
1) more manual work;
2) no persistent statuses: if you stop a service, forget to unregister it from rc.d, and then reboot, it will start again.
Upside: runlevels.
=back
=head2 Why do I get confusing error messages when I try to add the service with a dot in its name?
Dot is a reserved symbol, it separates service name parts in service tree (like C</> separates directories in unix filesystems). So, if you really want the service C<foo.bar>, put its description in C</etc/ubic/service/foo/bar>.
Dot in config file names is used to distinguish different configuration styles. Extension-less configs are pure-perl, I<*.ini> is ini configs, etc.
=head2 Why ubic creates a new daemon every minute in an endless loop if my binary daemonizes itself?
Ubic can't distinguish self-daemonizing binary from program which instantly exits, so C<ubic.watchdog> thinks that the service has failed and tries to respawn it every minute.
You can either fix the daemon (hint: many daemons have some kind of C<--foreground> option), or implement your own service class.
See L<Ubic::Service>, L<Ubic::Service::Skeleton>, L<Ubic::Service::Common> and L<Ubic::Manual::Overview/"Common service classes"> for more details on writing custom service classes.
=head2 Why did ubic edit my crontab?
Ubic uses cron as the way to bootstrap all its services. This crontab entry will bring the C<ubic.watchdog> up if it ever goes down, and it will then start all other services as necessary.
Even though watchdog itself is very robust, this mechanism is also useful on host reboots.
If you B<really> don't like it, you can pass C<--no-crontab> option to C<ubic-admin setup> command while configuring ubic instance (or just answer C<no> to the appropriate question).
=head2 What is this ubic-guardian process I see in my "ps aux" output?
( run in 0.348 second using v1.01-cache-2.11-cpan-5511b514fd6 )