inconsistent `apt-get update` behaviour on official Ubuntu AWS AMI

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I get various and inconsistent errors with apt on the official Ubuntu images (ami-83e769fb). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script often succeeds.



My script runs:



sudo apt-get clean all
sudo apt-get update


before install any packages.



Some times I get this error:



amazon-ebs: W: GPG error: http://archive.ubuntu.com/ubuntu artful InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_artful_InRelease into data and signature failed
amazon-ebs: E: The repository 'http://archive.ubuntu.com/ubuntu artful InRelease' is not signed.


Some times apt-get update hits http://us-west-2.ec2.archive.ubuntu.com/ubuntu ... other times it doesn't.



Other times packages are missing (like apache2 or python3).



I don't understand why this behaviour is inconsistent.



How can I get apt-get update on the official Ubuntu AMI to work consistently?










share|improve this question





















  • cross posted here and serverfault.com/questions/904080/…
    – Mystic
    Mar 22 at 17:39










  • If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
    – dpb
    Apr 6 at 3:36










  • @dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
    – Mystic
    Apr 12 at 22:00










  • next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
    – dpb
    Apr 13 at 2:18















up vote
0
down vote

favorite












I get various and inconsistent errors with apt on the official Ubuntu images (ami-83e769fb). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script often succeeds.



My script runs:



sudo apt-get clean all
sudo apt-get update


before install any packages.



Some times I get this error:



amazon-ebs: W: GPG error: http://archive.ubuntu.com/ubuntu artful InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_artful_InRelease into data and signature failed
amazon-ebs: E: The repository 'http://archive.ubuntu.com/ubuntu artful InRelease' is not signed.


Some times apt-get update hits http://us-west-2.ec2.archive.ubuntu.com/ubuntu ... other times it doesn't.



Other times packages are missing (like apache2 or python3).



I don't understand why this behaviour is inconsistent.



How can I get apt-get update on the official Ubuntu AMI to work consistently?










share|improve this question





















  • cross posted here and serverfault.com/questions/904080/…
    – Mystic
    Mar 22 at 17:39










  • If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
    – dpb
    Apr 6 at 3:36










  • @dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
    – Mystic
    Apr 12 at 22:00










  • next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
    – dpb
    Apr 13 at 2:18













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I get various and inconsistent errors with apt on the official Ubuntu images (ami-83e769fb). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script often succeeds.



My script runs:



sudo apt-get clean all
sudo apt-get update


before install any packages.



Some times I get this error:



amazon-ebs: W: GPG error: http://archive.ubuntu.com/ubuntu artful InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_artful_InRelease into data and signature failed
amazon-ebs: E: The repository 'http://archive.ubuntu.com/ubuntu artful InRelease' is not signed.


Some times apt-get update hits http://us-west-2.ec2.archive.ubuntu.com/ubuntu ... other times it doesn't.



Other times packages are missing (like apache2 or python3).



I don't understand why this behaviour is inconsistent.



How can I get apt-get update on the official Ubuntu AMI to work consistently?










share|improve this question













I get various and inconsistent errors with apt on the official Ubuntu images (ami-83e769fb). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script often succeeds.



My script runs:



sudo apt-get clean all
sudo apt-get update


before install any packages.



Some times I get this error:



amazon-ebs: W: GPG error: http://archive.ubuntu.com/ubuntu artful InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_artful_InRelease into data and signature failed
amazon-ebs: E: The repository 'http://archive.ubuntu.com/ubuntu artful InRelease' is not signed.


Some times apt-get update hits http://us-west-2.ec2.archive.ubuntu.com/ubuntu ... other times it doesn't.



Other times packages are missing (like apache2 or python3).



I don't understand why this behaviour is inconsistent.



How can I get apt-get update on the official Ubuntu AMI to work consistently?







apt package-management cloud aws






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 17:39









Mystic

1011




1011











  • cross posted here and serverfault.com/questions/904080/…
    – Mystic
    Mar 22 at 17:39










  • If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
    – dpb
    Apr 6 at 3:36










  • @dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
    – Mystic
    Apr 12 at 22:00










  • next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
    – dpb
    Apr 13 at 2:18

















  • cross posted here and serverfault.com/questions/904080/…
    – Mystic
    Mar 22 at 17:39










  • If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
    – dpb
    Apr 6 at 3:36










  • @dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
    – Mystic
    Apr 12 at 22:00










  • next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
    – dpb
    Apr 13 at 2:18
















cross posted here and serverfault.com/questions/904080/…
– Mystic
Mar 22 at 17:39




cross posted here and serverfault.com/questions/904080/…
– Mystic
Mar 22 at 17:39












If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
– dpb
Apr 6 at 3:36




If you still hit this, can you please post complete logs of the error? Focus on just one type of error as well if you could. The W and E lines you have right now are symptoms, sometimes having to do with disks that are corrupt, etc. But we need more logs to check.
– dpb
Apr 6 at 3:36












@dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
– Mystic
Apr 12 at 22:00




@dpb, I'd love to post more logs, if you can tell me what you're most interested in (syslog?). One of the problems is that this is intermittent, without clear steps to reproduce (I hit it using Packer with AWS in us-west-2). I encountered this over a dozen times across multiple days with new EC2 instances each time, so I don't think it's a hardware issue on the VM).
– Mystic
Apr 12 at 22:00












next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
– dpb
Apr 13 at 2:18





next time you get it, the same place you see the W: and E: entries that you pasted in above, copy the entire context and put it in a pastebin. From the command that was executed. I guess the whole packer log file. Also, please paste in the packer commands that you are running please exactly.
– dpb
Apr 13 at 2:18











1 Answer
1






active

oldest

votes

















up vote
0
down vote













Put this line on top of your script to make it non-interactive:



export DEBIAN_FRONTEND=noninteractive


To fix the issue use following commands in terminal:



wget https://keybase.io/docs/server_security/code_signing_key.asc
sudo apt-key add code_signing_key.asc



Btw:



apt-get clean all # The "all" doesn't add anything to the command here. 


Use these commands instead :



Clean, Update and Upgrade :



sudo apt-get update 
sudo apt-get -y upgrade
sudo apt-get autoremove
sudo apt-get autoclean



Reference for fixing and setting up the Ubuntu AWS AMI tools : docs.aws.amazon.com//Setting Up the AMI Tools-Managing Signing Certificates






share|improve this answer






















  • What does this do? Why would it help?
    – Mystic
    Mar 22 at 18:04










  • The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
    – An0n
    Mar 22 at 18:07










  • This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
    – Mystic
    Mar 22 at 18:09










  • Why you got this problem can have many reasons. I'm just telling you how to fix it.
    – An0n
    Mar 22 at 18:21










  • This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
    – Mystic
    Mar 22 at 19:00











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018319%2finconsistent-apt-get-update-behaviour-on-official-ubuntu-aws-ami%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Put this line on top of your script to make it non-interactive:



export DEBIAN_FRONTEND=noninteractive


To fix the issue use following commands in terminal:



wget https://keybase.io/docs/server_security/code_signing_key.asc
sudo apt-key add code_signing_key.asc



Btw:



apt-get clean all # The "all" doesn't add anything to the command here. 


Use these commands instead :



Clean, Update and Upgrade :



sudo apt-get update 
sudo apt-get -y upgrade
sudo apt-get autoremove
sudo apt-get autoclean



Reference for fixing and setting up the Ubuntu AWS AMI tools : docs.aws.amazon.com//Setting Up the AMI Tools-Managing Signing Certificates






share|improve this answer






















  • What does this do? Why would it help?
    – Mystic
    Mar 22 at 18:04










  • The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
    – An0n
    Mar 22 at 18:07










  • This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
    – Mystic
    Mar 22 at 18:09










  • Why you got this problem can have many reasons. I'm just telling you how to fix it.
    – An0n
    Mar 22 at 18:21










  • This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
    – Mystic
    Mar 22 at 19:00















up vote
0
down vote













Put this line on top of your script to make it non-interactive:



export DEBIAN_FRONTEND=noninteractive


To fix the issue use following commands in terminal:



wget https://keybase.io/docs/server_security/code_signing_key.asc
sudo apt-key add code_signing_key.asc



Btw:



apt-get clean all # The "all" doesn't add anything to the command here. 


Use these commands instead :



Clean, Update and Upgrade :



sudo apt-get update 
sudo apt-get -y upgrade
sudo apt-get autoremove
sudo apt-get autoclean



Reference for fixing and setting up the Ubuntu AWS AMI tools : docs.aws.amazon.com//Setting Up the AMI Tools-Managing Signing Certificates






share|improve this answer






















  • What does this do? Why would it help?
    – Mystic
    Mar 22 at 18:04










  • The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
    – An0n
    Mar 22 at 18:07










  • This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
    – Mystic
    Mar 22 at 18:09










  • Why you got this problem can have many reasons. I'm just telling you how to fix it.
    – An0n
    Mar 22 at 18:21










  • This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
    – Mystic
    Mar 22 at 19:00













up vote
0
down vote










up vote
0
down vote









Put this line on top of your script to make it non-interactive:



export DEBIAN_FRONTEND=noninteractive


To fix the issue use following commands in terminal:



wget https://keybase.io/docs/server_security/code_signing_key.asc
sudo apt-key add code_signing_key.asc



Btw:



apt-get clean all # The "all" doesn't add anything to the command here. 


Use these commands instead :



Clean, Update and Upgrade :



sudo apt-get update 
sudo apt-get -y upgrade
sudo apt-get autoremove
sudo apt-get autoclean



Reference for fixing and setting up the Ubuntu AWS AMI tools : docs.aws.amazon.com//Setting Up the AMI Tools-Managing Signing Certificates






share|improve this answer














Put this line on top of your script to make it non-interactive:



export DEBIAN_FRONTEND=noninteractive


To fix the issue use following commands in terminal:



wget https://keybase.io/docs/server_security/code_signing_key.asc
sudo apt-key add code_signing_key.asc



Btw:



apt-get clean all # The "all" doesn't add anything to the command here. 


Use these commands instead :



Clean, Update and Upgrade :



sudo apt-get update 
sudo apt-get -y upgrade
sudo apt-get autoremove
sudo apt-get autoclean



Reference for fixing and setting up the Ubuntu AWS AMI tools : docs.aws.amazon.com//Setting Up the AMI Tools-Managing Signing Certificates







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 22 at 18:27

























answered Mar 22 at 18:01









An0n

80418




80418











  • What does this do? Why would it help?
    – Mystic
    Mar 22 at 18:04










  • The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
    – An0n
    Mar 22 at 18:07










  • This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
    – Mystic
    Mar 22 at 18:09










  • Why you got this problem can have many reasons. I'm just telling you how to fix it.
    – An0n
    Mar 22 at 18:21










  • This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
    – Mystic
    Mar 22 at 19:00

















  • What does this do? Why would it help?
    – Mystic
    Mar 22 at 18:04










  • The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
    – An0n
    Mar 22 at 18:07










  • This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
    – Mystic
    Mar 22 at 18:09










  • Why you got this problem can have many reasons. I'm just telling you how to fix it.
    – An0n
    Mar 22 at 18:21










  • This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
    – Mystic
    Mar 22 at 19:00
















What does this do? Why would it help?
– Mystic
Mar 22 at 18:04




What does this do? Why would it help?
– Mystic
Mar 22 at 18:04












The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
– An0n
Mar 22 at 18:07




The first line make's it non-interactive that means it just "hides" the messages and errors. The second fix should fix the problem.
– An0n
Mar 22 at 18:07












This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
– Mystic
Mar 22 at 18:09




This doesn't address why the problem is intermittent. Why does the official AMI sometimes have this problem but not other times?
– Mystic
Mar 22 at 18:09












Why you got this problem can have many reasons. I'm just telling you how to fix it.
– An0n
Mar 22 at 18:21




Why you got this problem can have many reasons. I'm just telling you how to fix it.
– An0n
Mar 22 at 18:21












This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
– Mystic
Mar 22 at 19:00





This doesn't fix the problem of intermittent apt failures. I appreciate your time and concern, but I keep hitting intermittent issues.
– Mystic
Mar 22 at 19:00


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018319%2finconsistent-apt-get-update-behaviour-on-official-ubuntu-aws-ami%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491