About Syncpe Demo and tomcat

27 views
Skip to first unread message

Natan

unread,
Feb 8, 2012, 5:54:45 AM2/8/12
to syncope-users
Hi,

It's a couple of days I'm trying to play with Syncope starting from
the demo downloadable from http://wiki.syncope-idm.org/index.php?title=GettingStarted/Demo

I was able to propagate events from the console to the connected
systems, paying particular attention to the passwords. In my opinion
there is a lack of documentation about the difference between the
Propagation and Synchronization task. I had to figure out the meaning
by myself. Starting from scratch it is not so clear that the
propagation panel is populated automatically as result of connectors
events or rest calls to the engine.
I would suggest to build a vmx instead of an ova, too. Because it's
easy to find places where they are using VMware instead of VirtualBox.
Moreover, converting an ova to a vmx it is not a procedure so simple/
fast. If you have to do it, the only way to obtain a converted image
is to make use of --lax option and compile by yourself the VMware
tools.

However I'm writing this message only to inform that if you restart
the tomcat shipped in the demo using /etc/init.d/tomcat restart it
will not work. You have to modify the tomcat script as described here
https://bugs.launchpad.net/ubuntu/+source/tomcat6/+bug/632554

inserting -p "$CATALINA_PID"

Hope it helps

Francesco Chicchiriccò

unread,
Feb 8, 2012, 7:17:19 AM2/8/12
to syncop...@googlegroups.com
On 08/02/2012 11:54, Natan wrote:
Hi,

   It's a couple of days I'm trying to play with Syncope starting from
the demo downloadable from http://wiki.syncope-idm.org/index.php?title=GettingStarted/Demo

I was able to propagate events from the console to the connected
systems, paying particular attention to the passwords. In my opinion
there is a lack of documentation about the difference between the
Propagation and Synchronization task. I had to figure out the meaning
by myself. Starting from scratch it is not so clear that the
propagation panel is populated automatically as result of connectors
events or rest calls to the engine.

Hi Natan,
first of all, thanks for your feedback.

About explaining what's the difference between propagation and synchronization, there is a theory draft at [1].
I agree that something more practical (like as you are writing above) should be added to the getting started demo wiki page.

I've opened an issue for this [2].


I would suggest to build a vmx instead of an ova, too. Because it's
easy to find places where they are using VMware instead of VirtualBox.
Moreover, converting an ova to a vmx it is not a procedure so simple/
fast. If you have to do it, the only way to obtain a converted image
is to make use of  --lax option and compile by yourself the VMware
tools.

There is no doubt that VMWare is more adopted than VirtualBox: however, VirtualBox is freely available and can be easily downloaded for a quick demo :-)


However I'm writing this message only to inform that if you restart
the tomcat shipped in the demo using /etc/init.d/tomcat restart it
will not work. You have to modify the tomcat script as described here
https://bugs.launchpad.net/ubuntu/+source/tomcat6/+bug/632554

inserting -p "$CATALINA_PID"

Hope it helps

I've opened an issue for this [3].

Again, thanks for your interest in Syncope!

Regards.

[1] http://wiki.syncope-idm.org/index.php?title=ConnectorInstancesAndResources
[2] http://code.google.com/p/syncope/issues/detail?id=286
[3] http://code.google.com/p/syncope/issues/detail?id=287
-- 
Francesco Chicchiriccò

"Computer Science is no more about computers than astronomy
is about telescopes." (E. W. Dijkstra)

Natan

unread,
Feb 8, 2012, 10:34:30 AM2/8/12
to syncope-users
So, I tried to extend the demo in order to achieve an interesting
administrative user experience. I defined a synchronization task for
the mysql db. Unfortunately the SyncopeDemo db is not ready to publish
events so I ran these script on mysql

mysql -p
password

use syncopedemo

ALTER TABLE `user` ADD `modifyNumber` BIGINT DEFAULT 0;

DELIMITER //

CREATE TRIGGER trackmodifies_user BEFORE UPDATE ON user
FOR EACH ROW
BEGIN
SET NEW.modifyNumber = OLD.modifyNumber + 1;
END
//

DELIMITER ;

exit

Just to have an autoupdate where I can do a synchronization check

It should work fine (I suggest to avoid the timestamps, connid seems
to refuse what is not a "long" java type as synchronization column)

I modified the JDBC connector too, on the properties panel

Change Log Column (Sync) = modifyNumber

Trying the synchronization task, syncope says SUCCESS but on the
details I can read
Failed to update: UPDATE FAILURE (id/ name): 201/ test02
UPDATE FAILURE (id/ name): 401/ test04
UPDATE FAILURE (id/ name): 351/ test03

The core logs say

15:48:02.325 ERROR org.syncope.core.scheduling.AbstractJob - Could not
update user test02
java.lang.NullPointerException: null
at
org.syncope.core.rest.data.AbstractAttributableDataBinder.fill(AbstractAttributableDataBinder.java:
482) ~[AbstractAttributableDataBinder.class:na]
at
org.syncope.core.rest.data.UserDataBinder.update(UserDataBinder.java:
277) ~[UserDataBinder.class:na]
....

It seems I am facing an issue like this one:
http://code.google.com/p/syncope/issues/detail?id=265

Indeed the demo vm is a 0.7 version.

If I am right, is there any best practice to update the demo to the
last release? Should I only rerun maven archetype / clean / package?

Please, can you help me in getting through this procedure? It would be
very great to reuse all the stuff you have already packaged in the
demo.

Thanks in advance

On Feb 8, 1:17 pm, Francesco Chicchiriccò <chicchiri...@gmail.com>
wrote:
> On 08/02/2012 11:54, Natan wrote:
>
> > Hi,
>
> >    It's a couple of days I'm trying to play with Syncope starting from
> > the demo downloadable fromhttp://wiki.syncope-idm.org/index.php?title=GettingStarted/Demo
> [1]http://wiki.syncope-idm.org/index.php?title=ConnectorInstancesAndReso...
> Francesco Chicchiricc�

Francesco Chicchiriccò

unread,
Feb 8, 2012, 10:46:48 AM2/8/12
to syncop...@googlegroups.com
On 08/02/2012 16:34, Natan wrote:
> So, I tried to extend the demo in order to achieve an interesting
> administrative user experience. I defined a synchronization task for
> the mysql db. Unfortunately the SyncopeDemo db is not ready to publish
> events so I ran these script on mysql
> [...]

All this sounds very good: you seem to start getting into Syncope ;-)

> If I am right, is there any best practice to update the demo to the
> last release? Should I only rerun maven archetype / clean / package?

Just find <syncope.version> property in your parent pom.xml and put
0.7.1 instead of 0.7, then rebuild and redeploy.


> Please, can you help me in getting through this procedure? It would be
> very great to reuse all the stuff you have already packaged in the
> demo.
>
> Thanks in advance

You're welcome :-)

--
Francesco Chicchiricc�

Reply all
Reply to author
Forward
0 new messages