ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setPort(5672);
connectionFactory.setUsername(username);
connectionFactory.setPassword(password);
connectionFactory.setHost("localhost");
connectionFactory.setVirtualHost("/");
var conn = connectionFactory.newConnection();
var channel = conn.createChannel();
conn.close();
这段代码会在channel建立的时候报Connection reset,用多种编程语言试过,请问可能有些什么原因,以下是RabbitMQ的日志
2023-06-29 18:53:02.258000+08:00 [info] <0.1204.0> accepting AMQP connection <0.1204.0> (127.0.0.1:2202 -> 127.0.0.1:5672)
2023-06-29 18:53:02.285000+08:00 [info] <0.1204.0> connection <0.1204.0> (127.0.0.1:2202 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> crasher:
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> initial call: rabbit_reader:init/3
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> pid: <0.1204.0>
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> registered_name: []
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> exception exit: {unexpected_message,{'EXIT',#Port<0.7257>,einval}}
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> in function rabbit_reader:handle_other/2 (rabbit_reader.erl, line 644)
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> in call from rabbit_reader:mainloop/4 (rabbit_reader.erl, line 535)
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> in call from rabbit_reader:run/1 (rabbit_reader.erl, line 457)
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> in call from rabbit_reader:start_connection/5 (rabbit_reader.erl, line 356)
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> ancestors: [<0.1202.0>,<0.599.0>,<0.598.0>,<0.597.0>,<0.595.0>,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> <0.594.0>,rabbit_sup,<0.233.0>]
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> message_queue_len: 0
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> messages: []
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> links: [<0.1202.0>]
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> dictionary: [{{ch_pid,<0.1217.0>},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {1,#Ref<0.3908685128.610795521.253910>}},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {process_name,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {rabbit_reader,<<"127.0.0.1:2202 -> 127.0.0.1:5672">>}},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {client_properties,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> [{<<"product">>,longstr,<<"RabbitMQ">>},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"version">>,longstr,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> <<"6.5.0+4c91cae8ae5eb0194e02a83f1b0cedfe29ad8312">>},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"platform">>,longstr,<<".NET">>},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"copyright">>,longstr,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> <<"Copyright (c) 2007-2020 VMware, Inc.">>},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"information">>,longstr,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> <<"Licensed under the MPL. See https://www.rabbitmq.com/%22%3E%3E},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"capabilities">>,table,
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> [{<<"publisher_confirms">>,bool,true},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"exchange_exchange_bindings">>,bool,true},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"basic.nack">>,bool,true},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"consumer_cancel_notify">>,bool,true},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"connection.blocked">>,bool,true},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"authentication_failure_close">>,bool,true}]},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<<"connection_name">>,void,undefined}]},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {{channel,1},
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> {<0.1217.0>,{method,rabbit_framing_amqp_0_9_1}}}]
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> trap_exit: true
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> status: running
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> heap_size: 1598
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> stack_size: 28
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> reductions: 9979
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0> neighbours:
2023-06-29 18:53:05.482000+08:00 [error] <0.1204.0>
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> supervisor: {<0.1202.0>,rabbit_connection_sup}
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> errorContext: child_terminated
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> reason: {unexpected_message,{'EXIT',#Port<0.7257>,einval}}
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> offender: [{pid,<0.1204.0>},
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {id,reader},
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {mfargs,{rabbit_reader,start_link,
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> [<0.1203.0>,
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {acceptor,{127,0,0,1},5672}]}},
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {restart_type,intrinsic},
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {shutdown,300000},
2023-06-29 18:53:05.494000+08:00 [error] <0.1202.0> {child_type,worker}]
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> supervisor: {<0.1202.0>,rabbit_connection_sup}
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> errorContext: shutdown
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> reason: reached_max_restart_intensity
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> offender: [{pid,<0.1204.0>},
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {id,reader},
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {mfargs,{rabbit_reader,start_link,
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> [<0.1203.0>,
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {acceptor,{127,0,0,1},5672}]}},
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {restart_type,intrinsic},
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {shutdown,300000},
2023-06-29 18:53:05.495000+08:00 [error] <0.1202.0> {child_type,worker}]