99#include " coherence/net/CacheFactory.hpp"
1010#include " coherence/util/Service.hpp"
1111
12+ #include " coherence/net/messaging/ConnectionException.hpp"
13+
1214#include " private/coherence/component/net/extend/RemoteCacheService.hpp"
1315#include " private/coherence/component/net/extend/RemoteService.hpp"
1416#include " private/coherence/component/util/Service.hpp"
@@ -19,6 +21,7 @@ COH_OPEN_NAMESPACE3(coherence,component,util)
1921using coherence::component::net::extend::RemoteCacheService;
2022using coherence::component::net::extend::RemoteService;
2123using coherence::net::CacheFactory;
24+ using coherence::net::messaging::ConnectionException;
2225using coherence::security::auth::Subject;
2326using coherence::util::logging::Logger;
2427
@@ -626,8 +629,17 @@ void SafeService::startService(ServiceType::Handle hService) const
626629 }
627630 catch (Exception::View e)
628631 {
629- COH_LOG (" Unable to start service "
630- << getServiceName () << " : " << e, Logger::level_error);
632+ String::View vsMessage = COH_TO_STRING (" Error while starting service " << getServiceName () << " : " );
633+ if (instanceof<RemoteService::View>(hService) && instanceof<ConnectionException::View>(e))
634+ {
635+ // COH-30321 - skip printing the stack trace as connection failures are common and the stack trace
636+ // doesn't provide anything useful
637+ COH_LOG (vsMessage << " : " << e, Logger::level_error);
638+ }
639+ else
640+ {
641+ COH_LOG (vsMessage << " : " << e->getStackTrace (), Logger::level_error);
642+ }
631643 stopAfterFailedStart (hService);
632644 COH_THROW (e);
633645 }
0 commit comments