Still cant access localhost:5762 after starting RabbitMQ server - java

Tried accessing the RabbitMQ management page on localhost:5672 and the connection is being refused. I have reinstalled RabbitMQ via Homebrew and still running into the same problem. I ran rabbitmq-server after the reinstallation and got back this prompt:
## ## RabbitMQ 3.8.1
## ##
########## Copyright (c) 2007-2019 Pivotal Software, Inc.
###### ##
########## Licensed under the MPL 1.1. Website: https://rabbitmq.com
Doc guides: https://rabbitmq.com/documentation.html
Support: https://rabbitmq.com/contact.html
Tutorials: https://rabbitmq.com/getstarted.html
Monitoring: https://rabbitmq.com/monitoring.html
Logs: /usr/local/var/log/rabbitmq/rabbit#localhost.log
/usr/local/var/log/rabbitmq/rabbit#localhost_upgrade.log
Config file(s): (none)
Starting broker... completed with 6 plugins.
Not sure why I cant access the management page via the default port. I had a few applications using RabbitMQ running and none of them are working now. What is the best way to completely uninstall RabbitMQ from a Mac so that I can run a clean install?

I think you should have to enable management plugin as stated in rabbitmq documention:
The management plugin is included in the RabbitMQ distribution. Like any other plugin, it must be enabled before it can be used.
Just go to your rabbitmq installation directory (example path /usr/save/rabbitmq_server-x.x.x/sbin) and run following command:
rabbitmq-plugins enable rabbitmq_management
After this if rabbitmq management still not accessible try to stop and restart rabbitmq server.
Here are reference link:
Rabbitmq documention on management plugin
Rabbitmq different networking ports information

To answer these:
Not sure why I cant access the management page via the default port.
Still cant access localhost:5762 after starting RabbitMQ server
If the rabbitmqctl status / rabbitmq-diagnostics status command shows a listener like this:
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
then RabbitMQ might be setup correctly.
Probable cause: Http redirection
The issue might rather be with the URL that's visited. Chrome could be set to redirect HTTP to HTTPS. If this is so, and you don't have an HTTPS listener setup, you'd see a ERR_SSL_PROTOCOL_ERROR.
To get around this, you can disable redirection on Chrome only for localhost. By doing so, http://localhost:15672 will no longer be redirected to https://localhost:15672 and the management web client will therefore be visible.
How to disable HTTP redirection for a domain in Chrome
Visit chrome://net-internals/#hsts
Delete domain security policies for the domain (in this case simply enter localhost)
Click the Delete button

Related

How to disable ssl connection for specific api calls on tomcat 8?

I am setting up my tomcat 8 server to use a SSL connection and the application is working fine - the redirect from HTTP to HTTPS is good, but I need to find a way to allow HTTP for some pages (API calls).
Why do I need that? because those API calls are trying to upload/download something to/from the server and because the connection is secure, those files are firstly - encrypted, secondly - decrypted and finally - used. And because the CPU has low performance, the upload/download speed is very poor.
I've tried to change configuration from conf/web.xml file, with no success.
If I change the parameter from CONFIDENTIAL to NONE, but both connection types (HTTP /HTTPS) will be enabled - and this is not what I need.
Any help in this direction is appreciated.
Thank you,
If you are using the Linux system like Ubuntu, then, instead of setting up an SSL connection setup in Tomcat, you will use the Nginx server. Use the following link for installation. In the Nginx server configuration file, nginx.conf, you can define a location inside the server name setting and then you can filter the APIs that you do not want to enable as HTTPS.
For setting SSL in Nginx, you have to use the ssl_certificate & ssl_certificate_key setting.

Glassfish 4.1 configure http/https proxy

To access external endpoints I have to go through proxy server. I have been trying to configure the http and https proxy in my glassfish 4.1 server but have had no success. I've tried adding the following sets of Java Options in my domain.xml - manually and through UI. But am still getting "Network is unreachable; nested exception is java.net.SocketException:
Network is unreachable" error.
<jvm-options>-Djava.http.proxyHost=proxy.domain.com</jvm-options>
<jvm-options>-Djava.http.proxyPort=3128</jvm-options>
<jvm-options>-Djava.https.proxyHost=proxy.domain.com</jvm-options>
<jvm-options>-Djava.https.proxyPort=3128</jvm-options>
**********************************************************************
<jvm-options>-Dhttp.proxyHost=proxy.domain.com</jvm-options>
<jvm-options>-Dhttp.proxyPort=3128</jvm-options>
<jvm-options>-Dhttps.proxyHost=proxy.domain.com</jvm-options>
<jvm-options>-Dhttps.proxyPort=3128</jvm-options>
When I check the process (ps -ef | grep java) I can see the Java Options have been applied. I also need to implement http.nonProxyHosts ( something like -Dhttp.nonProxyHosts= *.mydomain.com|localhost ) since some are internal endpoints and need to escape the proxy. But that's the second battle. Any help on this would be very much appreciated.
https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html

Dropwizard config (yml) behaves strangely

I'm working with the Dropwizard sample project from the tutorial and faced the following strange issue:
With the following server config
server:
type: default
applicationConnectors:
- type: http
port: 8080
My resource returns the correct response.
When I change it to:
server:
type: simple
I see (from Jetty's logs) that it was correctly registered and loaded but doesn't work - if I try the same path I see 404 in browser and
GET /wizard-resource/rs 200
in the logs. I've tried to find the difference between simple and default in yaml configs but Google didn't shed much light on the topic.
So, here are two questions:
Why with simple connector do I get a 200 in logs but 404 in browser?
What is the use of simple connector and when it is better than default?
According to Dropwizard Javadocs:
Simple Server
A single-connector implementation of {#link ServerFactory}, suitable
for PaaS deployments (e.g., Heroku) where applications are limited to
a single, runtime-defined port. A startup script can override the
port via {#code -Ddw.server.connector.port=$PORT}.
Default Server
The default implementation of {#link ServerFactory}, which allows for
multiple sets of application and admin connectors, all running on
separate ports. Admin connectors use a separate thread pool to keep
the control and data planes separate(ish).
It's also mentioned (though not thoroughly) in the Configuration Reference documentation.
Not sure why it's logged as 200 while it's 404, it could be a bug; but the reason you're getting 404 could be because the default applicationContextPath config in simple server is /application. So if you try
GET /application/wizard-resource/rs
it should work.

Mule outbound HTTP endpoints via proxy

I have a mule application deployed on linux (RHEL 6) box which talks to twilio API and Gmail API. The server where the mule application is deployed has to go out via proxy.
I have modified /usr/local/mule-standalone-3.5.0/conf/wrapper.conf and added additional java property for proxy settings (using wrapper.java.additional.4)
and when I search the mule process, here is what I see
$ ps -ef | grep mule
root 12940 12938 0 Dec04 ? 00:04:24 java -Dmule.home=/usr/local/mule-standalone-3.5.0 -Dmule.base=/usr/local/mule-standalone-3.5.0 -Djava.net.preferIPv4Stack=TRUE **-Dhttp.proxyHost=http://<proxy> -Dhttp.proxyPort=80 -Dhttps.proxyHost=http://<proxy> -Dhttps.proxyPort=80**
I still am not able to hit the outbound HTTP/ HTTPS urls.
Is there a different way of setting outbound proxy in mule?
Please try configuring the proxy in the connector.

Timeout while deploying Java Application to remote glassfish server from Netbeans

while deploying to a remote Glassfish 4.1 Server from Netbeans 8.0.1, i get a Timeout.
I configured the Glassfish Server by adding a new Server Instance and that seemed to work. I can see the applications running on the server and i am able to undeploy a application (directly from netbeans).
But when i try to deploy my application to the remote Server, i get a timeout Exception.
(i used enable-secure-admin to gain remote access from netbeans to the server)
What confuses me is, that when i enabled secure admin, i expected to see a https:// url in netbeans. But this url starts with http:// and i cant find an option to change this.
Server Attributes:
Host: [remote-ip]
DAS Port: 4848
Domain: domain1 (same as on the remote server)
Target: empty
Username PW : as set on the remote server
"Enable JDBC Driver Deployment" and "Preserve Sessions Across Redeployment" are checked
Could you please attach the logs.
most probably its issue with the grizzly jar.
Please try the patched grizzly jar and see if it works for you.
Checkout : https://java.net/jira/browse/GRIZZLY-1713 for the same

Categories