Sladescross's Blog

Blogging about Sharepoint related stuff

Application Load Balancing Addresses May 21, 2012

Filed under: Application Address Refresh Job,Timer,Topology — sladescross @ 9:23 am

http://www.wictorwilen.se/Post/Understanding-the-Application-Addresses-Refresh-Job-in-SharePoint-2010.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+WictorWilen+%28Wictor+Wil%C3%A9n%29

The Application Addresses Refresh Job has one specific job to do – keep track of all available and online instances of all service application end-points. This means that whenever a proxy requests an endpoint for a service application it will ask the Topology Service (the Application Discovery and Load Balancer Service) for an endpoint. The Topology Service keeps a list of the endpoints that has been discovered by the Application Addresses Refresh Job and passes on one of these endpoints to the proxy, using the load balancing algorithm, which uses that endpoint to talk to the service application. So far so good…

 

Sharepoint Excessive Timer CPU February 23, 2010

Filed under: Sharepoint,Timer — sladescross @ 11:04 pm

http://www.sharepointassist.com/2009/12/02/owstimer-pegging-cpu-and-filling-logs/

Switch of logging and check log files for timer errors.

 

stsadm Delete Configuration Object January 29, 2010

Filed under: deleteconfigurationobject,stsadm,Timer — sladescross @ 12:41 pm

http://weblogs.asp.net/bsimser/archive/2009/07/06/the-undocumented-deleteconfigurationobject-parameter.aspx

stsadm -help deleteconfigurationobject

 

Fusion Logging

Filed under: .NET,Fusion,Logging,Timer — sladescross @ 12:34 pm

http://soerennielsen.wordpress.com/2009/01/14/fixing-the-timer-service-when-everything-breaks-down/

http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx

For BadImageFormatException:
Try running peverify.exe on the file. That will give a more specific description about why it s considered a bad image. Keep in mind that modules built against v2 can not be loaded by a pre-v2 CLR.

For SecurityException:
You need Execute permission for loading any assembly. Also, if a codebase was used to load this file, you would need both FileIOPermission.Read and FileIOPermission.PathDiscovery or else WebPermission to the location (depending on whether this is a local file or a URL). Try caspol.exe to check your managed security settings.

For FileLoadException:

For an “Access is denied” message (for hresult E_ACCESSDENIED, 0×80070005):
Run tlist -m on the file to see if another process has the file locked and without share-read access. If not, check the ACLs for the file and its dependencies (especially if you’re using impersonation).

For a “The located assembly’s manifest definition with name [yourAssembly] does not match the assembly reference” message (for hresult FUSION_E_REF_DEF_MISMATCH, 0×80131040):
The Fusion log will say which part of the assembly reference failed to match what was found. It will be the assembly name, culture, public key (or token) or version (if the found assembly was strongly-named).

For “Unverifiable image [yourAssembly] can not be run” or “Can not run executable [yourAssembly] because it contains relocations” messages (for hresult COR_E_FIXUPSINEXE, 0×80131019):
That image must be run as the process exe or else be compiled as a dll. This is because MC++ has made optimizations for you in your image, based on the assumption that it will be the process exe. If it’s not the process exe, it won t be loaded at the expected location, so the assumed offsets will be incorrect. When the CLR sees such a file loaded as a non-process exe, it will reject the load.

http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx

fuslogvw.exe

 

Sharepoint Clear The Timer Service Cache November 23, 2009

Filed under: Cache,Clear Cache,Config DB,Sharepoint,Timer,Timer Cache,Timer Service Cache — sladescross @ 11:27 pm

http://support.microsoft.com/kb/939308/en-gb

In Windows Server 2008, the configuration cache is in the following location:

Drive:\ProgramData\Microsoft\SharePoint\Config\GUID

http://blog.camantrix.com/sharepoint/2008/04/sharepoint_services_timer_serv.php

SharePoint Services Timer Service File System Cache

Reseting the file system cache have resolved many issues I had in my SharePoint farm. Microsoft tech support gave me this resolution to fix some issues I had with Usage Analysis. I perform this operation fisrt if I get stuck with any issues related to timer jobs. Good times!

So, how to clear the file system cache?

File system cache should be cleared on all servers in the server farm on which the Windows SharePoint Services Timer service is running. To do this, follow these steps:

1. Stop the Timer service.
To do this, follow these steps:
a. Click Start, point to Administrative Tools, and then click Services.
b. Right-click Windows SharePoint Services Timer, and then click Stop.

2. Delete or move the contents of the following folder:
a. %ALLUSERSPROFILE% \Application Data\Microsoft\SharePoint\Config\GUID
b. Leave the cache.ini alone
c. Delete all other files (all guid.xml) these are all timer job definitions
d. Open cache.ini in notepad and change whatever number you see there to 0

3. Start the Timer service:
To do this, follow these steps:
a. Click Start, point to Administrative Tools, and then click Services.
b. Right-click Windows SharePoint Services Timer, and then click Start.

Note: The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm on which the Timer service is running.

Go back to the %ALLUSERSPROFILE% \Application Data\Microsoft\SharePoint\Config\GUID folder and make sure you see a bunch of xml files.

Open the cache.ini and see if the 0 is replaced by a higher value.

You have just synched all your servers with the same timer job definitions from the config db.

http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx

If you only see a single server having issues, only clear the config cache on that server, you do not need to clear the cache on the entire farm. To do a single server, follow the steps below on just the problem server.

To clear the config cache on the farm, follow these steps:

    1. Stop the OWSTIMER service on ALL of the MOSS servers in the farm.
    2. On the Index server, navigate to:

Server 2003 location: Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.
Server 2008 location: Drive:\ProgramData\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.

  1. Delete all the XML file in the directory. NOTE: ONLY THE XML FILES, NOT THE .INI FILE.
  2. Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
  3. Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.
  4. After you see XML files appearing on the Index server, repeat steps 2, 3 & 4 on each query server, waiting for XML files to appear before moving to subsequent servers.
  5. After all of the query servers have all been cleared and new .xml files have been generated, proceed to the WFE and Application servers in the farm, following steps 2, 3, 4 and 5 for each remaining server.

http://tomblog.insomniacminds.com/2008/07/30/sharepoint-internals-clearing-configuration-cache-caveat/

Folder location and ConfigDB id

 

Creating Sharepoint Timer Jobs November 8, 2009

Filed under: Sharepoint,Timer,Timer Job — sladescross @ 11:15 am

http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx

A few weeks back I posted about how you can create custom timer jobs for use in the latest release of SharePoint to perform scheduled tasks. However, considering there have been almost 40 comments to the post in the last three weeks, I figured the post needed some clarification (duh, ya think?).

The first thing you need to do is create a class that inherits from the Microsoft.SharePoint.Administration.SPJobDefinition class. To implement this class, you need to create a few constructors and override the Execute() method, like so:

http://www.pseale.com/blog/SharePointTimerJobs.aspx

Powershell reporting and invoking of custom job definition.

http://msdn.microsoft.com/en-us/library/cc406686.aspx#WSSCustomTimerJobs_ConfigurationOptions

Custom timer job and timer job configuration.

To read the data, use the XmlSerializer class to deserialize the XML into the Address object.

Address _address = new Address();
XmlSerializer serializer = new XmlSerializer(typeof(Address));
FileStream file = new FileStream(@"c:\address.xml", FileMode.Open);
_address = serializer.Deserialize(file) as Address;

To serialize the Address object back to the XML file, do the exact opposite of reading the file.

Address _address = new Address();
XmlSerializer serializer = new XmlSerializer(typeof(Address));
TextWriter writer = new StreamWriter(@"c:\address.xml");
serializer.Serialize(writer, _address);
writer.Close();

The SPPersistedObject class provides a base class for all administration objects. It serializes all fields marked with the Persisted attribute to XML and writes the XML blob to the configuration database. The SPPersistedObject class contains code to serialize all its members that are base types, other persisted objects, and collections of persisted objects. Configuration data that is stored in persisted objects is automatically made available to every process on every server in the farm.

 

 
Follow

Get every new post delivered to your Inbox.

Join 27 other followers