crowd synchronization events are written to which logfile
Asked by werner kolze:

A crowd full synchronisation, executed for the first time, should, IMO, record some messages into a logfile.

I am monitoring a logfile in ( this is a RHEL 7 instance )

/home/admin/logs/

<br />

the file is called: atlassian-crowd.log

There are no entries in that file though, not for a full Sync and not for an incremental sync.  

Where could I find the error messages ( if any ) ?

Or, do I need to increase the error log levels within Crowd, under the "Logging \& profiling" config page? If so , which of the 10 classes/packages need which level of error logging though?

<br />

thanks in advance

Werner


Answers:
author: Bruno Vincent
body: Hi [@werner kolze](/t5/user/viewprofilepage/user-id/892267)

Which synchronisation are you actually talking about?

If you mean **Crowd synchronising** users and groups **from a remote directory** like Active Directory, then you should actually see synchronisation details in ***\<crowd.home\>**/logs/atlassian-crowd.log*

```
2018-02-16 12:20:55,932 Caesium-2-1 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] FULL synchronisation complete for directory [ 98306 ] in [ 1476ms ]
```

If you mean **Jira/Confluence/etc. synchronising** users and groups **from Crowd** , then you won't see anything in *\<crowd.home\>/logs/atlassian-crowd.log* . You have to check your Jira/Confluence/etc. log file, for instance ***\<jira.home\>**/log/atlassian-jira.log*

```
2018-02-16 12:17:07,534 Caesium-1-4 INFO      [c.a.crowd.directory.DbCachingRemoteDirectory] FULL synchronisation complete for directory [ 10000 ] in [ 8423ms ]
```

comments: author: werner kolze
body: hi [@Bruno Vincent](/t5/user/viewprofilepage/user-id/853568)

yes, I mean **Crowd synchronising** users and groups **from a remote directory.**

And no, I cannot see any synchronisation details in ***\<crowd.home\>*** /logs/atlassian-crowd.log - whilst the synchronisation takes place. And that was my point - I cannot "watch" the log getting written to , WHILST the synchronisation takes place.  
The logfile gets updated a little while after the event is finished.

Sorry for not being precise enough when I logged the call.

thank you for the clarifications


author: Marcin Kempa
body: Hi [@werner kolze](/t5/user/viewprofilepage/user-id/892267)

What type of directory is it?

Normally when synchronization is happening, Crowd logs this attempt and its result.

So you should see something like:

```
2018-02-18 22:58:20,000 Caesium-1-4 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] FULL synchronisation for directory [ 12345 ] starting
```

As you've mentioned that there are some entries in the log that are stored before or after the synchronization, would you mind posting them here? If those contain any fragile information, we can open a support ticket for you.

Also could you elaborate more, what do you need those entries for? Is it only for some kind of diagnosis?

Best Regards,

Marcin Kempa


author: Marcin Kempa
body: Hi [@werner kolze](/t5/user/viewprofilepage/user-id/892267),

You shouldn't have to increase any logging level to get log entries about synchronization completed and about error status if synchronization failed.

The sample output for a full synchronization looks like this:

```
2018-02-15 05:53:55,401 Caesium-2-3 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] FULL synchronisation complete for directory [ 819202 ] in [ 97635ms ]
```

and as you can see it is logged on INFO level (same would be for failed synchronizations).

You've mentioned that your log does not have any entries. This is strange as Crowd logs many events during startup and also on regular basis.

Have you changed the default log4j configuration in Crowd or maybe you've changed that in the UI? Does the user running Crowd have the permissions to write to log file?

Maybe apache tomcat catalina.out have some info about what might be the issue.

Also it would be helpful to know the version of Crowd you are running.

Please let me know if you have further questions about this problem. I will be happy to help you.

Best Regards,

Marcin Kempa

comments: author: werner kolze
body: Hi Marcin, thanks for your reply.

Sorry I forgot to add the Crowd version, it is 3.1.2

I looked at the catalina.out, but also nothing about synchronisation details.

And this is what I am actually after - the synchronisation logging - all other errors, debugs and info are probably there, I say probably, because there are a few entries in th elogfile - but not as frequent and elaborate as I would have thought.

I run a command to show me the last 60 entries in the logfile and update this every 2 seconds - like so

watch -n 2 tail -n 60 /crowd-home/logs/atlassian-crowd.log

But when it does a synch, it does not show any log entries.

I did make no changes to the levels of logging and made no changes to the log4j configuration. As I want to keep all setting as much standard as possible to allow easier upgrading paths.

I hope this helps

cheers


Tags: log

sync