A few possibilities:
1. Circuit breaker(s) on the generator have tripped. Sometimes these trip without the handle appreciably moving out of the "on" position, so the best way to verify is to reset even if the appear untripped. Obviously the precise location of the circuit breaker(s) vary with generator model.
2. If you don't have an automatic transfer switch, the shore power cord is not plugged into the generator socket within its storage compartment. I'd guess you have a transfer switch, though.
3. If you have an automatic transfer switch, maybe you just aren't waiting long enough for it to switch over (typically 30 seconds or so). If there's some sort of an EMS it may have an initial connection delay of its own too, possibly a couple of minutes.
4. A wiring fault/broken connection between the generator and the transfer switch/socket, or a broken transfer switch, etc. If you have a fancy EMS (electrical management system), possibly it's malfunctioning or improperly configured.
Usually, if the generator itself is not producing power, its control board will shut the engine down with a fault. Since the electrical system (presumably) is working when using a shore power connection, the problem logically must be something in between the generator and the power distribution panel.