What legal pitfalls should be considered when (re)selling OS bases solutions?
As you can't ask any fee for the Open Source code itself this seems a sensitive area to me.
You should follow the license, that's all.
Your question hints at a common misunderstanding. Freedom and price are orthogonal, they are not related. Think about two axes:
You can have any combination of values from both axes, for example:
The first axis is what Free Sofware and Open Source are about.
This depends on the license of the solution you want to sell, and the obligations it places on you for allowing you to redistribute the solution.
For some of the licenses, you can get a rather comprehensive amount of additional information from the organizations behind them.
For example, the Free Software Foundation got many GNU-GPL-specific topics covered in their Frequently Asked Questions: https://www.gnu.org/licenses/gpl-faq.en.html
The Open Source Initiative has a less license-specific FAQ section as well: http://opensource.org/faq
First off, you can sell your code. From the Open Source Initatives website:
You can sell services based on the code (i.e., sell your time), sell warranties and other assurances, sell customization and maintenance work, license the trademark, etc. The only kind of profit strategy that is incompatible with Open Source is monopoly-based sales, also known as "royalties". See this article for how to think about business strategies that make money from Open Source.