Skip to content
This repository has been archived by the owner. It is now read-only.

Failed to start CoreOS Metadata Agent (SSH Keys). #1306

Closed
h0tbird opened this issue May 28, 2016 · 14 comments
Closed

Failed to start CoreOS Metadata Agent (SSH Keys). #1306

h0tbird opened this issue May 28, 2016 · 14 comments

Comments

@h0tbird
Copy link

@h0tbird h0tbird commented May 28, 2016

On my master nodes there is no public-ipv4 and I get this error:

Last login: Sat May 28 22:06:30 2016 from 10.0.0.235
CoreOS alpha (1053.2.0)
Failed Units: 1
  coreos-metadata-sshkeys@core.service
core@master-1 ~ $ systemctl status coreos-metadata-sshkeys@core.service
● coreos-metadata-sshkeys@core.service - CoreOS Metadata Agent (SSH Keys)
   Loaded: loaded (/usr/lib64/systemd/system/coreos-metadata-sshkeys@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2016-05-28 16:11:00 UTC; 6h ago
 Main PID: 799 (code=exited, status=1/FAILURE)

May 28 16:10:54 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
May 28 16:11:00 localhost coreos-metadata[799]: fetching "http://169.254.169.254/2009-04-04/meta-data/public-ipv4": attempt #1
May 28 16:11:00 localhost coreos-metadata[799]: failed to fetch metadata: couldn't parse "" as IP address
May 28 16:11:00 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
May 28 16:11:00 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
May 28 16:11:00 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Unit entered failed state.
May 28 16:11:00 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
core@master-1 ~ $ coreos-metadata --cmdline --ssh-keys=core
fetching "http://169.254.169.254/2009-04-04/meta-data/public-ipv4": attempt #1
failed to fetch metadata: couldn't parse "" as IP address
@jonboulle
Copy link

@jonboulle jonboulle commented Jun 3, 2016

Several other reproductions running in eu-central-1a (just using kube-aws to spin up a cluster)

@mcalhoun
Copy link

@mcalhoun mcalhoun commented Jun 7, 2016

+1

I also don't have a public IP addresses on my controller or workers and I get the same on both the controller and the workers...

systemctl status coreos-metadata-sshkeys@core.service
● coreos-metadata-sshkeys@core.service - CoreOS Metadata Agent (SSH Keys)
   Loaded: loaded (/usr/lib64/systemd/system/coreos-metadata-sshkeys@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-06-07 13:48:28 UTC; 1min 40s ago
 Main PID: 738 (code=exited, status=1/FAILURE)

Jun 07 13:48:23 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Jun 07 13:48:28 localhost coreos-metadata[738]: fetching "http://169.254.169.254/2009-04-04/meta-data/public-ipv4": attempt #1
Jun 07 13:48:28 localhost coreos-metadata[738]: failed to fetch metadata: couldn't parse "" as IP address
Jun 07 13:48:28 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 13:48:28 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
Jun 07 13:48:28 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Unit entered failed state.
Jun 07 13:48:28 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
@sampcoug
Copy link

@sampcoug sampcoug commented Mar 21, 2019

Hello all,
I am seeing this issue on 1911.4.0 version of CoreOS.
Error:

Failed Units: 1
  coreos-metadata-sshkeys@core.service

OS version:

ID=coreos
VERSION=1911.4.0
VERSION_ID=1911.4.0
BUILD_ID=2018-11-26-1924
PRETTY_NAME="Container Linux by CoreOS 1911.4.0 (Rhyolite)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="amd64-usr"
systemctl status coreos-metadata-sshkeys@core.service
coreos-metadata-sshkeys@core.service - CoreOS Metadata Agent (SSH Keys)
   Loaded: loaded (/usr/lib/systemd/system/coreos-metadata-sshkeys@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-03-20 23:53:53 UTC; 8min ago
  Process: 835 ExecStart=/usr/bin/coreos-metadata ${COREOS_METADATA_OPT_PROVIDER} --ssh-keys=core (code=exited, status=1/FAILURE)
 Main PID: 835 (code=exited, status=1/FAILURE)

Any Ideas?

@bgilbert
Copy link
Member

@bgilbert bgilbert commented Mar 21, 2019

@sampcoug What cloud platform are you running on? What does journalctl -u coreos-metadata-sshkeys@core.service say?

@sampcoug
Copy link

@sampcoug sampcoug commented Mar 21, 2019

@bgilbert I am on Google Cloud Platform.

sudo journalctl -u coreos-metadata-sshkeys@core.service
-- Logs begin at Thu 2019-03-21 16:35:19 UTC, end at Thu 2019-03-21 16:38:49 UTC. --
Mar 21 16:35:30 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.011 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attrib>
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.030 INFO Fetch failed with 404: resource not found
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.030 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attrib>
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.033 INFO Fetch failed with 404: resource not found
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.033 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attrib>
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.036 INFO Fetch failed with 404: resource not found
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.036 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attribu>
Mar 21 16:35:31 localhost coreos-metadata[806]: Mar 21 16:35:31.038 INFO Fetch successful
Mar 21 16:35:31 localhost coreos-metadata[806]: Error: writing ssh keys
Mar 21 16:35:31 localhost coreos-metadata[806]: Caused by: character ':' not found in line in key data
Mar 21 16:35:31 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 16:35:31 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 16:35:31 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
@lucab
Copy link
Member

@lucab lucab commented Mar 21, 2019

@sampcoug thanks for the followup. Can you please post what's the content at the URL of the last/successful fetch? It looks like one its lines is not in the format we expect for ssh keys.

@sampcoug
Copy link

@sampcoug sampcoug commented Mar 21, 2019

@lucab I apologize, appears that the some portions were cut off. Hope below helps.

-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/s>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/s>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/b>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/ss>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-key>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-p>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys:>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt >
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh->
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh-keys: A>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh-keys: Atte>
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
~
~
~
~
~
lines 1-15/15 (END)
-- Logs begin at Thu 2019-03-21 17:47:29 UTC, end at Thu 2019-03-21 17:50:14 UTC. --
Mar 21 17:47:41 localhost systemd[1]: Starting CoreOS Metadata Agent (SSH Keys)...
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.673 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.688 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.692 INFO Fetching http://metadata.google.internal/computeMetadata/v1/instance/attributes/block-project-ssh-keys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetch failed with 404: resource not found
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.695 INFO Fetching http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys: Attempt #1
Mar 21 17:47:41 localhost coreos-metadata[827]: Mar 21 17:47:41.700 INFO Fetch successful
Mar 21 17:47:41 localhost coreos-metadata[827]: Error: writing ssh keys
Mar 21 17:47:41 localhost coreos-metadata[827]: Caused by: character ':' not found in line in key data
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 17:47:41 localhost systemd[1]: coreos-metadata-sshkeys@core.service: Failed with result 'exit-code'.
Mar 21 17:47:41 localhost systemd[1]: Failed to start CoreOS Metadata Agent (SSH Keys).
~
@bgilbert
Copy link
Member

@bgilbert bgilbert commented Mar 21, 2019

@sampcoug, @lucab was asking about the contents of http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys for that instance. It appears that one of the keys is formatted incorrectly.

@sampcoug
Copy link

@sampcoug sampcoug commented Mar 21, 2019

@bgilbert, sorry. hope this helps?

sudo curl http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 403 (Forbidden)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>403.</b> <ins>That’s an error.</ins>
  <p>Your client does not have permission to get URL <code>/computeMetadata/v1/project/attributes/sshKeys</code> from this server. Missing Metadata-Flavor:Google header. <ins>That’s all we know.</ins>
@lucab
Copy link
Member

@lucab lucab commented Mar 21, 2019

@sampcoug there is a mandatory header to be attached to requests:

curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys
@sampcoug
Copy link

@sampcoug sampcoug commented Mar 21, 2019

@lucab, it is returning the SSH key that I have added to the Metadata section in GCE gui. Are you referring that there is something wrong with the SSH key?

@bgilbert
Copy link
Member

@bgilbert bgilbert commented Mar 22, 2019

@sampcoug Each line should be formatted as <username>:<ssh key>. coreos-metadata is saying that it can't find the colon delimiter. Are you not seeing it in the curl output?

@lucab
Copy link
Member

@lucab lucab commented Mar 22, 2019

Indeed, it should follow the format described by @bgilbert above and specified at https://cloud.google.com/compute/docs/storing-retrieving-metadata#default.

@sampcoug
Copy link

@sampcoug sampcoug commented Mar 25, 2019

@bgilbert @lucab Thanks! I will work on fixing the formatting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants