When is $\Gamma(Z, i^F) \not = \lim \Gamma(U,F)$? (F a sheaf, Z a closed subset.) Suppose that $X$ is a locally compact space. I am looking for an example of a non-compact, closed subspace $i: Z \subset X$ so that the map from $\lim \Gamma(U, F) \to \Gamma(Z,i^*F)$ is not surjective. (The colimit runs over all open sets containing Z.)
Hopefully some not too exotic space, it would be great to see this happen on $\mathbb{R}$. Mainly I am trying to figure out why this the natural map is surjective if $Z$ is compact.
 A: I try this example. Maybe one should think about it for a while to make sure all the details are correct. 
Let $H=\{a+bi|b> 0\}$ be the upper half-plane then $X=\mathbb{R}\cup H$ and $Z=\mathbb{R}$. (This has nothing to do with complex numbers, its just a convenient notation, I could have used real notation.)
Now define 
$$\mathcal{F}(U)=\{f| f(a)\in \mathbb{R}, f(a+bi)\in \mathbb{Z}, a,b \in \mathbb{R}, b\neq 0,$$
$$ f|U\cap \mathbb{R} \ \text{and} \ f|U\cap H  \ \text{are continuous and } \  f(a)\leq f(a+bi) \}$$
In other words the functions are real valued on $\mathbb{R}$ and integer valued on $H$ with the values of $H$ bounding those on $\mathbb{R}$. And continuous
on $\mathbb{R}$ and $H$ (thus locally constant on $H$).
Under this definition $\mathcal{F}(U)$ is an Abelian group. Restriction is just restriction of functions. It is mono and conjunctive since we are using actual set theoretic functions. 
Now however $s(x)=x$ is a section in $\Gamma(\mathbb{R},i^*\mathcal{F})$ which does not extend to any open neighbourhood of $\mathbb{R}$. 
