-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External rabbitmq instance without access to "/" vhost #1971
Comments
@nevesing , actually I do not understand why you need external Rabbit. Could you please explain? |
I mean a managed/on-prem rabbitmq instance which is not part of the docker-compose services. I use that instance for other projects and so want to use the same for reportportal. |
Below is from a k8s deployment using helmchart. Rabbitmq is deployed with same helm chart and I still see below errors relevant to
|
@nevesing hello. Could you try to set that variable for API and Jobs Services: We use |
@raikbitters Thanks. I tried as per your suggestion. I set It makes
|
We use different vhosts for API and Analyzer. For that reason could you create different vhosts for API service and Analyzer? |
Yes, it's correct. The service API uses the RabbitMQ manage API endpoint you provide here, |
Thanks @raikbitters. I see the same error "Not administrator user" and my changes are below. API credentials are correct otherwise we will not see this error. It is still trying to create RP_AMQP_API-ADDRESS: https://xxx:[email protected]/api
RP_AMQP_ANALYZER-VHOST: fs-qa-reportportal-analyzer-vh
RP_AMQP_BASE-VHOST: fs-qa-reportportal-api-vh |
@raikbitters could you suggest other workarounds/solution? |
I am still waiting for any help |
@nevesing hello. Did you provide credentials of admin user? |
@raikbitters yes the admin credentials I used is for the vhosts (fs-qa-reportportal-analyzer-vh and fs-qa-reportportal-api-vh) only (not for the entire managed rabbitmq instance) |
Docker container status:
|
|
Compose file for api and job service: api:
image: reportportal/service-api:5.11.1
container_name: reportportal-api
logging:
<<: *logging
depends_on:
gateway:
condition: service_started
postgres:
condition: service_healthy
environment:
RP_DB_HOST: postgres
RP_DB_USER: *db_user
RP_DB_PASS: *db_password
RP_DB_NAME: *db_name
RP_AMQP_HOST: &rabbitmq_host rabbitmq-external.xxx.com
RP_AMQP_API-ADDRESS: &rabbitmq_api_host https://admin:[email protected]/api
RP_AMQP_PORT: &rabbitmq_port 5672
RP_AMQP_USER: &rabbitmq_user admin
RP_AMQP_PASS: &rabbitmq_password xxxx
RP_AMQP_APIUSER: *rabbitmq_user
RP_AMQP_APIPASS: *rabbitmq_password
RP_AMQP_ANALYZER-VHOST: fs-qa-reportportal-analyzer-vh
RP_AMQP_BASE-VHOST: fs-qa-reportportal-api-vh
DATASTORE_TYPE: filesystem
LOGGING_LEVEL_ORG_HIBERNATE_SQL: debug
RP_REQUESTLOGGING: "false"
AUDIT_LOGGER: "OFF"
MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: "false"
RP_ENVIRONMENT_VARIABLE_ALLOW_DELETE_ACCOUNT: "false"
LOGGING_LEVEL_COM_EPAM_TA_REPORTPORTAL_WS_CONTROLLER: debug
LOGGING_LEVEL_COM_EPAM_TA_REPORTPORTAL_WS_RABBIT: debug
JAVA_OPTS: >
-Xmx1g
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/tmp
-Dcom.sun.management.jmxremote.rmi.port=12349
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=0.0.0.0
RP_JOBS_BASEURL: http://jobs:8686
COM_TA_REPORTPORTAL_JOB_INTERRUPT_BROKEN_LAUNCHES_CRON: PT1H
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_BATCH-SIZE: 100
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_PREFETCH-COUNT: 1
RP_ENVIRONMENT_VARIABLE_PATTERN-ANALYSIS_CONSUMERS-COUNT: 1
volumes:
- storage:/data/storage
healthcheck:
test: curl -f http://0.0.0.0:8585/health
interval: 60s
timeout: 30s
retries: 10
start_period: 60s
labels:
- "traefik.http.middlewares.api-strip-prefix.stripprefix.prefixes=/api"
- "traefik.http.routers.api.middlewares=api-strip-prefix@docker"
- "traefik.http.routers.api.rule=PathPrefix(`/api`)"
- "traefik.http.routers.api.service=api"
- "traefik.http.services.api.loadbalancer.server.port=8585"
- "traefik.http.services.api.loadbalancer.server.scheme=http"
- "traefik.expose=true"
networks:
- reportportal
restart: always
jobs:
image: reportportal/service-jobs:5.11.1
container_name: reportportal-jobs
logging:
<<: *logging
depends_on:
gateway:
condition: service_started
environment:
RP_DB_HOST: postgres
RP_DB_USER: *db_user
RP_DB_PASS: *db_password
RP_DB_NAME: *db_name
RP_AMQP_HOST: *rabbitmq_host
RP_AMQP_PORT: *rabbitmq_port
RP_AMQP_USER: *rabbitmq_user
RP_AMQP_PASS: *rabbitmq_password
RP_AMQP_API-ADDRESS: *rabbitmq_api_host
RP_AMQP_APIUSER: *rabbitmq_user
RP_AMQP_APIPASS: *rabbitmq_password
RP_AMQP_ANALYZER-VHOST: fs-qa-reportportal-analyzer-vh
RP_AMQP_BASE-VHOST: fs-qa-reportportal-api-vh
DATASTORE_TYPE: filesystem
RP_ENVIRONMENT_VARIABLE_CLEAN_ATTACHMENT_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_LOG_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_LAUNCH_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_STORAGE_PROJECT_CRON: 0 */5 * * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EXPIREDUSER_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EXPIREDUSER_RETENTIONPERIOD: 365
RP_ENVIRONMENT_VARIABLE_NOTIFICATION_EXPIREDUSER_CRON: 0 0 */24 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_RETENTIONPERIOD: 365
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_CRON: 0 30 05 * * *
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CHUNKSIZE: 20000
RP_PROCESSING_LOG_MAXBATCHSIZE: 2000
RP_PROCESSING_LOG_MAXBATCHTIMEOUT: 6000
RP_AMQP_MAXLOGCONSUMER: 1
JAVA_OPTS: >
-Djava.security.egd=file:/dev/./urandom
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:G1ReservePercent=20
-XX:InitiatingHeapOccupancyPercent=60
-XX:MaxRAMPercentage=70.0
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/tmp
volumes:
- storage:/data/storage
healthcheck:
test: curl -f http://0.0.0.0:8686/health || exit 1
interval: 60s
timeout: 30s
retries: 10
start_period: 60s
labels:
- traefik.http.middlewares.jobs-strip-prefix.stripprefix.prefixes=/jobs
- traefik.http.routers.jobs.middlewares=jobs-strip-prefix@docker
- traefik.http.routers.jobs.rule=PathPrefix(`/jobs`)
- traefik.http.routers.jobs.service=jobs
- traefik.http.services.jobs.loadbalancer.server.port=8686
- traefik.http.services.jobs.loadbalancer.server.scheme=http
- traefik.expose=true
networks:
- reportportal
restart: always |
@hlebkanonik hello. Could you check the configuration? Maybe I'm missing something. |
@nevesing, could you give temporary admin access to the whole instance for testing? Maybe API Service use some common API. |
@raikbitters Yes the global admin works always. However it is not allowed since I can create 100s of new vhosts as i wish. https://www.rabbitmq.com/docs/vhosts#using-http-api
|
I am trying to use external rabbitmq instance where we dont have access to
/
vhost and our internal team who host this rabbitmq instance do not provide access to/
vhost. We configureRP_AMQP_ANALYZER-VHOST
to specific vhost but still it tries to connect to additional vhost/
Error logs if we use external hosted rabbitmq:
Success logs if we use internal rabbitmq in docker--compose:
The text was updated successfully, but these errors were encountered: