I think there are three problems:
- Normals the wrong direction
- Single-walled pipe
- Fluid is too low resolution
Solving the second problem will probably also solve the first problem, but it's worth mentioning both.
The simulation uses the normals to determine where the "surface" is, and normals are only on one side of a polygon. If your normals are on the outside of the pipe, then the simulation will be confused.
This can be solved by "solidifying" your pipe. Use a Solidify modifier, and make sure that it's above the fluid sim modifier, in the stack (or you can just apply the solidify modifier). This will help the simulation figure out what's the inside of the pipe.
Lastly, if the simulation doesn't have enough resolution, then the fluid will be "too big" for the pipe. If the resolution is too low, then it won't have enough precision to accurately determine if the fluid is inside the pipe or outside the pipe. So, increase your resolution of your fluid domain.
There's also a decent demonstration of how different resolutions behave.