On Tue, Mar 08, 2022 at 18:27:47 -0500, Robert Heller wrote:
> For some unfathomably reason amtape "hangs" when forked from a Java program.
>
> I've written a Java program that goes through vaulted tapes and forks amtape
> (using Runtime.getRuntime().exec(()), and when a non-existant tape label
da.org us...@amanda.org> On Behalf Of Exuvo
> Sent: Thursday, March 10, 2022 8:22 PM
> To: Robert Heller
> Cc: Nathan Stratton Treadway ; ? amanda users
>
> Subject: Re: Problem with amtape "hanging" when forked from Java
>
> Also don't use stream.readAllB
Also don't use stream.readAllBytes, it will block until the stream end is
reached ie the process exits and closes the stream. Which completely defeats
the purpose of the waitFor.
I suggest using something like:
Process p = Runtime.getRuntime().exec(cmd);
long start =
An educated guess from me would be that the particular error message you are waiting for
is not actually written to stderror but normal output stream which you never read.
Specifically this part of java.lang.Process documentation "Because some native
platforms only provide limited buffer size
On Thu, Mar 10, 2022 at 17:08:36 -0500, Robert Heller wrote:
> (I have no interactivity configuration in any of my
> configurations files, so it is presumably defaulting to being empty.)
(See below...)
> Here is the diff:
>
> *** amtape-java.debug 2022-03-10 16:14:52.556321620 -0500
> ---
At Thu, 10 Mar 2022 15:07:14 -0500 Nathan Stratton Treadway
wrote:
>
> On Thu, Mar 10, 2022 at 14:03:07 -0500, Robert Heller wrote:
> > It prints an error message and returns an error status:
> >
> > backup@newserver:~$ amtape -otpchanger=vault_changer -ointeractivity=''
> >
On Thu, Mar 10, 2022 at 14:03:07 -0500, Robert Heller wrote:
> It prints an error message and returns an error status:
>
> backup@newserver:~$ amtape -otpchanger=vault_changer -ointeractivity=''
> wendellfreelibrary label wendellfreelibrary-vault-030
> ERROR: Source Volume
At Thu, 10 Mar 2022 13:11:04 -0500 Nathan Stratton Treadway
wrote:
>
> On Wed, Mar 09, 2022 at 22:50:29 -0500, Robert Heller wrote:
> > At Wed, 9 Mar 2022 23:50:45 +0100 Exuvo wrote:
> >
> > >
> > > Could you give the exact command line you give when it hangs?
> >
> > /usr/sbin/amtape
On Thu, Mar 10, 2022 at 13:02:24 -0500, Robert Heller wrote:
> At Thu, 10 Mar 2022 12:46:43 -0500 Nathan Stratton Treadway
> wrote:
>
> >
> > On Thu, Mar 10, 2022 at 09:55:30 -0500, Robert Heller wrote:
> > > Here is the Java fragment:
> > >
> > > public class FlushOldVaults extends
On Wed, Mar 09, 2022 at 22:50:29 -0500, Robert Heller wrote:
> At Wed, 9 Mar 2022 23:50:45 +0100 Exuvo wrote:
>
> >
> > Could you give the exact command line you give when it hangs?
>
> /usr/sbin/amtape -otpchanger=vault_changer wendellfreelibrary label
> wendellfreelibrary_vault-030
>
What
At Thu, 10 Mar 2022 12:46:43 -0500 Nathan Stratton Treadway
wrote:
>
> On Thu, Mar 10, 2022 at 09:55:30 -0500, Robert Heller wrote:
> > Here is the Java fragment:
> >
> > public class FlushOldVaults extends BackupVault {
> > private static final String AMTAPE = "/usr/sbin/amtape";
> >
On Thu, Mar 10, 2022 at 09:55:30 -0500, Robert Heller wrote:
> Here is the Java fragment:
>
> public class FlushOldVaults extends BackupVault {
> private static final String AMTAPE = "/usr/sbin/amtape";
> private static final String AMTAPEOPT1 = "-otpchanger=vault_changer";
> private
At Wed, 9 Mar 2022 22:50:29 -0500 (EST) Robert Heller
wrote:
>
> At Wed, 9 Mar 2022 19:11:40 -0500 Nathan Stratton Treadway
> wrote:
>
> >
> > On Tue, Mar 08, 2022 at 18:27:47 -0500, Robert Heller wrote:
> > >
> > > I've written a Java program that goes through vaulted tapes and forks
>
At Wed, 9 Mar 2022 19:11:40 -0500 Nathan Stratton Treadway
wrote:
>
> On Tue, Mar 08, 2022 at 18:27:47 -0500, Robert Heller wrote:
> >
> > I've written a Java program that goes through vaulted tapes and forks
> > amtape
> > (using Runtime.getRuntime().exec(()), and when a non-existant tape
At Wed, 9 Mar 2022 23:50:45 +0100 Exuvo wrote:
>
> Could you give the exact command line you give when it hangs?
/usr/sbin/amtape -otpchanger=vault_changer wendellfreelibrary label
wendellfreelibrary_vault-030
That partitular tape is missing, but still existed in a separate database
(long
On Tue, Mar 08, 2022 at 18:27:47 -0500, Robert Heller wrote:
>
> I've written a Java program that goes through vaulted tapes and forks amtape
> (using Runtime.getRuntime().exec(()), and when a non-existant tape label is
> asked for, amtape "hangs". I cannot figure out why or how to get amtape
Could you give the exact command line you give when it hangs?
Anton "exuvo" Olsson
ex...@exuvo.se
On 2022-03-09 00:27, Robert Heller wrote:
For some unfathomably reason amtape "hangs" when forked from a Java program.
I've written a Java program that goes through vaulted tapes and forks
17 matches
Mail list logo