In this paper, we study joint energy cooperation and traffic management in renewable energy powered cellular system where a centralized unit manages the traffic and the energy cooperation among BSs. We first formulate a stochastic optimization problem which aims at minimizing the total on-grid energy consumption while satisfying the quality-of-service (QoS) requirement of classes of services, i.e., the minimum average data rates. By using the Lyapunov optimization framework, we develop a joint adaptive energy cooperation and traffic management algorithm which does not need the statistical information of the system. Then, we provide the performance analysis which shows our proposed algorithm is asymptotically optimal. Through the simulation results, we verify the theoretical analysis and show that the performance of our algorithm.