I installed Rabbitmq (v3.5.6) via brew.
I can use command (/usr/local/Cellar/rabbitmq/sbin/rabbitmq-server) to start server,
and I can use http://localhost:15672/ to browse the management page.
I guess I install Rabbitmq successfully.
I want to change the AMQP port to 5673, and I follow the document,
edit /usr/local/etc/rabbitmq/rabbitmq.config as below, but fail.
[
{rabbit, [{tcp_listeners, [5673]}]}
].
The port still is 5673. However, I can use this file to set mqtt port to 11883 (default 1883).
What happens?
Yes, the file should be
/etc/rabbitmq/rabbitmq.conf
I thing that your problem is that you are not rebooting your server/computer.
To apply the changes in your configuration file you have to reboot your server.
Related
I have installed RabbitMQ broker on Windows Server 2016. I have to connect to it using NodeJS client but it continuously disconnects and again connect to the broker. Can you please suggest what might have gone wrong ? I have gone through many articles but nothing solved my issue.
In order to achieve this,I have mentioned tcp keep-alive in rabbitmq.config file but it didn't solve my issue.
My configuration file looks like following :
rabbitmq.config (Location : C:\Users\\AppData\Roaming\RabbitMQ)
mqtt.listeners.tcp.default = 1883
## Default MQTT with TLS port is 8883
# mqtt.listeners.ssl.default = 8883
# anonymous connections, if allowed, will use the default
# credentials specified here
mqtt.allow_anonymous = true
mqtt.default_user = test
mqtt.default_pass = test
mqtt.vhost = dev
mqtt.exchange = amq.topic
# 24 hours by default
mqtt.subscription_ttl = 86400000
mqtt.prefetch = 10
net.ipv4.tcp_keepalive_time=60
net.ipv4.tcp_keepalive_intvl=20
net.ipv4.tcp_keepalive_probes=3
handshake_timeout = 60000
Ideally client should connect to the broker only once and keep on listening on a port from that broker. It should never disconnect in between.
After making some changes in config file I always stop rabbitmq and again starts by using following commands from sbin directory of RabbitMQ :
rabbitmq-service.bat stop
rabbitmq-service.bat install
rabbitmq-service.bat start
When I hit 2nd command, I get error that the configuration file should be in Erlang format with '.conf' extension. I did that as well but I faced same issue again.
Is there anything missing in configuration ? Please suggest.
I found that clients are sensitive, if you try to acknowlage the same message twice, for example, they will disconnect. Are you doing anything at all after you connect to the broker? Setting up queues that already exist with different params, declaring exchanges?
I have installed two broker of Mosquitto (1.4.2-3.2x86_64)and RabbitMQ (3.5.3-1) using newest version so far on CentOS 6 servers. With default configuration i can sub/pub messages for each broker separately, this mean that MQTT is running normally.
But when i bridge Mosquitto server to a RabbitMQ server, i face below problem right after i change mosquitto.conf file:
"Connecting bridge (Rabbit-IP)
Socket error on client client_name, disconnecting".
My bridge configuration in mosquitto.conf is:
connection test
address Rabbitmq-IP
topic # both 0 local/ remote/
Can you explain to me !
Thanks !
Try to use this option in your config file for the bridge
try_private false
This is an option that will tell the other broker that this is a bridge connection and defaults to true and if the RabbitMQ doesn't supports it, then it would not allow you to connect.
Did some google on it and the solution was to redirect using iptables or mod in apache? Since my application uses websockets the above solution breaks my websocket connectivity and I again have to connect to my websockets using port 8080. Is there any way that I can run the glassfish itself on port 80 so that my websockets also run on port 80 making easier for users behind corporate firewall to access the app since corparates may block 8080.
I have root access as well.
To run GlassFish on port 80 you need to :
Connect to the administration interface (by default on port :4848)
In the left menu go to Configurations
Then select the appropriate configuration you need to change eg server-config
Then go to Network Config
Then go to Network Listeners
Select the appropriate listener, probably http-listener-1
Change the Port value to 80
Save and reboot your GlassFish server/instance/cluster according to your needs
Using the command line utility
asadmin set configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.port=80
you may need to replace server-config and/or http-listener-1
Go to glassfish4\glassfish\domains\domain1\config folder and here open domain.xml file
and find tag
<network-listeners>
<network-listener port="9999" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
</network-listeners>
in port attribute of <network-listeners> you can specify your port address whichever you want.
Here's another approach.
You can go to the admin console under port 4848 (I am using Glassfish 4.1.2) and navigate to "Configuration" > "server-config" > "HTTP Service" > "Http Listeners" > "http-listener-1" in the left hand navigation.
Click on the "http-listener-1" link in the main content window.
Change the port to desired number and save.
Restart Glassfish and run your application.
in some cases you have to change port before glassfish is started (in my case port 8080 is already in use by another instance) so answer 4 worked for me.
Following are simple steps to change the port number of Glassfish server (GlassFish runs by default on port number 8080):
Go to the folder where Glassfish is installed.
Locate config folder which is as follows (Windows):
C:\Program Files\glassfish-3.0.1\glassfish\domains\domain1\config
Open domain.xml using any text editor.
Look for 8080 and change it to some other port number that doesn’t conflict with other port numbers (e.g. 8081).
Save domain.xml.
Additional step if necessary:
Now remove GlassFish from IDE and add it again so that IDE understands the new port number.
Restart GlassFish, if it was already running.
Soruce Link
This is what shows up when I attempt to run Apache without Apache service being activated:
>Status change detected: running
>Status change detected: stopped
>Error: Apache shutdown unexpectedly.
>This may be due to a blocked port, missing dependencies,
>improper privileges, a crash, or a shutdown by another method.
>Check the "/xampp/apache/logs/error.log" file
>and the Windows Event Viewer for more clues
This is what happens when I attempt to install the Apache service:
>Installing service...
>Apache Service detected with wrong path
>Change XAMPP Apache settings or
>Uninstall/disable the other service manually first
>Found Path: ERROR: Not Able To Open Service Manager
>Expected Path: "c:\xampp\apache\bin\httpd.exe" -k run service
>Successful!
...followed by attempting to start Apache after the service (failed) attempt:
>Attempting to start Apache service...
>System Error. Code: 5.
>Access is denied
Does anyone know what's going on here and/or are able to help troubleshoot?
I've already uninstalled and reinstalled with and without (zip file extraction) the installer.
It sounds like something may be running on port 80 already. What happens when you run
netstat -an |find /i "listening"
from the command line?
I had those messages as well. You probably have IIS and XAMPP clashing at port 80. You can either:
disable IIS (if you are not going to run the server regularly).
change XAMPP default ports.
change IIS default ports.
To change XAMPP default ports
Open your XAMPP\apache\conf\httpd.conf file and change the "80" ports to something else, people like "8080".
Open your XAMPP\apache\conf\extra\httpd-ssl.conf file and change the "443" ports to another number.
It should make both services run without conflicts.
I installed ActiveMQ 5.5.0 on my Windows machine, and it had a web console (http://localhost:8161/admin) working out of the box.
Then I installed ActiveMQ (same version) on a remote Linux box (IP: AAA.BBB.CCC.DDD), but whenever I point the browser to
http://AAA.BBB.CCC.DDD:8161/admin
I get the "Unable to connect" error in the browser.
The network connection is there, I can connect to AAA.BBB.CCC.DDD via ssh and to another web application running on the same server.
Therefore I think that the cause of the problem is wrong configuration of the embedded Jetty server of ActiveMQ.
How can fix the problem, i. e. enable the access to the web console from a remote browser?
In your ActiveMQ config file you should see something like:
<import resource="${activemq.base}/conf/jetty.xml"/>
This starts up an embedded Jetty container with the web console.
If you start the broker on the console, you should see the following if everything works
INFO | ActiveMQ WebConsole initialized.
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
into /opt/activemq/apache-activemq-5.16.3/conf
open jetty.xml
change
<property name="host" value="127.0.0.1"/>
to
<property name="host" value="0.0.0.0"/>
restart activemq
I used this approach on a linux server running in VM but can be applied to any instance
Check whether 8161 port is opened for external connection. Also check whether another service creating a conflict.
If there is a conflict
change the jetty port in the {activemqfolder}/conf/jetty.xml.
locate the line that contains the 8161 and change it to the desirable port
To enable external connections to the port (in this instance i choose 8169) use
sudo iptables -I INPUT -p tcp --dport 8169 -j ACCEPT
Proceed to start the activemq ie {activemqfolder}/bin/activemq console to see the messages