Friday, August 23, 2013

SharePoint Configuration Cache

I recently had a big issue with the SharePoint Configuration Cache.

It started as a simple attempt to reset the cache. I ran the following powershell script(taken from http://woutersdemos.codeplex.com/releases/view/85474)

Add-PSSnapin Microsoft.SharePoint.PowerShell
$Servers = Get-SPServer | ? {$_.Role -ne "Invalid"} | Select -ExpandProperty Address
Write-Host "This script will reset the SharePoint config cache on all farm servers:"
$Servers | Foreach-Object { Write-Host $_ }
Write-Host "Press enter to start."
Read-Host
Invoke-Command -ComputerName $Servers -ScriptBlock {
try {
Write-Host "$env:COMPUTERNAME - Stopping timer service"
Stop-Service SPTimerV4
$ConfigDbId = [Guid](Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDB' -Name Id).Id
$CacheFolder = Join-Path -Path ([Environment]::GetFolderPath("CommonApplicationData")) -ChildPath "Microsoft\SharePoint\Config\$ConfigDbId"
Write-Host "$env:COMPUTERNAME - Clearing cache folder $CacheFolder"
Get-ChildItem "$CacheFolder\*" -Filter *.xml | Remove-Item
Write-Host "$env:COMPUTERNAME - Resetting cache ini file"
$CacheIni = Get-Item "$CacheFolder\Cache.ini"
Set-Content -Path $CacheIni -Value "1"
}
finally{
Write-Host "$env:COMPUTERNAME - Starting timer service"
Start-Service SPTimerV4
}
}

This script seemed to work, and I went about my way. However, that night, we noticed our intranet was running VERY slowly. Many pages were not being served at all.

I determined that there were no Timer Jobs running at all, even though the service was running. I thought it would go away, and I would address it in the morning.

This morning, I learned that the problem was much more apparent. The help desk were getting several calls about the slowness of the Intranet.

I found the following steps from http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx:

  1. Stop the Timer service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click SharePoint 2010 Timer, and then click Stop.
    3. Close the Services console.
  2. On the computer that is running Microsoft SharePoint Server 2010 and on which the Central Administration site is hosted, click Start, click Run, type explorer, and then press ENTER.
  3. In Windows Explorer, locate and then double-click the following folder:
  4. %SystemDrive%\ProgramData\Microsoft\SharePoint\Config\GUID
  5. Notes
    1. The %SystemDrive% system variable specifies the letter of the drive on which Windows is installed. By default, Windows is installed on drive C.
    2. The GUID placeholder specifies the GUID folder. There may be more than one of these.
    3. The ProgramData folder may be hidden. To view the hidden folder, follow these steps:
      1. On the Tools menu, click Folder Options.
      2. Click the View tab.
      3. In the Advanced settings list, click Show hidden files and folders under Hidden files and folders, and then click OK.
      4. You can also simply type this directly in the path if you do not want to show hidden files and folders.
  6. Back up the Cache.ini file. (Make a copy of it. DO NOT DELETE THIS FILE, Only the XML files in the next step)
  7. Delete all the XML configuration files in the GUID folder (DO NOTE DELETE THE FOLDER). Do this so that you can verify that the GUID folders content is replaced by new XML configuration files when the cache is rebuilt.
    Note When you empty the configuration cache in the GUID folder, make sure that you do NOT delete the GUID folder and the Cache.ini file that is located in the GUID folder.
  8. Double-click the Cache.ini file.
  9. On the Edit menu, click Select All.
  10. On the Edit menu, click Delete.
  11. Type 1, and then click Save on the File menu. (Basically when you are done, the only text in the config.ini file should be the number 1)
  12. On the File menu, click Exit.
  13. Start the Timer service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click SharePoint 2010 Timer, and then click Start.
    3. Close the Services console.
  14. 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.
  15. Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.
  16. Check in the GUID folder to make sure that the xml files are repopulating. This may take a bit of time.

Step 15 was not correct. My cache.ini file still said 1. so instead of relying on the powershell script, I did it manually. However, I found one file would not allow me to delete it. It continued to say "Access Denied." this couldn't be possible, because I was a local administrator. Well, I determined that the file was locked by another process (http://www.codeovereasy.com/2012/12/locked-file-in-sharepoint-configuration-cache/).

I downloaded LockHunter and forcefully deleted the file.

Restarted Timer Job service. Now, the cache.ini file is updated, xml cache files are being populated, time jobs are running and scheduled, and the intranet is no longer unresponsive.
 

Tuesday, November 8, 2011

Sharepoint JS Error

Very random issue. It happens sometimes, but not consistently.
The page will load, but with JS errors. These errors stem from the following list. Since these are the Sharepoint JS pages, it will cause all future references to SP JS functions to fail. Scrolling, Site Actions menu, etc.

JS Errors:

Message: Invalid character
Line: 1
Char: 1
Code: 0
URI: ScriptResource.axd?d=IEhA7uTZB2R3g5c_AKe0pJaIp22wFF5IpMi4BcXrTJXVTxSzOleK2KP_dgQq2HZknMiQ9jBkeNOjJJ0xSnET6XAon1d64jlFI0xj4PbDMVfej-oaCU6hbvUjjA2yjKThBuRwps63A2gpNADyuohxmmbR3jQ1&t=5c2f384e


Message: 'Sys' is undefined
Line: 289
Char: 1
Code: 0
URI:


Message: 'Type' is undefined
Line: 2
Char: 1
Code: 0
URI: /_layouts/sp.core.js?rev=7ByNlH%2BvcgRJg%2BRCctdC0w%3D%3D



found a post that said it had to do with compressing the JS.
This thread says it is compressed twice.

Added:

<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true"/>
</scripting>
</system.web.extensions>

to the web.config file

If that doesnt work, the post above says to make sure the policy setting is changed to allow scriptlets and to use HTTP 1.1 through proxy connections.

Sunday, December 12, 2010

This Year....C-R-A-Z-Y

Its hard to believe that this year is rapidly coming to a close. Quick recap of the semester:

-Became a father
-2 Career fairs
-Interviewed with 6 companies
-Accepted an offer for a full time job after graduation
-Family reunion over Thanksgiving
-Finished 2 major projects for school

Wow...I can't believe that I am still alive after all of that! So much has happened, but I do believe that I have gained a TON of knowledge that I will take with me and use in the future.

I loved learning about the Open Source communities through my final project, and the possibility of connecting with so many people through projects and forums.
I enjoyed sharing my computing knowledge with others, including Boolean logic, AI, hacking, and copyright.
I appreciated the ability to channel my learning myself, and research nuclear bombs, databases, altruism, and various digital literacy labs.

The class was set up flawlessly. From self directed learning, to the meshing of digital culture and historic content, it all worked together perfectly.

I really really really really really really really really enjoyed this class. I normally do not enjoy history classes at all. The first civilization course I took was absolute torture. However, once I learned about a course that emphasizes digital literacy, I took notice. I was intrigued, and I wanted to be a part of it! As an Information Technology major, I find so much more satisfaction in learning about modern technologies than about past problems.

All in all...I loved this class, and I would take it again in a heartbeat!

Tuesday, December 7, 2010

What have I done?

What have I done for my project:

  • Set up google site
  • Manage Google Site
  • Import CaTB text to site
  • Create Wiki
  • Create Wordle
  • Read article and take main points
  • Create 'Best of Page'
  • Create Webslides (for presentation)

Enough? Probably not...but its a start!

Final Presentation

Wow...again, time eludes me. Thanksgiving was pretty crazy and hectic, and I am finally getting back to normal...now I just have to catch up on my blog posts and finish this class strong!

Here is our presentation!

We are presenting on remixes, specifically the Cathedral and the Bazaar.

The Cathedral and the Bazaar has a very interesting concept and back story. Eric Raymond initially thought that software products needed to be built like a Cathedral. It should be extremely grand and secretive. Only the architects have access to HOW it was built and HOW to maintain it. However, the Open source movement is overcoming the software industry. Instead of a grand cathedral, development is more like a bazaar, thousands of people, yelling, trading, and sharing information. This bazaar may seem disorganized and unsuccessful, but it is completely opposite. Eric present 19 points on how the bazaar is better than the cathedral.

Eric initially wrote this article as a petition to a company called Netscape, pleading for them to release their cathedral, Mozilla, to the public and turn it into a bazaar. Netscape eventually did, and they have been EXTREMELY successful ever since. Mozilla has turned into one of the top web browsers with a development department as big as the world. Over 2 billion Add-ons have been downloaded for Firefox!

Our presentation will be able to positives of Open Source, as Eric explains. We will show examples of how we remixed his article, because of the Open Publication license which he has. Finally, we will show the POSSIBILITIES that exist due to Openness.
Taken from Daniel Zapalla
Go team!


Tuesday, November 16, 2010

Going Nuclear!

I'm going to try and hit 2 birds with one stone and talk about Nuclear Technologies...this will cover the past 2 classes! Woohoo!

So, first off, a little history.

I am going to begin with a lesser known scientist who was responsible for the Manhattan Project. Leo Szilard. Szilard was a Hungarian scientist who initially conceived the idea of a nuclear chain reaction. He was working in New York with Enrico Fermi when they successfully executed a chain reaction using uranium.

Einstein, left -- Szilard, right

During this same time, the Germans were also working on developing a chain reaction, which would lead to nuclear weapons. Szilard knew of the danger if the Germans developed this technology first, so he wrote a letter to FDR telling him of this problem and encouraged the development of a program to get there first. Since Szilard wasn't very famous, he approached fellow scientist, Albert Einstein and convinced him to sign the lettter.

"I really only acted as a mail box. They (Szilard, et al) brought me a finished letter and I simply signed it" -- Einstetin to his biographer Antonia Vallentin (source)

With Einstein's fame attached to the project, FDR approved the formation of the Manhattan Project.

la la la ---- scientific stuff happens ----

Now we are in the middle of the second World War. The European Axis have been fighting in Europe for more than 3 years. American enters the war, and launches D Day. The war finally ends in Europe 11 months after D Day with the surrender of Germany.

Unfortunately, Japan was still in the war. Ever since Pearl Harbor in 1941, the US had been fighting them in the Pacific Seas. Those battles had been waging for 4 years, and there was still no clear victor.

Now we get into a bunch of debated history --- Why did we drop the Atom Bomb?
I'll let you decide you're own opinion, but here is the general explanation of why we did:
1. Japan had countless ground troops. An invasion similar to D Day would cause exponential causalities.

In a nutshell, that is the major point. Japan had over 9 million infantry that would be waiting on the beaches if we invaded. If the war in Europe lasted almost 4 years and the war in the Pacific had already lasted 4 years, how long would it take to overcome Japan?

On July 26th, Truman basically told Japan to surrender or else("the inevitable and complete destruction of the Japanese armed forces and just as inevitably the utter devastation of the Japanese homeland"). They rejected the ultimatum 2 days later.

So, we decide to drop a bomb on them. Not just any bomb---a unique, one of a kind bomb. There was literally NONE like it in the world. Dubbed 'Little Boy', it contained only 65 kg (135 lbs) of uranium and 2200+ kg of other stuff. It was dropped, and the world took notice.


The amazing part of the following events was this: Japan DIDN'T SURRENDER!

Again Truman told them to surrender or "they may expect a rain of ruin from the air, the like of which has never been seen on this earth."

Well, they ignored the request for unconditional surrender again...guess what happened....

We dropped another bomb, Fat Man, and after that, Japan surrendered.

Little boy, meet Fat Man

Total, over 250,000 people were killed because of the bombings within the first 4 months after the bombings, with countless more coming the following years.

Will I be able to continue this? If not, here are my random thoughts:

FDR is the man. elected to 4 presidential terms, even with polio.
The reason I am fascinated with the atomic bombs (I write every term paper, free response, research paper on WWII or the atomic bombs) is because the first was dropped on my birthday---40 years earlier.
I also learned about Leo Szilard because I served in Hungary and I like looking for obscure hungarian inventors --- the Rubik's cube, ballpoint pen, and nuclear chain reactor---nice resume



Thursday, November 11, 2010

Blog Review -- Bio Mole Reflections

As part of the midterm review, I am reviewing a fellow digital civilization-ite's blog.


1. understand western civilization in terms of themes, ideas, events, people, and works.

Brian seems to really understand the western civilization aspect of the class. He really caught on with Economics and liken what the history taught him about Keynesian Economics and likened it to the present day troubles and problems. This is only one of the instances of his understanding, I feel he really gets the class in that regard.


2. understand basic computing concepts and digital culture and relate them to history

I really wanted to only positive things in my blog review, but I really couldn't find any instances of Brian understanding basic computing concepts. I think that this criteria is more on a non-blog basis, because I am sure that Brian has understood these things, he just hasn't blogged about it because it isn't his forte. I'm not saying thats a bad thing, I think its great! That's probably why he actually has people comment on his blog as opposed to mine....

3. take control of and manage my own learning in three areas: Create(independently seek out information), Consume(generate varied types of content), Connect (share both in person and online)

Brian has done an excellent job of this. He found additional quotations about Carl Jung, explained moderism using additional sources and trains of thought, likened a book he read to monopoly, connected with the digital world for crowd sourcing techniques, and discussed his final project on localizing our digital labs.

Way to go Brian!