Skip to Content.
Sympa Menu

idok-users - Re: [idok-users] some trouble with hostnames (corba trouble) -- solution

idok-users AT lists.psi.ch

Subject: iDok user discussion

List archive

Re: [idok-users] some trouble with hostnames (corba trouble) -- solution


Chronological Thread 
  • From: Florian Hübner <florian.huebner AT psi.ch>
  • To: szimszon AT oregpreshaz.eu
  • Cc: idok-users AT lists.psi.ch
  • Subject: Re: [idok-users] some trouble with hostnames (corba trouble) -- solution
  • Date: Mon, 08 Jun 2009 14:44:57 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-users/>
  • List-id: iDok user discussion <idok-users.lists.psi.ch>

I think it's not a lucky thing to bind IOR to _hostname's_ IP address,
why can't I change where to bind IOR :(

It's like in windows to link services to host's domain name :( Grrr.

Good to know but pretty annoying. I dont think we could do much about this though...


> Now I have no openoffice.org jet but if I'm not wrong it's optional...

Yes, in that case all the MS Office and OO files will be treated like binaries.


> but I have no search and I found this in the log:
>
> INFO: Index for "/project/dir" needs to be fixed - no version file present
> Jun 5, 2009 7:52:59 PM ch.idok.dmsd.impl.config.svnlucene.Config reconfig
> INFO: Adding repository /project/dir
> Jun 5, 2009 7:52:59 PM ch.idok.dmsd.impl.config.svnlucene.Config reconfig
> WARNING: Cannot create index for repository /project/dir
> ch.idok.common.errorhandling.DmsException: User message: Invalid
> subversion URL

I attached a new local-server.xml ant file where you can configure the indexer.svnurl to fit your installation.
Let me know it this works for you.


> I have a lot of:
> # An unexpected error has been detected by Java Runtime Environment:
> # Java VM: Java HotSpot(TM) Server VM (11.2-b01 mixed mode linux-x86)
> # Problematic frame:
> # C [libQtGui.so.4+0x6f5ed4]

Does the GUI crash with this message? Is it a reproducible or rather random even?
<project name="idok-local-server" basedir=".">

	<description>targets for managing a local iDok server</description>

	<dirname property="idok-local-server.basedir" file="${ant.file}" />

	<import file="./build.xml" />

	<property name="server.root.dir" value="/tmp/idok_server" />
	<property name="server.authzn.db.dir" value="${server.root.dir}/derby" />
	<property name="server.authzn.db.backup.dir"
	          value="${server.root.dir}/derby_backup" />
	<property name="server.index.root.dir" value="${server.root.dir}/indices" />
	<property name="server.project.root.dir"
	          value="${server.root.dir}/projects" />
	<property name="server.httpd.conf.dir"
	          value="${server.root.dir}/httpd/conf.d" />
	<property name="server.nameservice.dir" value="${server.root.dir}/orbd" />
	<property name="server.log.dir" value="${server.root.dir}/log" />
	<property name="server.hostname" value="localhost" />
	<property name="keystore.passwd.corba" value="90fd3498jw03riqdgs4f" />

	<property name="svnadmin.exec" value="svnadmin" />
	<property name="svn.exec" value="svn" />
	<property name="orbd.exec" value="orbd" />

	<property name="xvfb.exec" value="Xvfb" />
	<property name="indexer.heapsize.max" value="800m" />
	<property name="indexer.soffice.path" value="soffice" />
	<property name="indexer.soffice.interruptdelay" value="20000" />
	<property name="indexer.ooffice.screen" value=":0" />
	<property name="indexer.oouno.port" value="1088" />
	<property name="indexer.mimetypes" value="misc/mime.types" />
	<property name="indexer.restartinterval" value="-1" />
	<property name="indexer.auxiliary.dir" value="${server.index.root.dir}" />
	<property name="indexer.loglevel" value="INFO" />
	<property name="indexer.index.name" value="lucene-index" />
	<property name="indexer.svnurl" value="file://${server.project.root.dir}" />
	
	<fileset id="idok.libs.server" dir="">
		<include name="ant_dist/idok.jar" />
		<include name="lib/svnkit.jar" />
		<include name="lib/commons-cli.jar" />
		<include name="lib/lucene-core.jar" />
		<include name="lib/lucene-highlighter.jar" />
		<include name="lib/derby.jar" />
		<include name="lib/javamail.jar" />
		<include name="lib/smtphandler.jar" />
		<include name="lib/org.restlet.ext.jaxrs_0.9.jar" />
		<include name="lib/org.restlet.jar" />
		<include name="lib/com.noelios.reslet.jar" />
		<include name="lib/javax.ws.rs.jar" />
		<include name="lib/org.json.jar" />
	</fileset>

	<fileset id="idok.libs.indexer" dir="">
		<include name="ant_dist/idok.jar" />
		<include name="lib/svnkit.jar" />
		<include name="lib/common.jar" />
		<include name="lib/lucene-core.jar" />
		<include name="lib/PDFBox.jar" />
		<include name="lib/FontBox.jar" />
		<include name="lib/bcprov.jar" />
		<include name="lib/bcmail.jar" />
		<include name="lib/unoil.jar" />
		<include name="lib/ridl.jar" />
		<include name="lib/juh.jar" />
		<include name="lib/jurt.jar" />
		<include name="lib/exif.jar" />
		<include name="lib/tar.jar" />
	</fileset>

	<fileset id="idok.libs.webstart" dir="">
		<include name="ant_dist/idok.jar" />
		<include name="ant_dist/qtgui.jar" />
		<include name="lib/svnkit.jar" />
		<include name="lib/commons-cli.jar" />
		<include name="lib/avalon-framework.jar" />
		<include name="lib/jacorb.jar" />
		<include name="lib/logkit.jar" />
		<include name="lib/qtjambi.jar" />
		<include name="lib/os_jpedal.jar" />
		<include name="lib/PDFRenderer.jar" />
		<include name="lib/qtjambi-win32-gpl.jar" />
		<include name="lib/qtjambi-linux32-gpl.jar" />
		<include name="lib/qtjambi-mac-gpl.jar" />
	</fileset>

	<target name="init-server-dirs"
	        description="create directory structure needed to start the server">
		<mkdir dir="${server.root.dir}" />
		<mkdir dir="${server.authzn.db.dir}" />
		<mkdir dir="${server.authzn.db.backup.dir}" />
		<mkdir dir="${server.index.root.dir}" />
		<mkdir dir="${server.project.root.dir}" />
		<mkdir dir="${server.httpd.conf.dir}" />
		<mkdir dir="${server.nameservice.dir}" />
		<mkdir dir="${server.log.dir}" />
	</target>

	<target name="create-test-project-svn"
	        description="create a subversion test repository using native subverion tools">
		<!-- This task will become obsolete, since the server can create repositories itself 
		
		     The repository created using this task will not have the "schema" subdirectory.
		     The repository created using this task might not have the proper file permissions.
		  -->
		<property name="test.project.name" value="foo" />
		<property name="test.repository.name" value="bar" />

		<property name="test.project.dir"
		          value="${server.project.root.dir}/${test.project.name}" />
		<mkdir dir="${test.project.dir}" />
		<exec executable="${svnadmin.exec}">
			<arg value="create" />
			<arg path="${test.project.dir}/${test.repository.name}" />
		</exec>
		<exec executable="${svn.exec}">
			<arg value="import" />
			<arg path="${idok.basedir}/misc/sample_repository_data" />
			<arg value="file://${test.project.dir}/${test.repository.name}" />
			<arg value="-m" />
			<arg value="Import sample data" />
		</exec>
	</target>

	<target name="create-test-project-idok"
	        description="create a subversion test repository using the idok client">
		<!-- This task does not work correctly, since ant messes up the password entry. 
		     Use the "create-test-project-svn" task instead. -->
		<!-- This task requires a running iDok server. -->
		<property name="test.project.name" value="foo" />
		<property name="test.repository.name" value="bar" />
		<property name="test.project.dir"
		          value="${server.project.root.dir}/${test.project.name}" />

		<antcall target="idok-admin-client">
			<param name="idok-command-line" value="init_auth_db" />
		</antcall>
		<antcall target="idok-admin-client">
			<param name="idok-command-line"
			       value="create_project ${test.project.name} 50" />
		</antcall>
		<antcall target="idok-admin-client">
			<param name="idok-command-line"
			       value="create_repository ${test.project.name} ${test.repository.name}" />
		</antcall>
		<antcall target="idok-client">
			<param name="idok-command-line"
			       value="put -m initial_import -R ${idok.basedir}/misc/sample_repository_data file://${test.project.dir}/${test.repository.name}" />
		</antcall>
	</target>

	<target name="idok-admin-client"
	        description="start idok admin command line client">
		<java classname="ch.idok.cli.DMSAdmin" fork="true">
			<classpath>
				<fileset refid="idok.libs.webstart" />
			</classpath>
			<arg line="${idok-command-line}" />
			<jvmarg line="-Xbootclasspath/p:lib/jacorb.jar:lib/logkit.jar:lib/avalon-framework.jar" />
			<sysproperty key="org.omg.CORBA.ORBClass"
			             value="org.jacorb.orb.ORB" />
			<sysproperty key="org.omg.CORBA.ORBSingletonClass"
			             value="org.jacorb.orb.ORBSingleton" />
			<sysproperty key="org.omg.PortableInterceptor.ORBInitializerClass.bidir_init"
			             value="org.jacorb.orb.giop.BiDirConnectionInitializer" />
			<sysproperty key="ORBInitRef.NameService"
			             value="corbaloc::${server.hostname}:1050/NameService" />
			<sysproperty key="ch.idok.service.client.provider"
			             value="ch.idok.service.client.corba.CorbaClientProvider" />
			<sysproperty key="ch.idok.service.common.keypass"
			             value="${keystore.passwd}" />
		</java>
	</target>

	<target name="idok-client" description="start idok command line client">
		<java classname="ch.idok.cli.DMS" fork="true">
			<classpath>
				<fileset refid="idok.libs.webstart" />
			</classpath>
			<arg line="${idok-command-line}" />
			<jvmarg line="-Xbootclasspath/p:lib/jacorb.jar:lib/logkit.jar:lib/avalon-framework.jar" />
			<sysproperty key="org.omg.CORBA.ORBClass"
			             value="org.jacorb.orb.ORB" />
			<sysproperty key="org.omg.CORBA.ORBSingletonClass"
			             value="org.jacorb.orb.ORBSingleton" />
			<sysproperty key="org.omg.PortableInterceptor.ORBInitializerClass.bidir_init"
			             value="org.jacorb.orb.giop.BiDirConnectionInitializer" />
			<sysproperty key="ORBInitRef.NameService"
			             value="corbaloc::${server.hostname}:1050/NameService" />
			<sysproperty key="ch.idok.service.client.provider"
			             value="ch.idok.service.client.corba.CorbaClientProvider" />
			<sysproperty key="ch.idok.service.common.keypass"
			             value="${keystore.passwd}" />
		</java>
	</target>

	<target name="generate-logging-config"
	        description="generate logging.conf file">
		<echo file="${server.log.dir}/logging.conf">
			handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler 
			java.util.logging.FileHandler.level = ALL
			java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
			java.util.logging.FileHandler.pattern = ${server.log.dir}/dmssd.log
			java.util.logging.FileHandler.limit = 0
			java.util.logging.FileHandler.count = 1
			java.util.logging.FileHandler.append = false
			.level = ALL
			dms.level = ALL
		</echo>
	</target>

	<target name="start-orbd" description="start CORBA naming service">
		<exec dir="${server.nameservice.dir}"
		      executable="${orbd.exec}"
		      output="${server.log.dir}/orbd.out">
			<arg value="-defaultdb" />
			<arg value="${server.nameservice.dir}" />
			<arg value="-ORBInitialPort" />
			<arg value="1050" />
			<arg value="-ORBInitialHost" />
			<arg value="${server.hostname}" />
		</exec>
	</target>

	<target name="start-server-sunorb"
	        depends="generate-logging-config"
	        description="start local iDok server with Sun ORB">
		<java classname="ch.idok.service.server.Daemon"
		      fork="true"
		      output="${server.log.dir}/dmssd.out">
			<jvmarg line="-server" />

			<classpath>
				<fileset refid="idok.libs.server" />
			</classpath>

			<sysproperty key="java.util.logging.config.file"
			             value="${server.log.dir}/logging.conf" />
			<sysproperty key="ch.idok.server.projectRoot"
			             value="${server.project.root.dir}" />
			<sysproperty key="derby.system.home"
			             value="${server.authzn.db.dir}" />
			<sysproperty key="ch.idok.service.admin.backup.dir"
			             value="${server.authzn.db.backup.dir}" />
			<sysproperty key="ch.idok.server.httpdConfDir"
			             value="${server.httpd.conf.dir}" />
			<sysproperty key="ch.idok.service.server.search.lucene.indexdir"
			             value="${indexer.index.name}" />
			<sysproperty key="ch.idok.service.server.search.lucene.repodir"
			             value="${server.index.root.dir}" />
			<sysproperty key="privateKeyPassword"
			             value="VgxfhGau7WL1T4qlD1NE" />
			<sysproperty key="ch.idok.service.servers"
			             value="ch.idok.service.server.rest.RestServer" />
			<!--			<sysproperty key="ch.idok.service.servers"
			             value="ch.idok.service.server.corba.CorbaServer" />
-->
			<sysproperty key="ch.idok.service.provider"
			             value="ch.idok.service.server.ServerProvider" />
			<sysproperty key="ch.idok.service.client.provider"
			             value="ch.idok.service.client.corba.CorbaClientProvider" />
			<sysproperty key="org.omg.CORBA.ORBInitialHost"
			             value="${server.hostname}" />
			<sysproperty key="org.omg.CORBA.ORBInitialPort" value="1050" />
			<sysproperty key="ch.idok.service.common.keypass"
			             value="${keystore.passwd}" />
			<sysproperty key="ch.idok.privateKeyPassword"
			             value="${keystore.passwd.corba}" />
			<sysproperty key="ch.idok.service.server.admin.masterAdminName"
			             value="idokadmin" />
		</java>
	</target>

	<target name="start-server-jacorb"
	        depends="generate-logging-config"
	        description="start local iDok server with JacORB">
		<java classname="ch.idok.service.server.Daemon"
		      fork="true"
		      output="${server.log.dir}/dmssd.out">
			<jvmarg line="-server -Xbootclasspath/p:lib/jacorb.jar:lib/logkit.jar:lib/avalon-framework.jar" />

			<!-- bootclasspath cannot be used since there is no way to tell ant to prepend
			     the specified libs to the default bootclasspath
			
			<bootclasspath>
				<fileset dir="lib">
					<include name="jacorb.jar"/>
					<include name="logkit.jar"/>
					<include name="avalon-framework.jar"/>
				</fileset>
			</bootclasspath>
			-->

			<classpath>
				<fileset refid="idok.libs.server" />
			</classpath>

			<sysproperty key="java.util.logging.config.file"
			             value="${server.log.dir}/logging.conf" />
			<sysproperty key="ch.idok.server.projectRoot"
			             value="${server.project.root.dir}" />
			<sysproperty key="derby.system.home"
			             value="${server.authzn.db.dir}" />
			<sysproperty key="ch.idok.service.admin.backup.dir"
			             value="${server.authzn.db.backup.dir}" />
			<sysproperty key="ch.idok.server.httpdConfDir"
			             value="${server.httpd.conf.dir}" />
			<sysproperty key="ch.idok.service.server.search.lucene.indexdir"
			             value="${indexer.index.name}" />
			<sysproperty key="ch.idok.service.server.search.lucene.repodir"
			             value="${server.index.root.dir}" />
			<sysproperty key="privateKeyPassword"
			             value="VgxfhGau7WL1T4qlD1NE" />
			<sysproperty key="ch.idok.service.servers"
			             value="ch.idok.service.server.corba.CorbaServer" />
			<sysproperty key="ch.idok.service.provider"
			             value="ch.idok.service.server.ServerProvider" />
			<sysproperty key="ch.idok.service.client.provider"
			             value="ch.idok.service.client.corba.CorbaClientProvider" />
			<sysproperty key="org.omg.CORBA.ORBClass"
			             value="org.jacorb.orb.ORB" />
			<sysproperty key="org.omg.CORBA.ORBSingletonClass"
			             value="org.jacorb.orb.ORBSingleton" />
			<sysproperty key="org.omg.PortableInterceptor.ORBInitializerClass.bidir_init"
			             value="org.jacorb.orb.giop.BiDirConnectionInitializer" />
			<sysproperty key="ORBInitRef.NameService"
			             value="corbaloc::${server.hostname}:1050/NameService" />
			<sysproperty key="ch.idok.service.common.keypass"
			             value="${keystore.passwd}" />
			<sysproperty key="ch.idok.privateKeyPassword"
			             value="${keystore.passwd.corba}" />
			<sysproperty key="ch.idok.service.server.admin.masterAdminName"
			             value="idokadmin" />
		</java>
	</target>

	<target name="sign-all-jars"
	        description="sign all jar files for Java webstart">
		<!-- Delete existing signatures in all lib/*.jar files -->
		<exec executable="/bin/bash">
			<arg value="-c" />
			<arg value="for j in lib/*.jar; do echo $j; zip -d $j 'META-INF/INDEX.LIST' 'META-INF/*.MF' 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*.DSA'; done" />
		</exec>
		<!-- Delete existing signatures in all ant_dist/*.jar files -->
		<exec executable="/bin/bash">
			<arg value="-c" />
			<arg value="for j in ant_dist/*.jar; do echo $j; zip -d $j 'META-INF/INDEX.LIST' 'META-INF/*.MF' 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*.DSA'; done" />
		</exec>
		<signjar alias="jarsign"
		         storepass="${keystore.passwd}"
		         keystore="${keystore.file}">
			<fileset refid="idok.libs.webstart" />
		</signjar>
	</target>

	<target name="generate-keystore"
	        description="generate keys for signing and encryption">
		<!-- Generate keystore containing keypair for signing jar files -->
		<delete file="${keystore.file}" />
		<genkey keystore="${keystore.file}"
		        storepass="${keystore.passwd}"
		        alias="jarsign"
		        keyalg="RSA"
		        validity="700"
		        dname="CN=iDok project, OU=Unknown, O=idok.ch, L=Unknown, ST=Unknown, C=CH" />
		<!-- Generate keystore containing keypair for CORBA -->
		<genkey keystore="${keystore.file}"
		        storepass="${keystore.passwd}"
		        alias="dms_corba"
		        keypass="${keystore.passwd.corba}"
		        keyalg="RSA"
		        validity="700"
		        dname="CN=iDok project, OU=Unknown, O=idok.ch, L=Unknown, ST=Unknown, C=CH" />
	</target>

	<target name="start-xvfb"
	        description="start the virtual X server used by openoffice">
		<exec executable="${xvfb.exec}">
			<arg line="-nolisten tcp -ac ${indexer.ooffice.screen}" />
		</exec>
	</target>

	<target name="start-indexer" description="start the idok indexer daemon">
		<java classname="ch.idok.dmsd.main.Daemon"
		      output="${server.log.dir}/indexer.out"
		      fork="true">
			<classpath>
				<fileset refid="idok.libs.indexer" />
			</classpath>
			<jvmarg line="-server -XX:NewRatio=2 -Xmx${indexer.heapsize.max}" />
			<sysproperty key="ch.idok.dmsd.impl.extractor.microsoft.screen"
			             value="${indexer.ooffice.screen}" />
			<sysproperty key="ch.idok.dmsd.impl.extractor.microsoft.unoport"
			             value="${indexer.oouno.port}" />
			<sysproperty key="ch.idok.dmsd.impl.mimetypes"
			             value="${indexer.mimetypes}" />
			<sysproperty key="ch.idok.dmsd.config.logFile"
			             value="${server.log.dir}/indexer.log" />
			<sysproperty key="ch.idok.dmsd.impl.controller.restartinterval"
			             value="${indexer.restartinterval}" />
			<sysproperty key="ch.idok.dmsd.impl.config.svnlucene.auxdir"
			             value="${server.index.root.dir}" />
			<sysproperty key="ch.idok.dmsd.impl.extractor.microsoft.soffice"
						 value="${indexer.soffice.path}" />
			<sysproperty key="ch.idok.dmsd.impl.extractor.microsoft.interruptdelay"
			             value="${indexer.soffice.interruptdelay" />
			<arg line="daemon ${indexer.loglevel} ch.idok.dmsd.impl.config.svnlucene.Config" />
			<arg file="${server.project.root.dir}" />
			<arg line="${indexer.index.name} last-indexed-version all ${indexer.svnurl}" />
		</java>
	</target>

</project>



Archive powered by MHonArc 2.6.19.

Top of Page