RID master role, and it was removed from the network poorly. So now the DC can not add user/computer objects because it has no more "tokens" to assign since the RID master is unavailable. If the primary was RID master, not being able to replicate would not be an issue.
"the secondary server was removed but the main has stopped because it no longer has anyone to replicate with"
AD would continue to work if all roles are/were available, and would log an error in event viewer about the lack of replication. Each AD server is independent/redundant as long as all FSMO roles are available. So, obviously, the RID master is not for some reason.
Now, since you say the primary server claims to have the RID master role, it seems something more unhealthy is going on.
Any error messages in event viewer?
http://technet2.microsoft.com/windowsserver/en/library/42e14233-6edd-4d0a-87bf-b3d0e3f360081033.mspx?mfr=true
May help some in tracking down RID Master problems.
http://technet2.microsoft.com/windowsserver/en/library/42e14233-6edd-4d0a-87bf-b3d0e3f360081033.mspx?mfr=true
in particular.
and
http://technet2.microsoft.com/windowsserver/en/library/42e14233-6edd-4d0a-87bf-b3d0e3f360081033.mspx?mfr=true
"A domain controller whose RID master role has been seized must never be brought back online."