Assume that the closed surface $S$ encircles a volume $V$, and that a surface charge with density $\sigma$ ("single layer") is distributed over $S$. My question regards the electrostatic potential $\phi$ generated inside the volume $V$ by this charge distribution: on the one hand, by using the superposition principle and Coulomb's law, I get $$\tag{1} \phi(x)=\frac{1}{4\pi \epsilon_0} \int_S \frac{\sigma(x')\, dS'}{\lvert x-x'\rvert}. $$ On the other hand, I know that $\phi$ solves Laplace's equation on $V$ with Neumann boundary conditions on $S$: $$\begin{cases} -\nabla^2 \phi =0 & \text{on }V\\ \frac{\partial \phi}{\partial \nu} \propto \sigma &\text{on }S \end{cases} $$ so that it may be expressed in an integral form by means of a suitable Green function (see Jackson, 3rd ed., equation (1.46) pag.39): $$\tag{2} \phi(x)=\langle \phi\rangle_S + C\int_S \sigma(x') \frac{\partial G}{\partial \nu'}(x, x')\, dS(x').$$
Question. Formulas (1) and (2) do not agree in general, otherwise all volumes would share the same Green function, and that's not true. So one of the two must be wrong. Which one is wrong, and for what physical reason?