Channel error on connection rabbitmq, celery and django - django

=ERROR REPORT==== 18-Aug-2018::11:38:19 === Channel error on connection <0.17949.0> (IP:50872 -> IP:5672, vhost: 'myhost', user: 'myuser'), channel 1: {amqp_error,access_refused, "access to exchange 'celeryev' in vhost 'myhost' refused for user 'user'", 'exchange.declare'}
Following above is the error i am facing right now.
I had already running AWS instance, took a snapshot and put new django code over it. Run the celery task over it and facing this error in the rabbitmq server logs.
When check the snapshot there was no user and vhost. So i added the exact same name and password user and vhost. and set the permissions as administrator. And still keep facing this issue.
Any help in this regard would be much appreciated.

So what was my problem, actually the permissions were not set accurately. What i did from rabbitmq web interface i set the same permissions as the guest login, and it just start working fine.

Related

Configuration issues for oauth2 client Google on AWS ELB

Currently I'm running into some problems with a Google login on my Symfony 5.4 application.
I installed the bundle knpuniversity/oauth2-client-bundle on my symfony application and got everything working on my local development environment, which is based on docker.
When I deploy everything to the test environment so the stakeholders can test the functionality is does not work and I can't figure out what's wrong.
My guess is that the remote environment is behind a proxy, but I can't wrap my head around it how to configure this.
I configured the following:
knpu_oauth2_client:
http_client_options:
timeout: 0
proxy: 172.16.x.x
verify: false
clients:
google:
type: google
client_id: '%env(GOOGLE_CLIENT_ID)%'
client_secret: '%env(GOOGLE_CLIENT_SECRET)%'
redirect_route: google_login_check
redirect_params: {}
use_state: false
For the proxy ip-address I looked into AWS and I found 2 for the network addresses used by the load balancers, so I didn't knew which one to use. Then I dumped $_ENV on both ec2 instances (we have 2 instances per env), and saw that the REMOTE_ADDR was the same on both env's, so i assumed that that must be the correct ipaddress (172.16.x.x).
Now when I login to google I can login in, but when it tries to redirect after logging in, the server responds with an 504 gateway timeout error. Before I added the timeout:0 config the server responded with a 415 Unsupported Media Type error.
Can somebody point me in the right direction? Any help is much appreciated.

WSO2 Api Manager Control Plane not starting JMS server

I have a wso2apimanager-4.1.0 with the role of control-plane. In the wso2carbon.log, the following stack trace keeps appearing, especially when I try to deploy an API change. The main errors are "Caused by: org.wso2.andes.AMQConnectionFailureException: Server did not respond in a timely fashion [error code 408: Request Timeout]" and "ERROR {org.wso2.andes.client.AMQConnection} - Throwable Received but no listener set. org.wso2.andes.AMQDisconnectedException: Server closed connection and reconnection not permitted."
error_1
error_2
Despite these errors, the gateway-workers can connect to the control-plane on startup pulling all the APIs deployed on the API Manager ecosystem. Although, when I deploy a new version of an API, the gateways are not notified (because the JMS is down) and they do not pull the changes until they are rebooted.
I've already reviewed the jndi.properties, user-mgt.xml and all the superuser username and password are correct (they are pulled from deployment.toml correctly). The JMS port exists when the control-plane service starts and is not being blocked by any firewall, also the superuser password doesn't have special characters like '#'.
I've migrated the control-plane from version 4.0.0 to version 4.1.0 recently, the error did not occur in 4.0.0. The config file (deployment.toml) is the same.
Has anyone come across this problem? How can I resolve this error?

Django Celery RabbitMQ access denied (403) ACCESS_REFUSED

I have a django project with heroku with celery integrated. I've got the rabbitmq add-on through heroku and have tested my task locally to success. The issue I'm having is connecting my remote server to rabbitmq/cloudamqp.
I believe the credentials I'm using are the culprit of the problem, but I'm unsure where I'm going wrong. I'm using the credentials provided to me via the cloudamqp dashboard. This includes:
AMQP URL
User & Vhost
Password
In my settings.py I have:
CELERY_BROKER_URL= "amqp://{User}:{Password}#{AMQP URL}:5672/"
I've tried a variety of other forms with similar results. The latest error output is:
amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
Am I using the right credentials? Do I need to create a rabbitmq user through the command line and not the admin dashboard?
It seems that AMQP URL has all details (this is for service cloudamqp).
CELERY_BROKER_URL= "{AMQP URL}"

Django App not connecting to RDS since SSL/TLS Cert Updates

I have a Django app running on ELB connecting to a MySQL RDS db.
I checked recently and its no longer working (application is up fine but I get the following error when I try and deploy or run any manage.py db related commands. I can connect to the RDS DB manually without a problem.
django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on '****.eu-west-1.rds.amazonaws.com' (110)").
I believe this is to do with the recent updates to SSL/TLS certificates - however I've gone into my RDS dashboard and updated to the new 2019 version there and I'm still getting this error.
Does anyone know what might be causing this? It worked fine before the cert change so I can only assume it's related.
I've tried adding the ssl-ca rds-ca-2019-root.pem to the DB options in django but still get the same error regardless.
Any help would be super appreciated as I'm pretty stumped currently.
Thanks!
If you are using TLS for your DB connections, I've had the most success using the "combined" ca bundle that AWS provides.
The file can be found here https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem which is referenced in the Using SSL/TLS to Encrypt a Connection to a DB Instance guide.. It would be good to also review this guide to sanity check any of your other assumptions.

Heroku error with windows

When I tried login with heroku login and password with windows command prompt i got this error:
connection attempt failed errorno:ETIMEDOUT SOCKET ERROR
Can someone please let me know how to go through the process
There are a few github issues from people facing a similar issue in the past. They determined that problem is probably related to the user's network configuration blocking traffic on port 5000.