print stack trace and connection state