Do dissatisfaction with a job and relationships share the same mental mechanism?
In general, personality traits correlate with most measures of satisfaction. Most notably, there is a large literature showing that personality correlates with life satisfaction (see Steel et al). In general, neuroticism is the biggest correlate followed by extraversion and conscientiousness. 

The following table from Grant et al summarises two major meta-analyses on the correlation between big 5 personality and various measures of well-being including life satisfaction:



From a theoretical perspective, personality represents an interpretative lens through which people experience the world. Some people are generally more positive or more negative. Some people focus on problems, others focus on what they have. Of course, eve 

Personality and Job Satisfaction

I've seen similar correlations looking at personality and job satisfaction (see Judge et al), although in general these correlations are smaller than for life satisfaction. This may reflect the greater role of context. Here is the table of meta-analytic correlations from Judge et al between big 5 personality and job satisfaction.



Personality and Relationship Satisfaction

Here is the meta-analytic estimate of the correlation between personality and intimate partner relationship satisfaction from Malouff et al (2008).



General Comments

In general, the two tables above look somewhat similar to each other. Neuroticism correlations are the largest in both (r = -.22, r = -24).
However, extraversion and conscientiousness may be slightly more relevant to job satisfaction.

References


Grant, S., Langan-Fox, J., &amp; Anglim, J. (2009). The big five traits as predictors of subjective and psychological well-being 1.Psychological reports, 105(1), 205-231.
Judge, T. A., Heller, D., &amp; Mount, M. K. (2002). Five-factor model of personality and job satisfaction: a meta-analysis. Journal of applied psychology, 87(3), 530.
Steel, P., Schmidt, J., &amp; Shultz, J. (2008). Refining the relationship between personality and subjective well-being. Psychological bulletin, 134(1), 138.
Malouff, J. M., Thorsteinsson, E. B., Schutte, N. S., Bhullar, N., &amp; Rooke, S. E. (2010). The five-factor model of personality and relationship satisfaction of intimate partners: A meta-analysis. Journal of Research in Personality, 44(1), 124-127.