pombreda / google-calendar-connectors

Automatically exported from code.google.com/p/google-calendar-connectors
0 stars 0 forks source link

Error: (400) Bad Request in Sync #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Every time sync runs all my users show an error: (400) Bad Request.

What is the expected output? What do you see instead?
Successful syncing.

What version of the product are you using? On what operating system?
v1.3 on Windows Server 2003 with Exchange 2003.

Please provide any additional information below.

010-05-03 11:38:10,406 [Sentinel Thread] ERROR 
Google.GCalExchangeSync.Library.FreeBusyServiceWebDAV - Creating free/busy 
message for: 
http://testserver1.test.local/public/NON_IPM_SUBTREE/SCHEDULE%2B%20FREE%20BUSY/E
X:_xF8F
F_o=TEST%20Org_xF8FF_ou=First%20Administrative%20Group/USER-
_xF8FF_cn=Recipients_xF8FF_cn=fguy.EML failed
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Google.GCalExchangeSync.Library.WebDav.XmlRequestImpl.IssueRequest(String url, Method 
method, String body, HttpHeader[] headers)
   at Google.GCalExchangeSync.Library.WebDav.WebDavQuery.IssueRequestIgnoreResponse(String 
url, Method method, String body, HttpHeader[] headers)
   at Google.GCalExchangeSync.Library.FreeBusyServiceWebDAV.CreateFreeBusyMessage(String 
targetUrl, String targetUsername, List`1 busyMonths, List`1 busyDailyData, 
List`1 
tentativeMonths, List`1 tentativeDailyData, String startDate, String endDate)
2010-05-03 11:38:10,406 [Sentinel Thread] INFO  
Google.GCalExchangeSync.Library.Util.BlockTimer - [Timer] - WriteFreeBusy - 
Total Execution 
Time: 359 ms.
2010-05-03 11:38:10,406 [Sentinel Thread] ERROR 
Google.GCalExchangeSync.Library.GCalSyncProcess - Error occured while executing 
sync process 
for user 'fguy@srcasm.com'. [running error count=4]
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Google.GCalExchangeSync.Library.WebDav.XmlRequestImpl.IssueRequest(String url, Method 
method, String body, HttpHeader[] headers)
   at Google.GCalExchangeSync.Library.WebDav.WebDavQuery.IssueRequestIgnoreResponse(String 
url, Method method, String body, HttpHeader[] headers)
   at Google.GCalExchangeSync.Library.FreeBusyServiceWebDAV.CreateFreeBusyMessage(String 
targetUrl, String targetUsername, List`1 busyMonths, List`1 busyDailyData, 
List`1 
tentativeMonths, List`1 tentativeDailyData, String startDate, String endDate)
   at Google.GCalExchangeSync.Library.SchedulePlusFreeBusyWriter.SyncUser(ExchangeUser user, 
EventFeed googleAppsFeed, ExchangeService exchangeGateway, DateTimeRange window)
   at Google.GCalExchangeSync.Library.GCalSyncProcess.SyncUsers()

Original issue reported on code.google.com by jmiddle...@gmail.com on 3 May 2010 at 3:46

GoogleCodeExporter commented 9 years ago
Is your public folder server is same as Exchange server ? If not then you have 
to
specify the Public folder server name in FreeBusyServerName parameter.

Which Exchange Server are you using ?

Original comment by jaideepg...@google.com on 3 May 2010 at 4:55

GoogleCodeExporter commented 9 years ago
Yep, they are the same server.  This is a brand new test Exchange environment.  
The same server is my AD, Exchange and F/B.  This is my config as 
well:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <appSettings>
    <!-- Active Directory -->
    <!-- "ActiveDirectory.DomainController" is a semicolon sepated list of LDAP servers -->
    <add key="ActiveDirectory.DomainController" value="LDAP://testserver1.test.local" />
    <add key="ActiveDirectory.DomainUser.Login" value="exadminuser@test.local" />
    <add key="ActiveDirectory.DomainUser.Password" value="1234" />
    <!-- Exchange -->
    <add key="Exchange.ServerName" value="http://testserver1.test.local" />
    <add key="Exchange.GCalQueryAdmin.Login" value="administrator@test.local" />
    <add key="Exchange.GCalQueryAdmin.Password" value="1234" />
    <!-- Specify a different user calendar URI's trailing path. Usually, an Exchange user calendar's URL is 
http://<server>/exchange/<email>/calendar but in some localized
         Exchange environments, the last URI may be localized (the 'calendar' part). In such
         cases, initialize with the corrected value -->
    <!-- <add key="Exchange.MailboxURITrailingPath" value="calendar"/> -->
    <!-- Specify a different exchange server to use for Free Busy Write -->
    <add key="Exchange.FreeBusyServerName" value="http://testserver1.test.local" />
    <!-- Google Apps -->
    <add key="GoogleApps.DomainName" value="srcasm.com" />
    <add key="GoogleApps.AdminUser.Login" value="googleadmin" />
    <add key="GoogleApps.AdminUser.Password" value="1234" />
    <add key="GoogleApps.GCal.EnableHttpCompression" value="true" />
    <!-- Log XML Traffic -->
    <!-- <add key="GoogleApps.GCal.LogDirectory" value=""/> -->
    <!-- Domain Mapping -->
    <!-- <add key="GoogleApps.GCal.DomainMapping" value="ExternalDomain,LocalDomain"/> -->
    <!-- Default Domain - restrict exchange redirects to this domain -->
    <!-- <add key="Exchange.DefaultDomain" value=".corp.domain"/> -->
    <!-- GCalSync Windows Service -->
    <add key="SyncService.ErrorCountThreshold" value="20" />
    <add key="SyncService.LDAPUserFilter" value="" />
    <add key="SyncService.RefreshTimeInMinutes" value="5" />
    <add key="SyncService.ThreadCount" value="1" />
    <add key="SyncService.XmlStorageDirectory" value="C:\Google\data" />
    <!-- Directory service search timeout value. Units in seconds. -->
    <add key="SyncService.DirectorySearch.TimeoutInSeconds" value="300" />
    <!-- GCal Sync Windows Service: Free/Busy Settings -->
    <add key="SyncService.FreeBusy.Writer" value="SchedulePlus" />
    <add key="Configuration.EncryptOnNextRun" value="false" />
    <!-- Free/Busy detail level settings -->
    <!-- Setting it to Full enables distinguishing between tentative and busy in the Free Busy lookups -->
    <!-- Setting it to Basic treats tentative and busy as busy in the Free Busy lookups -->
    <add key="SyncService.FreeBusy.DetailLevel" value="Full" />
    <!-- Customize Appointment placeholder message text -->
    <!-- <add key="SyncService.PlaceHolderMessage" value="GCal Free/Busy Placeholder" /> -->
    <!-- <add key="SyncService.SyncAppointmentDetails" value="true" /> -->
  </appSettings>
  <log4net debug="true">
    <!-- Appenders -->
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="C:\Google\logs\SyncService.log" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="5000KB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
      </layout>
    </appender>
    <!-- Loggers -->
    <root>
      <level value="DEBUG" />
      <appender-ref ref="RollingLogFileAppender" />
    </root>
  </log4net>
  <!-- NetTrace Debugging Options -->
  <!--
    <system.diagnostics>
        <trace autoflush="true" />
        <sources>
            <source name="System.Net">
              <listeners>
                <add name="TraceFile" />
              </listeners>
            </source>  
        </sources>
        <sharedListeners>
            <add
              name="TraceFile"
              type="System.Diagnostics.TextWriterTraceListener"
              initializeData="c:\google\logs\WebNetTrace.log"
            />
        </sharedListeners>
        <switches>
            <add name="System.Net" value="Verbose" />
        </switches>
    </system.diagnostics>
    -->
  <system.net>
    <!-- HTTP Proxy Settings -->
    <!--
        <defaultProxy>
            <bypasslist>
                <add address="internaldns.yourdomain.com|internaldns2.yourdomain.com" />
            </bypasslist>
            <proxy
                usesystemdefault="True"
                proxyaddress=" http://proxyserver.internal.youdomain.com:3128"
                bypassonlocal="True"
            />
        </defaultProxy>
        -->
  </system.net>
</configuration>

Original comment by jmiddle...@gmail.com on 3 May 2010 at 5:02

GoogleCodeExporter commented 9 years ago
could you try adding https instead of http in Exchange server name ? If this 
does not
work, set the logging level to debug and send me the complete log file.

BTW, did you try writing f\b info using web service diagnostics ?

Original comment by jaideepg...@google.com on 3 May 2010 at 5:20

GoogleCodeExporter commented 9 years ago
I don't have HTTPS mode enabled but I can if you'd like.  I am already set to 
DEBUG so I'm attaching it here and 
finally yes, the F/B test in Diagnostics works fine.

Original comment by jmiddle...@gmail.com on 3 May 2010 at 5:23

Attachments:

GoogleCodeExporter commented 9 years ago
Thats strange! If this works in diagnostics, it should work with sync service 
also.
It would be better to see how it goes with https ?

Original comment by jaideepg...@google.com on 3 May 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Wow, so I feel like a complete newbie to this whole technology world...  RTFM 
is my new slogan.  Requirement - 
Exchange 2003 SP2...  SP2...  SP2.

After installing it, now F/B works bi-directional.  One question -- Is there 
any way to use the Appointment option 
with Exchange 2003 instead of the SchedulePlus one?  I'd like to potentially 
fill in the appointments instead.

Original comment by jmiddle...@gmail.com on 3 May 2010 at 6:03

GoogleCodeExporter commented 9 years ago
AppointmentWriter is not supported yet and was in POC mode only.

Original comment by jaideepg...@google.com on 3 May 2010 at 6:36

GoogleCodeExporter commented 9 years ago
Totally understand.  One final question (thank you for bearing with me):

Is there any way to have users exist in Google (accounts exist) but have the 
free/busy look at Exchange?  The 
issue is that I've already created my 600+ users in Google and now I have about 
500 who are still on Exchange 
(until we finish the migration).  I'd like for those users to have their F/B 
looked up at the server.  If not, will 
deleting their accounts make this happen?

Original comment by jmiddle...@gmail.com on 3 May 2010 at 6:39

GoogleCodeExporter commented 9 years ago
GCal send the request to both Google and Exchange and shows the whichever 
response
comes first(Which is Google response generally). If you delete the user from 
Google,
it would get the free busy from Exchange.

Original comment by jaideepg...@google.com on 3 May 2010 at 6:50

GoogleCodeExporter commented 9 years ago
Well, I was hoping for different answer but that's okay.  I'll have to remove 
all of my users and then wait 5 days 
before remigrating people.

Original comment by jmiddle...@gmail.com on 3 May 2010 at 6:57

GoogleCodeExporter commented 9 years ago
Alternatively you can disable calendar for the domain. I don't know whether this
would be useful in your case or not ?

Original comment by jaideepg...@google.com on 3 May 2010 at 7:00

GoogleCodeExporter commented 9 years ago
No as I have about 25 users already on board and we're planning on doing about 
50-100 per week so disabling it 
completely wouldn't be good.  Thank you so much for your help though.

Original comment by jmiddle...@gmail.com on 3 May 2010 at 7:03