A sulfur or rotten-egg aroma is common for fermenting beer with many yeast strains, particularly lagers. The most significant source of rotten egg smells is hydrogen sulfide gas which is often produced during active fermentation as a byproduct of the yeast processing sulfur. Sulfur itself comes from several sources including kilned malts, as some sulfur is produced when the malts are kilned or roasted. Hops also often contains some sulfur compounds and aromatics, and certain water profiles are high in sulfur. Yeast itself may also contain some sulfur, and certain yeast strains such as many lagers produce higher levels of sulfur gas during fermentation.
Unfortunately humans are extremely sensitive to sulfur compounds like hydrogen sulfide gas. Because sulfur compounds plan an active role in many decay processes like stagnant water and rotting foods, humans have developed a very high sensitivity to them. Some sulfur based compounds can be detected at a parts per trillion threshold.
The two most common sulfur compounds found in beer are sulfur dioxide and hydrogen sulfide. Sulfur dioxide has the aroma of a early burning match or gunpowder, while hydrogen sulfide has the strong rotten egg or volcanic gas aroma to it. Fortunately these gases are also very volatile so they will evaporate out of the beer in a fairly short time period. It is very common to smell both of these during active fermentation and as I mentioned they are more frequently associated with certain yeast strains including many lagers.
Mitigating Sulfur Aromas
To reduce the sulfur aroma in your finished you first want to consider your yeast strain as certain strains are far more prone to sulfur production than others. Selecting the right strain, particularly for lagers, is important. Also avoid high sulfur content in your brewing water.
If you detect sulfur gas in your finished beer, the best thing to do is give it more time. Lagers, in particular, often require extended aging periods and the sulfur aromas and flavors will fade with time. It is important to age your beer in a fermenter, if possible, to allow the gas to dissipate, as prematurely bottling or kegging a sulfuric beer will often just trap the sulfur gas in the bottle or keg.