How close does the base have to be? The USN has resupply ships, allowing the fleets to stay somewhere and never go back to the port. For anything other than resupply, the base could really be anywhere in the world.
The USN is functioning in the way it is expected to. In a "real" war, you would expect there to be losses, including bases near the front line. In a real war it wouldn't be unusual for sailors to have to skip leave. The thing is, the US hasn't fought a "real" war in a very long time -- the kind of war that puts hardship on sailors. So, even though the US is sorta-kinda at war, it's not the kind of war where sailors feel like they have to make sacrifices. So, they're complaining a lot about having to stay out at sea for a long time.
Combine that with the military leadership being too proud to admit to making mistakes, the president being unwilling to ever back down, and nobody being willing to say that Iran managed to land a few blows, and you get sailors who don't believe they're in a real war, so they're pissed off about not getting shore leave. You also get a Navy that isn't willing to move other carrier strike groups into the region so that the sailors currently there can get cycled out for a break.
But, this is hardly devastating to the military. Morale on that carrier isn't great, but it's not like anybody's injured or dying. They're still getting regular supplies.
There's nothing about what's happening that's unthinkable. In a real war you'd expect things to be much worse.