bad client public DH value

From <>:

1. C generates a random number x (1 < x < q) and computes
e = g^x mod p. C sends e to S.

I set x to 2 and get a "bad client public DH value" error from the
server. Since 1 < 2 and 2 < q it doesn't seem like I should be
getting that error?