Your generator may not be supplying the voltage needed. Low voltage can cause this problem and can eventually damage the compressor. If you have the 15K BTU roof A/C, and/or because the unit is 18 years old, it may require a strong 120V supply. Smaller generators struggle with the demand for starting a compressor motor. I suggest you check your generator's voltage supply and ensure it is up to the task.
2015 Jay Flight 32RLDS Elite
2012 Chevy 2500HD Crew Cab LTZ (6.6L Duramax/Allison)
Equalizer Hitch (1200# bars)