Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127644 - init script for dev-db/xindice broken
Summary: init script for dev-db/xindice broken
Status: VERIFIED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-26 08:56 UTC by felix schmid
Modified: 2006-03-31 03:42 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 felix schmid 2006-03-26 08:56:41 UTC
the init script for xindice is broken. It reports 'ok' if invoked with 'start', but xindice isn't running afterwards.
Comment 1 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-26 11:01:45 UTC
Some hints like your "emerge info" output would be really nice.
Comment 2 felix schmid 2006-03-27 01:57:47 UTC
Oops sorry, here it comes:

felix@heffalump ~ $ emerge --info
Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15.1 i686)
=================================================================
System uname: 2.6.15.1 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.4.19-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distlocks fixpackages parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aalib acl acpi alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 cdb cddb cdr crypt cups curl dba directfb dri dvd dvdr dvdread eds encode esd ethereal exif expat fam fbcon ffmpeg flac foomaticdb fortran gd gdbm gif glut gmp gpm gstreamer gtk gtk2 gtkhtml idn imagemagick imap imlib innodb ipv6 ithreads java joystick jpeg junit lcms ldap libg++ libwww logrotate mad md5sum mhash mikmod mmx mng motif mozilla mozsvg mp3 mpeg mysql nas ncurses nls nsplugin ogg oggvorbis opengl oss pam pcre pdflib perl php png postgres python qt quicktime readline samba sdl slang snmp speex spell sse ssl svg svga tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs x509 xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-27 06:10:57 UTC
Two questions:

- How exactly did you check if xindice is running?

- What is the output of /opt/xindice/start on your system?
Comment 4 felix schmid 2006-03-27 11:56:32 UTC
ad 1) 'ps aux|grep java' (also, pointing browser to localhost:4080 didn't work)

ad 2) On my first attempt, I couldn't start it as regular user. So I edited the scripts to call java as $JAVA_HOME/java, which allowed me to sudo-call it. It then complained that it wasn
Comment 5 felix schmid 2006-03-27 11:56:32 UTC
ad 1) 'ps aux|grep java' (also, pointing browser to localhost:4080 didn't work)

ad 2) On my first attempt, I couldn't start it as regular user. So I edited the scripts to call java as $JAVA_HOME/java, which allowed me to sudo-call it. It then complained that it wasnÄt able to start the HTTP server (the first steps succeeded, IIRC).

Right now, everything works when I start it manually (using the 'start' skript as root). Here's the output:

heffalump xindice # ./start 
Xindice Loader
==============

Environment
-----------
XINDICE_HOME =  /opt/xindice
CLASSPATH =  /opt/xindice/java/lib/xmldb.jar:/opt/xindice/java/lib/xmldb-xupdate.jar:/opt/xindice/java/lib/xmldb-sdk.jar:/opt/xindice/java/lib/xml-apis-1.0.jar:/opt/xindice/java/lib/xindice.jar:/opt/xindice/java/lib/xerces-1.4.3.jar:/opt/xindice/java/lib/xalan-2.0.1.jar:/opt/xindice/java/lib/openorb_tools-1.2.0.jar:/opt/xindice/java/lib/openorb-1.2.0.jar:/opt/xindice/java/lib/infozone-tools.jar:/opt/xindice/java/lib/examples.jar:/opt/xindice/java/lib/ant-1.4.1.jar:/opt/xindice/classgen:/opt/xindice/config:.

Starting Xindice
----------------

Xindice 1.0 (Birthday)

Database: 'db' initializing
Script: 'GET' added to script storage
Service: 'db' started
Service: 'HTTPServer' started @ http://heffalump.kreuzberg:4080/
Service: 'APIService' started

Server Running


 
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-27 22:49:13 UTC
The output of java-config -L would be interesting now...
Comment 7 felix schmid 2006-03-28 05:46:43 UTC
I just checked: the init.d script seems to be working partly now: I can start the service (java process exisitn gafterwards), but the 'stop' target doesn't work. Also, after start, using the xindice cmd fails with the empty ERROR: response already reported.

Output of java-config -L:

felix@heffalump ~ $ java-config -L
[sun-jdk-1.4.2.10] "Sun JDK 1.4.2.10" (/etc/env.d/java/20sun-jdk-1.4.2.10) *
[blackdown-jdk-1.4.2.03] "Blackdown JDK 1.4.2.03" (/etc/env.d/java/20blackdown-jdk-1.4.2.03)
[blackdown-jdk-1.4.1] "Blackdown JDK 1.4.1" (/etc/env.d/java/20blackdown-jdk-1.4.1)


 
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-28 23:39:54 UTC
(In reply to comment #6)
> I just checked: the init.d script seems to be working partly now: I can start
> the service (java process exisitn gafterwards),

What means "now"? What did you change between "doesn't work" and "works"?

> but the 'stop' target doesn't
> work.

Do the PID recorded in /var/run/xindice/xindice.pid and the PID of the running xindice process match?

> Also, after start, using the xindice cmd fails with the empty ERROR:
> response already reported.

Sorry, but where exactly did you report this? I just can't find it. And: How exactly did you try to use the command?
Comment 9 felix schmid 2006-03-29 11:44:32 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I just checked: the init.d script seems to be working partly now: I can start
> > the service (java process exisitn gafterwards),
> 
> What means "now"? What did you change between "doesn't work" and "works"?
> 

AFAIK all I did was inserting the full path to the 'java' line at the end of the /opt/xindice/start and /opt/xindice/bin/xindice. I did this because 'java-config -S sun-jdk-1.4.2.10' didn't solve the problem (of 'command not found').

> > but the 'stop' target doesn't
> > work.
> 
> Do the PID recorded in /var/run/xindice/xindice.pid and the PID of the running
> xindice process match?
> 

I does not match the PID of the toplevel java process:

xindice  26817  0.0  0.1   2148  1008 ?        Ss   21:32   0:00 /bin/sh /opt/xindice/start
xindice  26820  6.6  2.8 328432 25696 ?        S    21:32   0:01  \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Djavax.xml.
xindice  26821  0.0  2.8 328432 25696 ?        S    21:32   0:00      \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Djavax.
xindice  26822  0.7  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26823  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26824  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26825  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26826  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26827  1.1  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26828  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26832  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26835  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26836  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26837  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26838  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja
xindice  26839  0.0  2.8 328432 25696 ?        S    21:32   0:00          \_ /opt/sun-jdk-1.4.2.10/bin/java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Dja

felix@heffalump ~ $ cat /var/run/xindice/xindice.pid 
26817


> > Also, after start, using the xindice cmd fails with the empty ERROR:
> > response already reported.
> 
> Sorry, but where exactly did you report this? I just can't find it. And: How
> exactly did you try to use the command?
> 

Sorry, my fault. There's no intention to confuse you. Though there's a xindice process running, the following doesn't work:

felix@heffalump ~ $ /opt/xindice/bin/xindice lc -c /db
ERROR : 

Any command (also xindiceadmin) fails with the same error.

There is no open socket listening for connections. 
felix@heffalump ~ $ /usr/sbin/lsof -i4 |grep java
felix@heffalump ~ $ 

Connect to localhost:4080 fails...

Thanks for your effort.
Comment 10 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-30 22:49:23 UTC
Hm... after /etc/init.d/xindice start I get:

~ # ps -FHww -u xindice
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
xindice  32549     1  0   537  1016   0 08:39 ?        00:00:00 /bin/sh /opt/xindice/start
xindice  32552 32549  1 81988 25848   0 08:39 ?        00:00:02   java -Xms16m -Xmx168m -Dxindice.home=/opt/xindice -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -classpath /opt/xindice/java/lib/xmldb.jar:/opt/xindice/java/lib/xmldb-xupdate.jar:/opt/xindice/java/lib/xmldb-sdk.jar:/opt/xindice/java/lib/xml-apis-1.0.jar:/opt/xindice/java/lib/xindice.jar:/opt/xindice/java/lib/xerces-1.4.3.jar:/opt/xindice/java/lib/xalan-2.0.1.jar:/opt/xindice/java/lib/openorb_tools-1.2.0.jar:/opt/xindice/java/lib/openorb-1.2.0.jar:/opt/xindice/java/lib/infozone-tools.jar:/opt/xindice/java/lib/examples.jar:/opt/xindice/java/lib/ant-1.4.1.jar:/opt/xindice/classgen:/opt/xindice/config:. org.apache.xindice.server.Xindice

~ # cat /var/run/xindice/xindice.pid 
32549

~ # /etc/init.d/xindice stop
 * Stopping xindice... ...                                                                                                                                     [ ok ]
~ # ps -FHww -u xindice
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
~ # 

So everything here works as expected... server is listening on port 4080 as it should. I wonder why you get so many java processes and no listening server.
Comment 11 felix schmid 2006-03-31 00:54:12 UTC
I think 'emerge unmerge xindices' solved the problem...
Comment 12 Patrick Kursawe (RETIRED) gentoo-dev 2006-03-31 03:30:02 UTC
(In reply to comment #10)
> I think 'emerge unmerge xindices' solved the problem...

Sorry, I am not sure if I got you right... does it work now or is the problem "solved" by giving up?
Comment 13 felix schmid 2006-03-31 03:42:52 UTC
giving up solves for me...Something seems to be fundamentally broken on my setup as the comparision of my and your 'ps' output shows. It works if I start it manually so I'll use it that whay...Thanks for your effort anyway.