java.io.IOException: null

77 views
Skip to first unread message

Ramesh xornor

unread,
Mar 19, 2020, 6:51:31 AM3/19/20
to rabbitmq-users

This is code for connection rabbitmq server:------------

try {
            LOGGER.info("Connecting with RabbitMQ...host {} : port {}",this.host,this.port);
            this.factory = new ConnectionFactory();
            this.factory.setHost(this.host);
            if(StringUtils.isNotBlank(this.port)){
                this.factory.setPort(Integer.parseInt(this.port));
            }
            this.factory.setUsername(this.userName);
            this.factory.setPassword(this.password);

            this.connection = this.factory.newConnection();

        } catch (NumberFormatException e) {
            LOGGER.error(String.format("Invalid Port Number %s in Configuration",this.port), e);
            System.exit(1);
        } catch (Exception e){
            LOGGER.error("Could not Initialise PublisherConnectionFactory for RabPubSub", e);
            System.exit(1);
        }



Exception:---------

java.io.IOException: null
    at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106)
    at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102)
    at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:347)
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516)
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:533)
    at com.wiziq.pubsub.publisher.core.provider.RabbitMQPublisherProvider.init(RabbitMQPublisherProvider.java:75)
    at com.wiziq.pubsub.publisher.Publisher.<init>(Publisher.java:25)
    at com.wiziq.pubsub.publisher.PublisherFactory.getPublisher(PublisherFactory.java:22)
    at com.wiziq.insight.service.PublishEventServiceImpl.init(PublishEventServiceImpl.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
ect-----------


but will be login on browser UI.

Wesley Peng

unread,
Mar 19, 2020, 7:48:29 AM3/19/20
to Ramesh xornor, rabbitmq-users
The default username/password only works on local host. Or you may need to provide more connection details for debug.

Thanks 

19 березня 2020 р., 18:51:41,від "Ramesh xornor" <ramesh...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/f08a14c8-5d9e-4a0b-8784-6f4407c647a9%40googlegroups.com.

Ramesh xornor

unread,
Mar 19, 2020, 8:30:58 AM3/19/20
to rabbitmq-users
Hi
I have created user admin and is login with local ip with port 15672 on browser but  i want to create connection on local ip and port(15672),username,password  with code. then comes error

Now your question's answer:--not use default user, i am using user "admin".
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.

Arnaud Cogoluègnes

unread,
Mar 20, 2020, 4:22:18 AM3/20/20
to rabbitm...@googlegroups.com
Please provide the versions you're using (Java client and server) and
the server logs as well.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages