Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: "Unable to create repository file" #21

Closed
gripedthumbtacks opened this issue Feb 1, 2017 · 5 comments
Closed

bug: "Unable to create repository file" #21

gripedthumbtacks opened this issue Feb 1, 2017 · 5 comments
Labels

Comments

@gripedthumbtacks
Copy link

gripedthumbtacks commented Feb 1, 2017

there appears to be an error in this section

# /opt/digitalocean/bin/do-agent 
2017/02/01 09:04:29 Do-Agent version 0.4.6
2017/02/01 09:04:29 Do-Agent build HEAD.704e794
2017/02/01 09:04:29 Architecture: amd64
2017/02/01 09:04:29 Operating System: linux
2017/02/01 09:04:30 Checking for newer version of do-agent
2017/02/01 09:04:31 Unable to update do-agent: Update: Unable to create repository file: /var/opt/digitalocean/do-agent/tufLocalStore

# ls -l /var/opt/digitalocean/do-agent/tufLocalStore
-rw------- 1 nobody nogroup 32768 Feb 1 08:49 /var/opt/digitalocean/do-agent/tufLocalStore

...
func (u *update) createTufClient() (*client.Client, error) {
	if u.client != nil {
		return u.client, nil
	}

	localStoreFile := fmt.Sprintf("%s%s", u.localStorePath, "/tufLocalStore")
	ls, err := client.FileLocalStore(localStoreFile)
	if err != nil {
		return nil, ErrUnableToCreateLocalStore{Path: localStoreFile}
	}
...

func (e ErrUnableToCreateLocalStore) Error() string {
55		return fmt.Sprintf("Update: Unable to create repository file: %s", e.Path)
…	
64		return fmt.Sprintf("Update: Unable to query repository file: %s", e.StoreURL)
65	}
@jdtech3
Copy link

jdtech3 commented May 17, 2017

Same error on v0.4.10

/opt/digitalocean/bin ⟫ ./do-agent
2017/05/16 17:23:53 Do-Agent version 0.4.10
2017/05/16 17:23:53 Do-Agent build HEAD.b7f527b
2017/05/16 17:23:53 Architecture: amd64
2017/05/16 17:23:53 Operating System: linux
2017/05/16 17:23:54 Checking for newer version of do-agent
2017/05/16 17:23:54 Unable to update do-agent: Update: Unable to create repository file: /var/opt/digitalocean/do-agent/tufLocalStore

@darkmuggle
Copy link
Contributor

You may need to restart the agent.
Can you also tell me what the OS/Version is?

Starting with 0.4.11, the packaged agent uses /run/digitalocean via systemd for the update path. I'm working on opensourcing the packaging so that should help.

In the meantime, you can run:
curl -sSL https://agent.digitalocean.com/install.sh | sh which will update the agent and include the updated startup script.

@anishvarghese
Copy link

Same error on 0.5.1-1.
I am using CentOS Linux release 7.3.1611

Oct 5 05:34:14 stage do-agent[675]: 2017/10/05 05:34:14 Unable to update do-agent: Update: Unable to create repository file: /run/digitalocean-agent/tufLocalStore
Oct 5 06:01:01 stage systemd: Created slice user-0.slice.

Digital Ocean server went down after hitting these alerts continuously.

@HLFH
Copy link

HLFH commented Feb 17, 2018

I finally removed nobody User & Group within the systemd .service file.

I no longer have this issue:

Unable to create repository file: /var/opt/digitalocean/do-agent/tufLocalStore

With:

[Unit]
Description=DigitalOcean agent
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/do-agent

[Install]
WantedBy=multi-user.target

@stale
Copy link

stale bot commented Dec 17, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 17, 2018
@stale stale bot closed this as completed Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants