FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

Maintenance Service Error

We're having a problem with the FogBugz Maintenance Service reporting an error updating the MySql Search index. I've looked through the support forums and found very similar errors, but none of the solutions that people reported success with seemed to work here.

We're running fogbugz on an Ubuntu server. The Error Reporting page reports the problem:

The Fog Creek Maintenance Service has reported an error

    10/20/2008 11:17:36 AM EDT: Failed to update the search index: (ThistleCRemoting.Deserialize) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Unable to connect to any of the specified MySQL hosts. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
      at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] --- End of inner exception stack trace ---

      at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000]
      at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000]
      at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000]
      at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000]
      at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x00000] --- End of inner exception stack trace ---

      at FogUtil.Search.Index.get_IndexSize () [0x00000]
      at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr)
      at (wrapper remoting-invoke) FogUtil.Search.Index:get_IndexSize ()
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[])
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace ---

      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
      at System.Reflection.MonoProperty.GetValue (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000]
      at System.Reflection.PropertyInfo.GetValue (System.Object obj, System.Object[] index) [0x00000]
      at SearchTool.UnixServer.ReadAndExecuteCommand (SearchTool.State state) [0x00000]
Clayton Sims Send private email
Wednesday, October 22, 2008
 
 
Hi,

So you've already tried resetting the search index?

Rich
Rich Armstrong Send private email
Wednesday, October 22, 2008
 
 
When I go to the "Search" tab on the Site->Settings page I get the prompt

Search is not available right now:

And the following exception is shown.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Unable to connect to any of the specified MySQL hosts. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown. at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] --- End of inner exception stack trace --- at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x00000] --- End of inner exception stack trace --- at FogUtil.Search.Index.get_IndexSize () [0x00000] at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr) at (wrapper remoting-invoke) FogUtil.Search.Index:get_IndexSize () at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MonoProperty.GetValue (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.PropertyInfo.GetValue (System.Object obj, System.Object[] index) [0x00000] at SearchTool.UnixServer.ReadAndExecuteCommand (SearchTool.State state) [0x00000]
Clayton Sims Send private email
Wednesday, October 22, 2008
 
 
Additionally, I have run the Diagnostics program. I get to Step 3, which produces the output

Testing Search Registration

Search does not appear to be working.
FogBugz encountered the following error while trying to query the search service.

followed by the same stack trace as above.
Clayton Sims Send private email
Wednesday, October 22, 2008
 
 
This error:
Unable to connect to any of the specified MySQL hosts.

Means that search is trying to connect to your MySQL server via TCP/IP but you probably are only running mysql in socket mode.  If you enable tcp/ip for mysql AND you make sure the port is open, this error should go away.
Michael H. Pryor Send private email
Wednesday, October 22, 2008
 
 
I've figured out the problem you were describing (MySql was setup to accept TCP/IP, but only on the local intranet IP:3306, not on localhost:3306, so mysql -h 192.168.7.220 worked, but not mysql -h 127.0.0.1). For anyone else having this problem, I foolishly thought that the my.conf file could accept multiple entries in the format
bind-addresses = entry1
bind-addresses = entry2

Unfortunately, the connection still has a kink.

The fogbugz connection string (as listed under the 'Database' tab) is

Driver={mysql};Server=localhost;Database=FogBugz;Uid=dimagi;Pwd=obviouslynotgivingthat;

On our server I can execute

mysql -u dimagi -h localhost -p

And give the correct password, and can list and access DB data. However, now the server is throwing the following error (in the diagnostics page), which implies that the user doesn't have access.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Access denied for user 'dimagi'@'localhost' (using password: YES) ---> MySql.Data.MySqlClient.MySqlException: Access denied for user 'dimagi'@'localhost' (using password: YES) at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Authenticate411 () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Authenticate () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x00000] --- End of inner exception stack trace --- at FogUtil.Search.Index.get_IndexSize () [0x00000] at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr) at (wrapper remoting-invoke) FogUtil.Search.Index:get_IndexSize () at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MonoProperty.GetValue (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.PropertyInfo.GetValue (System.Object obj, System.Object[] index) [0x00000] at SearchTool.UnixServer.ReadAndExecuteCommand (SearchTool.State state) [0x00000]
Clayton Sims Send private email
Wednesday, October 22, 2008
 
 
Run these two commands in mysql (replacing yourpassword with the actual fogbugz mysql user password, and your.host.name with the host name of your mysql server):

  1. GRANT ALL PRIVILEGES ON fogbugz.* TO fogbugz@localhost IDENTIFIED by 'yourpassword' WITH GRANT OPTION
  2. GRANT ALL PRIVILEGES ON fogbugz.* TO fogbugz@'your.host.name' IDENTIFIED by 'yourpassword' WITH GRANT OPTION
Michael H. Pryor Send private email
Wednesday, October 22, 2008
 
 
Success. Thanks for all the help!
Clayton Sims Send private email
Wednesday, October 22, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.