Skip to content
This repository was archived by the owner on Jul 5, 2021. It is now read-only.

Command "list-jobs" asks for an unnecessary argument #61

Closed
devtobo opened this issue Jan 17, 2018 · 3 comments
Closed

Command "list-jobs" asks for an unnecessary argument #61

devtobo opened this issue Jan 17, 2018 · 3 comments
Assignees

Comments

@devtobo
Copy link

devtobo commented Jan 17, 2018

Hi,
I am trying to list the files in my vault (for downloading them later). I am using the snapshot:
glacieruploader-impl-0.1.1-SNAPSHOT-jar-with-dependencies.jar

java -jar glacieruploader-impl-0.1.1-SNAPSHOT-jar-with-dependencies.jar --endpoint https://glacier.us-east-1.amazonaws.com --vault MyVault -l

INFO  Using region: us-east-1
INFO  Starting inventory listing for vault MyVault...
INFO  Inventory Job created with ID 2tIae4jFiovOH4XZ3Q-umtJm-l6E4uL-2oxkSJVEYEM3UJAodH4MArWP20NvDVLp5ncIpXBXtdYEXFwoG8_Kb-QFo_bG

Trying to use the Job ID...

java -jar glacieruploader-impl-0.1.1-SNAPSHOT-jar-with-dependencies.jar --endpoint https://glacier.us-east-1.amazonaws.com --vault MyVault --list-inventory 2tIae4jFiovOH4XZ3Q-umtJm-l6E4uL-2oxkSJVEYEM3UJAodH4MArWP20NvDVLp5ncIpXBXtdYEXFwoG8_Kb-QFo_bG

INFO  Using region: us-east-1
INFO  Retrieving inventory for job id 2tIae4jFiovOH4XZ3Q-umtJm-l6E4uL-2oxkSJVEYEM3UJAodH4MArWP20NvDVLp5ncIpXBXtdYEXFwoG8_Kb-QFo_bG...
ERROR The job is not currently available for download: 2tIae4jFiovOH4XZ3Q-umtJm-l6E4uL-2oxkSJVEYEM3UJAodH4MArWP20NvDVLp5ncIpXBXtdYEXFwoG8_Kb-QFo_bG (Service: AmazonGlacier; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: NYBKpfrWDYRfOH1LzcQKkGmJf00Yj6ANo5LfwW1lQ2_q1Yc)
com.amazonaws.services.glacier.model.InvalidParameterValueException: The job is not currently available for download: 2tIae4jFiovOH4XZ3Q-umtJm-l6E4uL-2oxkSJVEYEM3UJAodH4MArWP20NvDVLp5ncIpXBXtdYEXFwoG8_Kb-QFo_bG (Service: AmazonGlacier; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: NYBKpfrWDYRfOH1LzcQKkGmJf00Yj6ANo5LfwW1lQ2_q1Yc)

Also cannot list jobs:

java -jar glacieruploader-impl-0.1.1-SNAPSHOT-jar-with-dependencies.jar --endpoint https://glacier.us-east-1.amazonaws.com --vault MyVault --list-jobs

ERROR Something went wrong parsing the arguments
joptsimple.OptionMissingRequiredArgumentException: Option ['j', 'list-jobs'] requires an argument
@MoriTanosuke
Copy link
Owner

The first message The job is not currently available for download indicates that the inventory listing is not yet ready. I'd try again later, sometimes it takes quite a long time to actually complete. There is a way to configure notifications for vault operations though: https://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications-console.html

The second message Option ['j', 'list-jobs'] requires an argument indicates that an argument is missing. The code checks for an argument, but I think that is an mistake:

public boolean valid(OptionSet options, GlacierUploaderOptionParser optionParser) {
return !StringUtils.isBlank(options.valueOf(optionParser.vault)) &&
options.has(optionParser.listJobs) && options.hasArgument(optionParser.listJobs);

I'll check that one.

@devtobo
Copy link
Author

devtobo commented Jan 17, 2018

You're right, waiting 3h-4h got me the listing of my inventory.
Thank you!

@MoriTanosuke
Copy link
Owner

@devtobo Good to hear. I'll rename this issue to track the unnecessary argument for the list-jobs command then.

@MoriTanosuke MoriTanosuke changed the title list-inventory job id not return? Command "list-jobs" asks for an unnecessary argument Jan 18, 2018
@MoriTanosuke MoriTanosuke self-assigned this Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants