Skip to content
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

Tomcat not starting, 401 errors on RHEL Enterprise server #9

Open
morphius101 opened this issue Feb 17, 2021 · 7 comments
Open

Tomcat not starting, 401 errors on RHEL Enterprise server #9

morphius101 opened this issue Feb 17, 2021 · 7 comments

Comments

@morphius101
Copy link

morphius101 commented Feb 17, 2021

Hi, we are receiving spring boot errors when trying to start up the application with the shell installation. Here is our setup.

RHEL Enteprise Linux Server 7.9

Error Log

2021-02-16 14:50:59.389  INFO 9137 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-02-16 14:50:59.389  INFO 9137 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 9579 ms
2021-02-16 14:50:59.860  INFO 9138 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2021-02-16 14:51:01.039 ERROR 9137 --- [           main] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'infoEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/info/InfoEndpointAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.info.InfoEndpoint]: Factory method 'infoEndpoint' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'infoContributorComposite' defined in URL [jar:file:/root/service-api.jar!/BOOT-INF/classes!/com/epam/ta/reportportal/info/InfoContributorComposite.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'analyzerInfoContributor' defined in URL [jar:file:/root/service-api.jar!/BOOT-INF/classes!/com/epam/ta/reportportal/info/AnalyzerInfoContributor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementTemplate' defined in class path resource [com/epam/ta/reportportal/core/configs/rabbit/AnalyzerRabbitMqConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.epam.ta.reportportal.core.analyzer.auto.client.RabbitMqManagementClient]: Factory method 'managementTemplate' threw exception; nested exception is org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized
2021-02-16 14:51:01.094  INFO 9137 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-02-16 14:51:01.101  WARN 9137 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2021-02-16 14:51:01.103  INFO 9137 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2021-02-16 14:51:01.121  INFO 9137 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2021-02-16 14:51:01.144  INFO 9137 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-16 14:51:01.150 ERROR 9137 --- [           main] o.s.boot.SpringApplication               : Application run failed```
@morphius101
Copy link
Author

Here is the start_rp.sh configuration:

#!/bin/bash
# redirect sdout/stderr to a file
exec &> reportportal.log

# JAVA OPTS

# API
SERVICE_API_JAVA_OPTS="-Xms1024m -Xmx2048m"
# UAT
SERVICE_UAT_JAVA_OPTS="-Xms512m -Xmx512m"

# Requirements

RP_POSTGRES_USER= <DBuser>
RP_POSTGRES_PASSWORD= <DBuserpassword>
RP_RABBITMQ_USER= <rabbitmqUser>
RP_RABBITMQ_PASSWORD= <RabbitmqUser password> 

# Deploy the services

# Traefik
./traefik --configFile=traefik.toml 2>&1 &

# service-migrations
PGPASSWORD=$RP_POSTGRES_PASSWORD psql -U $RP_POSTGRES_USER -d reportportal -a -f migrations/migrations/1_initialize_schema.up.sql -f migrations/migrations/2_initialize_quartz_schema.up.sql -f migrations/migrations/3_default_data.up.sql 2>&1 &

# service-index
RP_SERVER_PORT=9000 LB_URL=http://localhost:8081 ./service-index 2>&1 &

# service-api
RP_AMQP_HOST=localhost RP_AMQP_USER=$RP_RABBITMQ_USER RP_AMQP_PASS=$RP_RABBITMQ_PASSWORD RP_DB_USER=$RP_POSTGRES_USER RP_DB_PASS=$RP_POSTGRES_PASSWORD RP_DB_HOST=localhost java $SERVICE_API_JAVA_OPTS -jar service-api.jar 2>&1 &

# service-uat
RP_DB_HOST=localhost RP_DB_USER=$RP_POSTGRES_USER RP_DB_PASS=$RP_POSTGRES_PASSWORD java $SERVICE_UAT_JAVA_OPTS -jar service-uat.jar 2>&1 &

# service-ui
cd ui/ && RP_STATICS_PATH=../public RP_SERVER_PORT=3000 ./service-ui 2>&1 &

# service-analyzer
AMQP_URL="amqp://$RP_RABBITMQ_USER:$RP_RABBITMQ_PASSWORD@localhost:5672" ./service-analyzer 2>&1 &

@morphius101
Copy link
Author

Also, here is the download_services.sh that we are using. Please advise if anyone has any ideas on how to get this installed. Could there be an issue with the version?

#!/usr/bin/env bash

set -e

REPO_URL_BASE="https://dl.bintray.com/epam/reportportal"
REPO_URL_JAR="$REPO_URL_BASE/com/epam/reportportal"

# Versions of the services
API_VERSION="5.0.0"
UAT_VERSION="5.0.0"
ANALYZER_VERSION="5.0.0"
MIGRATIONS_VERSION="5.0.0"
UI_VERSION="5.0.0"
SERVICE_INDEX_VERSION="5.0.5"

# Downloading

wget -c -N -O service-api.jar ${REPO_URL_JAR}/service-api/${API_VERSION}/service-api-${API_VERSION}-exec.jar
wget -c -N -O service-uat.jar ${REPO_URL_JAR}/service-authorization/${UAT_VERSION}/service-authorization-${UAT_VERSION}-exec.jar
wget -c -N -O service-analyzer ${REPO_URL_BASE}/${ANALYZER_VERSION}/service-analyzer_linux_amd64
wget -c -N -O service-index ${REPO_URL_BASE}/${SERVICE_INDEX_VERSION}/service-index_linux_amd64
wget -c -N -O migrations.zip https://github.com/reportportal/migrations/archive/${MIGRATIONS_VERSION}.zip && unzip migrations.zip && mv migrations-${MIGRATIONS_VERSION} migrations && rm -f migrations.zip

#UI
#https://github.com/reportportal/service-ui/blob/master/Dockerfile

mkdir ui
wget -c -N -O service-ui ${REPO_URL_BASE}/${UI_VERSION}/service-ui_linux_amd64 && mv service-ui ui
chmod -R +x ui/*
wget -c -N -O ui.tar.gz ${REPO_URL_BASE}/${UI_VERSION}/ui.tar.gz
mkdir public
tar -zxvf ui.tar.gz -C public && rm -f ui.tar.gz

# GATEWAY

wget -c -N -O traefik https://github.com/containous/traefik/releases/download/v1.7.19/traefik_linux-amd64

# Traefik configuration file

wget -c -N -O traefik.toml https://raw.githubusercontent.com/reportportal/shell-installation/master/reportportal/traefik.toml


@Mohan-Kesavamurthy-TJX
Copy link

we also have the same issue, with this version.

@morphius101
Copy link
Author

Do we need to post this on the primary github repo!? Or is this not monitored?

@morphius101
Copy link
Author

we also have the same issue, with this version.

Hi there,

Have you found a fix for this by chance?

@Mohan-Kesavamurthy-TJX
Copy link

No luck, still waiting for some update from EPAM

@morphius101
Copy link
Author

No luck, still waiting for some update from EPAM

Do you think that we will get a quicker response by moving to main repository issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants