Manually specifing java heap size breaks elasticsearch service

never mind i found the solution.

when defining the Xms and Xmx options they have to be at the start of line i.e. no space before them.

Blow is correct:
-Xmx1g
-Xms1g

but below caused problem.
-Xmx1g
-Xms1g