Hello,
I would suggest opening the dh1024.pem file in a text editor and check whether the key format is correct.
It is very important that the key begins with -----BEGIN DH PARAMETERS----- and ends with
-----END DH PARAMETERS-----
The proper DH key should look similar to this:
-----BEGIN DH PARAMETERS-----
MIGHAoGBALUDSDicpMywUjaONHOsoNFUmvo/EWBjw+MpISR5Mn5I5+HpISvLQAZg0
vpCuWUppr/1nAnTgSm9sdeP3TyJWJlBD8xeOkm8Ul96Nccgzo1JUyGehmAotQGBALUD
euWd3DZcBALUDSDicpMywZg0NyMVi3rp5oHbt4iOOWxdGRCByM+LKHdnurAgEC9W
-----END DH PARAMETERS-----