Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542476 - net-proxy/http-replicator-4.0_alpha2-r4 fail to start with different cache-dir invalid option
Summary: net-proxy/http-replicator-4.0_alpha2-r4 fail to start with different cache-di...
Status: RESOLVED TEST-REQUEST
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:
Blocks:
 
Reported: 2015-03-07 20:59 UTC by Christian Jumpertz
Modified: 2016-10-09 21:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Jumpertz 2015-03-07 20:59:06 UTC
Because http-replicator 3.0-r4 seems to have no ipv6 (listen!) Support, i update to 4.0_alpha2-r4. Since the configuration File has a --ipv6 flag.

Starting the script with the same Configuration as 3.0, just with the additional Line at the end:

DAEMON_OPTS="$DAEMON_OPTS --ipv6"

Points out that the Service refuse to start.

/etc/init.d/http-replicator start
 * Caching service dependencies ...                                                                                                        [ ok ]
 * Starting HTTP Replicator ...
Error: invalid option '/mnt/sdb3/http-replicator/'
 * start-stop-daemon: failed to start `/usr/bin/http-replicator'
 * Failed to start HTTP Replicator                                                                                                         [ !! ]
 * ERROR: http-replicator failed to start

Don't find any further information in the Log files.

Reproducible: Always

Steps to Reproduce:
1. Update http-replicator from 3.0-r4 to 4.0_alpha2-r4
2. Mix the old configuration File with the additional lines from the new configuration.
3. Try to start the service.  
Actual Results:  
Misinterpret the changed cache directory as invalid option.

Expected Results:  
http-replicator service should just start with the configured cache directory and listen on tcp6 too.
Comment 1 Andrew Savchenko gentoo-dev 2015-03-09 18:20:42 UTC
Please upload `emerge --info` output and full config file.

However since this package don't have a maintainer, this bug is unlikely to be fixed. If you are interested in this package consider providing a patch and becoming a proxied maintainer:

https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 2 Christian Jumpertz 2015-03-18 12:57:44 UTC
emerge --info:
# emerge --info
Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.10.25-gentoo x86_64)
=================================================================
System uname: Linux-3.10.25-gentoo-x86_64-Intel-R-_Core-TM-_i3_CPU_540_@_3.07GHz-with-gentoo-2.2
KiB Mem:     3845588 total,    457796 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 17 Mar 2015 02:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.2.5-r6, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.4.7, 4.5.4, 4.6.4, 4.7.3-r1, 4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo MyOverlay_solar42
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS=" -march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/www/localhost/htdocs/mythweb/includes/init.php"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS=" -march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/sdb1/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org"
USE="acl acpi amd64 apache2 berkdb bzip2 cgi cli cracklib crypt cxx dba dbi dbus dri fortran gd gdbm iconv ipv6 jpeg libav lm_sensors mmx modules mpm-prefork multilib mysql ncurses nls nptl opengl openmp pam pcre pdo-external pear pic png posix prefork readline session simplexml spl sse sse2 ssl tcpd theora threads tiff tokeizer unicode vaapi xml xsl zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions acpi imagemagick alias cgi php5 auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias x264" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 Christian Jumpertz 2015-03-18 13:19:52 UTC
The alpha2 Code of the http-replicator is from 2008. I am a newbie, but will investigate some time to check this out later this week.

After a first check it looks like that the alpha script is a new version which have not much common with 3.0. In the Top of the configuration File the "General_Opts" are used by repcacheman and the "Daemon_Opts" used by http-replicator.

The ebuild for the alpha use the same Version of http-replicator-3.0-repcacheman-0.44-r2 as before, i'll review later to find whats wrong.

Could be that its not implemented to mix ipv6 and ipv4 since the "--ipv6" or "-6" change the "FAMILY = socket.AF_UNSPEC" itself to another value. For ipv4, the default the FAMILY is set to "socket.AF_INET".
Comment 4 Christian Jumpertz 2015-09-28 00:31:36 UTC
On a first look, the 4.0alpha http-replicator work for ipv4 but not for ipv6.

The alpha itself is just a quick rewrite with less Lines of Code, so there are many functions that are not implemented. Like "-d or --dir" option, is now the -r or --root option and "--log DIR" option, is now used as "--daemon LOG".

Root-Path its because the http-replicator now create a directory to separate the Requested URLs so "GET http://distfiles.gentoo.org/distfiles/totem-3.16.4.tar.xz" will be: ROOT_DIR/distfiles.gentoo.org:80/distfiles/totem-3.16.4.tar.xz

In Alpha4 the --user option is missed too. I thought that http-replicator is running as user portage instead of user root, have to check if this is true for the 3.0 Version.

Not sure why the alpha4 did not work in the first place, with --root in the configuration file instead of --dir, and throw the Error listed in the first post, when i launch it through init.d. Seems like there is a problem with parsing the arguments, because it works from the command line.

========================
elif _arg in ( '-r', '--root' ):
    try:
      ROOT = os.path.realpath( _args.next() ) + os.sep
      assert os.path.isdir( ROOT )
    except StopIteration:
      sys.exit( 'Error: %s requires a directory argument' % _arg )
    except:
      sys.exit( 'Error: invalid cache directory %s' % ROOT )
=========================

The --ipv6 option did not work too. Netstat just list the ipv4.

# netstat -tuplen | grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      0          12997448   16943/python2.7

Not sure if it is easy to adapt the 3.0 code or to add the missing features and behavior to the alpha. At my next free time i got bored i take the challenge.

About the maintainer... maybe later if i rewrite this little peace of code to my satisfaction and for all critical eyes. When its done (long long time in the future) i have to ask Gertjan van Zwieten, to add the code to his repository. Seems like he lost his pleasure, eight years ago to the project after ".. the serious work got lost on a crashed disk.".
Comment 5 Pacho Ramos gentoo-dev 2016-08-12 13:42:07 UTC
could you try with the latest updated revisions?
Comment 6 Christian Jumpertz 2016-10-09 21:23:53 UTC
(In reply to Pacho Ramos from comment #5)
> could you try with the latest updated revisions?

The 4.0_alpha2-r5 work fine and accept the cache-dir, just the replicator don't create a Socket for IPv6.

So there is still a lag of internet protocol 6 support. Seems that the the replicator-script just ignore this flag.

Sorry Pacho Ramos, for my late Response.