I am trying to connect to my rabbitmq server.
I am using
require 'carrot'
#client = Carrot.new(:host => 10.xx.xx.xx, :port => 5672)
q = #client.queue("my_queue")
I am getting this error
"#<Carrot::AMQP::Server::ServerDown: Connection reset by peer>"
How do I check if my server is down? and how do I restart it?
rabbitmq-server
Can you help us to help you with some additional info?
What version of Ruby?
What version of RabbitMQ?
Where is your RabbitMQ broker running?
Do you have any kind of firewall preventing you from connecting to the RabbitMQ broker port?
Do you know whetherany security is enabled?
If you have access to the command line of the server where the broker is running, you should be able to see an Erlang process if you execute ps -ef | grep rabbitmq
To start the broker, run
rabbitmq-server
I am able to run your code OK against RabbitMQ 3.0.1 running on my local machine with latest Ruby and Carrot gem, the only correction was that the host IP address needed to be enclosed in double quotes.
Related
I'm trying to connect from an external client (my laptop) to a broker in a Kafka cluster that I have running on ec2 machines. When I try and connect from my local machine I get the following error:
$ ./kafka-console-producer --broker-list AWS.PRIV.ATE.IP:9092 --topic test
>hi
>[2018-09-20 13:28:53,952] ERROR Error when sending message to topic test with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for test-0: 1519 ms has passed since batch creation plus linger time
The topic exists because if I run (from local machine)
$ ./kafka-topics --list --zookeeper AWS.PRIV.ATE.IP:2181
__confluent.support.metrics
__consumer_offsets
_schemas
connect-configs
connect-offsets
connect-status
test
The cluster configuration is from Confluent's AWS quickstart template: https://github.com/aws-quickstart/quickstart-confluent-kafka/blob/master/templates/confluent-kafka.template and I'm running the open source version.
The three broker ec2 instances are visible to my local machine, which I verified by stopping the Kafka broker, starting a simple HTTP server on port 9092, and successfully curling that server using the internal IP address of the ec2 instance.
If I ssh into one of the broker instances I can successfully produce and consume messages across the cluster. The only update I've made to the out-of-the-box configuration provided by the template is changing listeners=PLAINTEXT://ec2-AWS-PUB-LIC-IP.compute-1.amazonaws.com:9092 in server.properties on each machine and then restarted the kafka server.
I can provide more configuration or debugging info if necessary. Believe the issue is something regarding IP address discoverability/visibility but I'm not entirely sure what.
You need to set advertised.listeners too.
See https://rmoff.net/2018/08/02/kafka-listeners-explained/ for details.
I am trying to document my React Components and I am running styleguidist server along side with Laravel development server but the styleguidist server crashes with this error.
You have another server running at port 6060 somewhere, shut it down first
You can change the port using the `serverPort` option in your style guide config:
https://react-styleguidist.js.org/docs/configuration.html
I have configured the styleguidist server to run at port 6060 as to resolve this issue and succeeded to run the server only once. After that I am getting this issue again.
How can i resolve this??
The error is saying you have something else running at that port. Have you tried a different one? If you are running a UNIX system, you can see what is running on that port with:
lsof -i tcp:6060
i am facing the issue in webshpere ..the server is not staringReading configuration for server: server1
ADMU3028I: Conflict detected on port 8896. Likely causes: a) An instance of
the server server1 is already running b) some other process is
using port 8896
ADMU3027E: An instance of the server may already be running: server1
ADMU0111E: Program exiting with error:
com.ibm.websphere.management.exception.AdminException: ADMU3027E: An
instance of the server may already be running: server1
The error seems quite explicit: another program is using port 8896.
To verify this you can use these commands:
(Linux) sudo netstat -lptu|grep 8896
(Windows) netstat -a -b (or other tools)
You can decide to stop the process that create the conflict or change the ports used by WAS:
Updating ports in existing profile
This can be caused when the services don't shut down correctly and the java.exe processes hold a lock on the applications port. (8896).
To resolve this problem you can use one of the following options.
1) Open your taskmanager and end task the java.exe process for your JVM that is holding a lock on the servers port then restart the JVM from the WebSphere console
2) You can restart the physical server so the java.exe process shuts down and releases the port. Once the server starts back up you can start JVM and bring the application up.
I have a simple sinatra app running on an AWS windows instance. Running the application from the localhost works fine (i.e. http://localhost:4567), but I am unable to run it remotely.
My AWS windows instance is available to me from remote as I am able to connect to it using RDP.
After reading some other similar issues, I have already applied the following:
My AWS security group is opened for port 4567 (I actually also opened it for any inbound connection just to see if that will solve the issue - it didn't)
I tried running: ruby my_sinatra_app.rb -o 0.0.0.0
I tried running: ruby my_sinatra_app.rb -e production
I tried adding to the application itself the following code: set :bind, '0.0.0.0'
I am still unable to run the application remotely. Any idea?
I was able to solve my issue, so for the sake of completeness I am publishing the answer.
This wasn't a Sinatra issue, but an AWS issue (maybe not really an issue, more like my misunderstanding). I was under the impression that updating the AWS security group for opening the 4567 port will do the trick.
However, it turns out that I needed also to open the port on the Windows Firewall on my Windows AWS instance. After opening the port on the Windows Firewall I was able to remotely connect to my Sinatra app.
I have torquebox installed in my jruby on Rails application. And I am experimenting with using stomp + websockets. But I can't tell if the websocket server is even running? I am booting up torquebox in my console with: sudo torquebox run --clustered -b my.ip.address
I keep going through the output from torquebox booting up and the only relevant output I am seeing is this:
[org.torquebox.stomp.as] Initializing TorqueBox STOMP Subsystem
and
[org.projectodd.polyglot.stomp.as] Initializing Polyglot STOMP Subsystem
I don't see anything referencing port 8675, which according to the docs is the port it is supposed to run on. I tried telnet as well and received a 'connection refused' message.
Any help or references would be great. Thanks
Apologies for the dumb question. I just had a typo in my torquebox.yml file. I can now see the output in the bootup that specifies the websocket server is up and I can successfully telnet in.