fix issue#521, return error when init redis session