I have attached lsc.xml file.

Mike

On Mon, Jul 22, 2019 at 9:27 PM Mike Hollingsworth <
mhollingswo...@mconsult.us> wrote:

> Thanks for the help , that worked but received this error.
>
> Jul 22 21:25:02 - WARN  - Error while looking for the entries list:
> java.sql.SQLException: S1000 General error java.lang.RuntimeException:
> database alias does not exist
> Jul 22 21:25:02 - ERROR - Empty or non existant source (no IDs found)
> Jul 22 21:25:02 - INFO  - Starting clean for MySyncTask
> Jul 22 21:25:03 - WARN  - Error while looking for a specific entry with
> id=cn=avaables02,ou=2026,ou=Students,dc=local,dc=mcschools,dc=us
> (java.sql.SQLException: S1000 General error java.lang.RuntimeException:
> database alias does not exist)
> Jul 22 21:25:03 - ERROR - Error while synchronizing ID {}:
> org.lsc.exception.LscServiceException: javax.naming.CommunicationException:
> S1000 General error java.lang.RuntimeException: database alias does not
> exist
> Jul 22 21:25:03 - ERROR - Connection lost! Aborting.
>
> On Thu, Jul 18, 2019 at 7:34 AM Soisik Froger <soisik.fro...@worteks.com>
> wrote:
>
>> On 17/07/2019 13:54, Mike Hollingsworth wrote:
>> > Here are the xml files. I will run again once I change the log file
>> location
>> >
>> > On Wed, Jul 17, 2019 at 2:00 AM Soisik Froger <
>> soisik.fro...@worteks.com <mailto:soisik.fro...@worteks.com>> wrote:
>> >
>> >     On 16/07/2019 21:04, Mike Hollingsworth wrote:
>> >     > We are using on ubuntu server with openldap and receive this error
>> >     > Connecting to LDAP server
>> ldap://mcsd-ds01:389/dc=local,dc=mcschools,dc=us as
>> cn=admin,dc=local,dc=mcschools,dc=us
>> >     > Jul 16 13:58:43 - ERROR -
>> org.lsc.exception.LscConfigurationException: Configuration exception:
>> Something bad happened while building the SqlMapClient
>> instance.java.lang.RuntimeException: Error occurred.  Cause:
>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
>> Cause: java.net.UnknownHostException: etc
>> >     > /usr/bin/lsc: line 73: /var/log/lsc/lsc.log: Permission denied
>> >     >
>> >     > Thanks
>> >     >
>> >     > Mike Hollingsworth
>>
>> Hi,
>>
>> Seems etc/ get resolved as a host, eg the URL syntax:
>> protocol://hostname/file
>>
>> Maybe try this :
>> <sqlMap url="file:///etc/lsc/sql-map-config.d/InetOrgPerson.xml"/>
>>
>> Regards
>> --
>> Soisik Froger | Software Architect
>>
>> soisik.fro...@worteks.com
>>
>> Worteks | https://www.worteks.com
>> _______________________________________________________________
>> Ldap Synchronization Connector (LSC) - http://lsc-project.org
>>
>> lsc-users mailing list
>> lsc-users@lists.lsc-project.org
>> https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users
>
>
<?xml version="1.0" ?>
<!-- 
	In the following file, comments are describing each node. Elements are
	referenced through XPath expression, whereas attributes are prefixed with
	'@'

	//lsc Root node of the XML configuration file
	@xmlns XML Schema validation is not ready yet (Reserved for futur use)
	@id optional, added by XML API
	@revision mandatory, used by the Web Administration Interface to version
				this file
	 -->
<lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.1.xsd"; revision="0">

<!--  ./connections Connections list node, must contain at least two connections -->
 
  <connections>

<!--  
	./connection Connection node, include definition of the required parameters.
					Depending on the connection type, properties vary.
		   			Existing class type are : ldapConnection, databaseConnnection
		   			Plugins also provides : nisConnection, jndiExecDstConnection
--> 
    <databaseConnection>
<!--  ./name identify the connection according to its node number, used in the 
					service node to specify the source or destination connection -->
      <name>hsqldb-source-conn</name>
<!--  ./url mandatory, the JDBC URL -->
<!--      <url>jdbc:hsqldb:file:/tmp/lsc/hsqldb/lsc</url> -->
      <url>jdbc:hsqldb:hsql://localhost/csvdata</url>
<!--  ./username mandatory, the JDBC username -->
      <username>sa</username>
<!--  ./password mandatory, the JDBC credential -->
      <password></password>
<!--  ./driver mandatory, the Java classname to use as JDBC driver -->
      <driver>org.hsqldb.jdbcDriver</driver>
<!--  ./otherSettings optional, may contain the list of complementary values, passed to the JDBC driver
	  <otherSettings>
	  	<entry><key><value></entry>
	  </otherSettings> -->
    </databaseConnection>
 
    <ldapConnection>
      <name>ldap-mcsd-ds01</name>
      <url>ldap://mcsd-ds01:389/dc=local,dc=mcschools,dc=us</url>
      <username>cn=admin,dc=local,dc=mcschools,dc=us</username>
      <password>password!</password>
      <authentication>SIMPLE</authentication>
      <referral>IGNORE</referral>
      <derefAliases>NEVER</derefAliases>
      <version>VERSION_3</version>
      <pageSize>-1</pageSize>
      <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
      <tlsActivated>false</tlsActivated>
    </ldapConnection>

  </connections>

<!--  ./audits Audits list node -->
  <audits>

<!--./audit Audit node, here a CSV audit, may also be a LDIF or any contributed audit type -->
	<csvAudit>
<!--    ./name mandatory, audit name -->
		<name>csv</name>
<!--    ./append optional, default to false, specify to create a new log file or to append to the existing one  -->
		<append>true</append>
<!--    ./operations optional, comma separated list of operations (create, delete, update or rename) -->
		<operations>create, delete</operations>
<!--	./file mandatory, define the location of the file where the CSV data will be written -->
		<file>/tmp/dump.csv</file>
<!--    ./datasets optional, comma separated list of datasets modification to log -->
		<datasets>cn, dn</datasets>
<!--    ./separator optional, default to ";", specify the values separator -->
		<separator>,</separator>
	</csvAudit>
  </audits>

<!--  ./tasks Task list node, must contain at least one task -->
  <tasks>

<!--  ./task Task node, this is the main node, in which synchronization is defined -->
    <task>
<!--  ./name mandatory task node this is the main node, in which synchronization is defined -->
      <name>MySyncTask</name>
<!--  ./bean optional bean node, default to org.lsc.beans.SimpleBean, define the pivot object used to store datasets and values -->
      <bean>org.lsc.beans.SimpleBean</bean>
<!--  ./sourceService mandatory node containing definition of the source service settings  
			possible builtin types are :
				databaseSourceService, ldapSourceService 
					Plugins also provides: syncreplSourceService, nisSourceService
		-->
      <databaseSourceService>
<!-- 	A database source service will have to contain at least a name, a connection reference, a request for listing available objects,
			and a request to get a complete object from its ids -->
        <name>hsqldb-source-service</name>
        <connection reference="hsqldb-source-conn" />
<!--	./requestNameForList mandatory node providing the SQL request name to list available objects in the data source -->
        <requestNameForList>getInetOrgPersonList</requestNameForList>
<!--	./requestNameForNextId this optional node may be provided to enable a asynchronous mode of the datasource. If provided, this request will be
				called to get the next updated id. This request may return nothing and LSC will wait until the next modification or its own stop
        <requestNameForNextId>mandatory but not used yet</requestNameForNextId> -->
<!--	./requestNameForObject mandatory node providing the SQL request name to get the full object according to the datasets identifying it uniquely -->
        <requestNameForObject>getInetOrgPerson</requestNameForObject>
<!--	./requestNameForClean optional node providing the SQL request name to check that the object still exissts. If not it will be deleted -->
        <requestNameForClean>checkPersonForClean</requestNameForClean>
      </databaseSourceService>
<!--  ./destinationService mandatory node containing definition of the source service settings  
			@class define the implementation, possible builtin types are :
				databaseDestinationService, ldapDestinationService 
					Plugins also provides: jndiExecDstService
		-->
      <ldapDestinationService>
<!-- 	A ldap destination service will have to contain at least a name, a connection reference, a base DN, a filter to list
			entries, a filter to get a particular entry, a list of pivot attributes and a list of fetched attributes -->
        <name>ldap-dst-service</name>
        <connection reference="ldap-mcsd-ds01" />
<!--	./baseDn This mandatory node provide the directory base branch that will be used to look for entries (list and get) -->
        <baseDn>dc=local,dc=mcschools,dc=us</baseDn>
<!--	./pivotAttributes This mandatory node must include string nodes with attributes name that will be used with their values 
			as pivot datasets (used to get the corresponding entry and to identify the counter-part object, here in the source database
			used during the clean phase to delete the corresponding entry if no corresponding object is found)-->
        <pivotAttributes>
          <string>username</string>
        </pivotAttributes>
<!--	./fetchedAttributes This mandatory node must include string nodes with attributes name that will fill the full object.
			In a LDAP destination service, fetched attributes will be written to the target directory, whereas source provided datasets
			that are not listed their will silently be canceled, i.e. not synchronized with the directory. -->
        <fetchedAttributes>
          <string>cn</string>
	  <string>givenName</string>
          <string>sn</string>
          <string>userPassword</string>
          <string>objectClass</string>
          <string>uid</string>
        </fetchedAttributes>
<!--	./getAllFilter This mandatory node must include the filter that will be used to list all target objects. In a LDAP destination service
					this value is used during the clean phase to look for every object that it has a corresponding object in the source database -->
        <getAllFilter>(objectClass=inetorgperson)</getAllFilter>
<!--	./getOneFilter This mandatory node must include the filter that will be used to get a particular entry. In a LDAP destination service
					this value is used during the synchronization phase to get the object - in conjonction with fetchedAttributes to synchronize them -->
        <getOneFilter>(&amp;(objectClass=inetorgperson)(username={username}))</getOneFilter>
      </ldapDestinationService>
<!--  ./syncOptions This mandatory node describes how to handle the various situations encountered while synchronizing datasets.
			It must contains a main identifier construction rule and a default policy.
			It may contains synchronization conditions, a default delimiter and datasets synchronization rules (attribute nodes) -->
      <propertiesBasedSyncOptions>
<!--    ./mainIdentifier This mandatory node must contain a string Javascript expression that will enforce the object main identifier.-->
        <mainIdentifier>"cn=" + srcBean.getDatasetValueById("uid") + ",ou=Students,dc=local,dc=mcschools,dc=us"</mainIdentifier>
<!--    ./defaultDelimiter This mandatory node must contain a string Javascript expression that will enforce the object main identifier.-->
        <defaultDelimiter>;</defaultDelimiter>
<!--    ./defaultPolicy This mandatory node must contain a string Javascript expression that will enforce the object main identifier.-->
        <defaultPolicy>FORCE</defaultPolicy>
<!--    ./conditions This optional node may contain one or more of the four node : create, update, delete and changeId -->
        <conditions>
<!--       ./create This optional node may contain a boolean Javascript expression that will indicate whenever a new entry must be created or not -->
        	<create>true</create>
<!--       ./update This optional node may contain a boolean Javascript expression that will indicate whenever a existing entry must be updated or not -->
        	<update>true</update>
<!--       ./delete This optional node may contain a boolean Javascript expression that will indicate whenever a existing entry must be deleted or not -->
        	<delete>true</delete>
<!--       ./changeId This optional node may contain a boolean Javascript expression that will indicate whenever an existing object main identifier must be changed or not -->
        	<changeId>false</changeId>
        </conditions>
<!--    ./dataset This multi-valued node may contain a structure that will describe how to synchronize the corresponding dataset -->
        <dataset>
<!--      ./name Mandatory node containing the dataset name -->
          <name>objectClass</name>
<!--      ./policy Mandatory node containing the policy to apply to this dataset. Contains KEEP, FORCE or MERGE value -->
          <policy>KEEP</policy>
<!--      ./defaultValues Optional node containing a list of string values that will be used if noone is provided by datasource -->
          <defaultValues></defaultValues>
<!--      ./forceValues Optional node containing a list of string values that will be used to force destination service dataset values -->
          <forceValues></forceValues>
<!--      ./createValues Optional node containing a list of string values that will be used to force destination service dataset values when creating object -->
          <createValues>
            <string>"user"</string>
            <string>"top"</string>
          </createValues>
<!--      ./delimiter Used when multiples values are provided in a single joined value -->
          <delimiter>,</delimiter>
        </dataset>
<!--    <dataset>
          <name>userPassword</name>
          <policy>KEEP</policy>
          <defaultValues>
            <string>"changethis"</string>
          </defaultValues>
          <forceValues></forceValues>
          <createValues></createValues>
	</dataset> -->
      </propertiesBasedSyncOptions>
    </task>
  </tasks>
<!-- ./security This mandatory node contains the security settings used by LSC -->
  <security>
<!-- ./encryption This optional node contains the encryption settings -->
    <encryption>
<!--  ./keyfile This optional node contains the keyfile location -->
      <keyfile>etc/lsc.key</keyfile>
<!--  ./algorithm This optional node contains the encryption algorithm -->
      <algorithm>AES</algorithm>
<!--  ./strength This optional node contains the algorithm key length -->
      <strength>128</strength>
    </encryption>
  </security>
</lsc>
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
lsc-users@lists.lsc-project.org
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to