刘老师,thrift服务端启动后,客户端连接报异常了,研究了半天没有看懂,代码上我也仔细检查了,没有错,端口,也查看了,都正常启动的,
有些时候这个位置抛空指针异常,
org.apache.thrift.transport.TTransportException: java.net.ConnectException: 拒绝连接 (Connection refused), 抛拒绝连接
thrift服务端 没有打印任何信息
这是thrift客户端的配置:
@Log4j
@Component
public class ServiceProvider {
@Value("${thrift.user.ip}")
private String serverIp;
@Value("${thrift.user.port}")
private int serverPort;
@Value("${thrift.message.ip}")
private String messageServerIp;
@Value("${thrift.message.port}")
private int messageServerPort;
private enum ServiceType {
USER,
MESSAGE