Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 502574 - =net-proxy/http-replicator-3.0-r4 - http-replicator: error: invalid directory '/var/cache/http-replicator'
Summary: =net-proxy/http-replicator-3.0-r4 - http-replicator: error: invalid directory...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 442874
Blocks:
  Show dependency tree
 
Reported: 2014-02-26 23:05 UTC by Michael Jones
Modified: 2016-08-12 13:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for hr-v3.0 to suggest running repcacheman (http-replicator-3-missing-directory.patch,1.73 KB, patch)
2015-01-17 19:15 UTC, Matthew Ogilvie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2014-02-26 23:05:14 UTC
mimir ~ # systemctl start http-replicator
mimir ~ # systemctl status http-replicator
http-replicator.service - http-replicator daemon
   Loaded: loaded (/usr/lib64/systemd/system/http-replicator.service; enabled)
  Drop-In: /etc/systemd/system/http-replicator.service.d
           └─00gentoo.conf
   Active: failed (Result: exit-code) since Wed 2014-02-26 16:57:10 CST; 34s ago
  Process: 11109 ExecStart=/usr/bin/http-replicator -s -f --dir /var/cache/http-replicator --user portage --log /var/log/http-replicator.log $DAEMON_OPTS (code=exited, status=2)
 Main PID: 11109 (code=exited, status=2)

Feb 26 16:57:10 mimir systemd[1]: Started http-replicator daemon.
Feb 26 16:57:10 mimir http-replicator[11109]: Usage: http-replicator [options]
Feb 26 16:57:10 mimir http-replicator[11109]: http-replicator: error: invalid directory '/var/cache/http-replicator'
Feb 26 16:57:10 mimir systemd[1]: http-replicator.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Feb 26 16:57:10 mimir systemd[1]: Unit http-replicator.service entered failed state.


The directory /var/cache/http-replicator is hard-coded in the systemd unit file deployed by the ebuild, but it isn't created automatically by either the ebuild or the application.

Creating the directory by hand causes the program to work


mimir ~ # mkdir /var/cache/http-replicator
mimir ~ # systemctl start http-replicator
mimir ~ # systemctl status http-replicator
http-replicator.service - http-replicator daemon
   Loaded: loaded (/usr/lib64/systemd/system/http-replicator.service; enabled)
  Drop-In: /etc/systemd/system/http-replicator.service.d
           └─00gentoo.conf
   Active: active (running) since Wed 2014-02-26 17:04:35 CST; 3s ago
 Main PID: 3578 (http-replicator)
   CGroup: /system.slice/http-replicator.service
           └─3578 /usr/bin/python2.7 /usr/bin/http-replicator -s -f --dir /var/cache/http-replicator --user portage --log /var/log/http-replicator.log --alias /usr/portage/packages:packages --ip 192.168.*.* --ip 10.*.*.* --port 8080

Feb 26 17:04:35 mimir systemd[1]: Started http-replicator daemon.
Feb 26 17:04:35 mimir http-replicator[3578]: INFO: HttpReplicator started



Reproducible: Always
Comment 1 Matthew Ogilvie 2015-01-09 08:10:19 UTC
You probably didn't notice the instructions printed out when you emerged http-replicator, which include:

" * - run /usr/bin/repcacheman to set up the cache"

Although admittedly the startup scripts probably ought check for the directory and suggest the same thing...
Comment 2 Matthew Ogilvie 2015-01-17 19:15:29 UTC
Created attachment 394200 [details, diff]
patch for hr-v3.0 to suggest running repcacheman

Here's a patch so it suggests running repcacheman if the cache directory doesn't exist.

I'll probably upload an updated ebuild (with some other enhancements) to bug 442874 soon.
Comment 3 Matthew Ogilvie 2016-03-24 02:03:07 UTC
My improved error message is included in version 3.0-r5 from bug 442874.
Comment 4 Pacho Ramos gentoo-dev 2016-04-03 08:22:09 UTC
Do you want to proxy maintain this?
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 5 Pacho Ramos gentoo-dev 2016-08-12 13:40:11 UTC
fixed in -r5