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

Support init #46

Open
ogarcia opened this issue Sep 18, 2024 · 0 comments
Open

Support init #46

ogarcia opened this issue Sep 18, 2024 · 0 comments
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@ogarcia
Copy link

ogarcia commented Sep 18, 2024

Summary

I was trying to create a new rustic/restic repository directly in rustic_server and it is not possible.

What happens

Steps to reproduce:

  1. Start the server rustic-server -p /var/lib/rustic-server.
  2. Create a sample .htpasswd with the user user and password patata.
    user:$2y$10$Qr3zoxzhcA17B0D9EHz1VO3Cufk3Klsez9r8uI6ahE2uhDlIu8jMi
    
  3. Set the environment variable to access the repository export RESTIC_REPOSITORY="rest:http://user:patata@localhost:8000/server_repo"
  4. Perform restic init
  5. After entering the desired password for the new repository the following error appears:
    Fatal: create key in repository at rest:http://user:***@localhost:8000/server_repo/ failed: unexpected HTTP response (500): 500 Internal Server Error
    

What I expected to happen

That the init command worked without problem and created a new repository.

Details

Server log:

Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576790,"msg":"spawn","task_id":2,"parent_task_id":1}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":30,"time":1726667576791,"msg":"<-- Request received","method":"HEAD","path":"/server_repo/config"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576833,"msg":"get_file","path":"server_repo","tpe":"config","name":""}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576833,"msg":"auth","user":"user","path":"server_repo","tpe":"config","allowed":true}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576833,"msg":"spawn","task_id":3,"parent_task_id":2}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":50,"time":1726667576834,"msg":"Internal error --> Response sent","message":"could not open `/var/lib/rustic-server/server_repo/config`\n\nCaused by:\n    No such file or directory (os error 2)","error_type":"std::io::error::Error","method":"HEAD","path":"/server_repo/config","status":"500 - Internal Server Error","duration":"42.644619ms"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"wrote 94 response bytes"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"discarded 0 unread request body bytes"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"add: epoll_fd=8, fd=10, ev=Event { key: 18446744073709551615, readable: false, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"add: epoll_fd=8, fd=9, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"new: epoll_fd=8, event_fd=9, timer_fd=Some(10)"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"Poller::notify()"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"notify: epoll_fd=8, event_fd=9"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"main_loop: waiting on I/O"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"process_timers: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"Poller::wait(_, Some(59.999898236s))"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"wait: epoll_fd=8, timeout=Some(59.999898236s)"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"modify: epoll_fd=8, fd=10, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"new events: epoll_fd=8, res=1"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"modify: epoll_fd=8, fd=9, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"process_timers: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"react: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"main_loop: waiting on I/O"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"process_timers: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"Poller::wait(_, Some(59.999882627s))"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"wait: epoll_fd=8, timeout=Some(59.999882627s)"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576834,"msg":"modify: epoll_fd=8, fd=10, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":30,"time":1726667576834,"msg":"<-- Request received","method":"POST","path":"/server_repo/"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576875,"msg":"create_dirs","path":"server_repo"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576875,"msg":"auth","user":"user","path":"server_repo","tpe":"","allowed":true}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":30,"time":1726667576877,"msg":"--> Response sent","method":"POST","path":"/server_repo/","status":"200 - OK","duration":"43.068374ms"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"wrote 160 response bytes"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"discarded 0 unread request body bytes"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"Poller::notify()"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"notify: epoll_fd=8, event_fd=9"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"new events: epoll_fd=8, res=1"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"modify: epoll_fd=8, fd=9, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"process_timers: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"react: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"main_loop: waiting on I/O"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"process_timers: 0 ready wakers"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"Poller::wait(_, Some(59.999972719s))"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"wait: epoll_fd=8, timeout=Some(59.999972719s)"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576877,"msg":"modify: epoll_fd=8, fd=10, ev=Event { key: 18446744073709551615, readable: true, writable: false }"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":30,"time":1726667576920,"msg":"<-- Request received","method":"HEAD","path":"/server_repo/config"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576961,"msg":"get_file","path":"server_repo","tpe":"config","name":""}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":20,"time":1726667576961,"msg":"auth","user":"user","path":"server_repo","tpe":"config","allowed":true}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576961,"msg":"spawn","task_id":4,"parent_task_id":2}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":50,"time":1726667576961,"msg":"Internal error --> Response sent","message":"could not open `/var/lib/rustic-server/server_repo/config`\n\nCaused by:\n    No such file or directory (os error 2)","error_type":"std::io::error::Error","method":"HEAD","path":"/server_repo/config","status":"500 - Internal Server Error","duration":"40.78909ms"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576962,"msg":"wrote 94 response bytes"}
Sep 18 13:52:56 archlinux rustic-server[23305]: {"level":10,"time":1726667576962,"msg":"discarded 0 unread request body bytes"}
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

No branches or pull requests

1 participant