elasticsearch.yml ses email config - elasticsearch

Took the config from elastic search documentation, and added it to elastic cloud yml.
xpack.notification.email.account:
ses_account:
smtp:
auth: true
starttls.enable: true
starttls.required: true
host: email-smtp.us-east-1.amazonaws.com
port: 587
user: <username>
password: <password>
giving me the below error:
'xpack.notification.email.account.ses_account.profile': is not allowed

Related

Invalid helo name Jhipster

I have set the file application-prod.yml with mail account but it is not working with mail server , it returns error 550 invalid helo name. i want to know where i can set host correctly.
thanks
mail:
host: mail.xxxx.cloud
port: 587
username: register#xxxx.cloud
password: xxxxxxxxxx
protocol: smtp
tls: true
properties.mail.smtp:
auth: true
starttls.enable: true
ssl.trust: mail.xxxx.cloud
...
...
...
mail:
from: register#xxxx.cloud
base-url: https://host.xxxx.cloud/

Missing authentication credentials for REST request when using sniffing when Kibana starts

I just upgraded ELK from 7.1.0 to 7.5.0 and Kibana fails to start with
{"type":"log","#timestamp":"2020-01-22T17:27:54Z","tags":["error","elasticsearch","data"],"pid":23107,"message":"Request error, retrying\nGET http://localhost:9200/_xpack => socket hang up"}
{"type":"log","#timestamp":"2020-01-22T17:27:55Z","tags":["info","plugins-system"],"pid":23107,"message":"Starting [8] plugins: [security,licensing,code,timelion,features,spaces,translations,data]"}
{"type":"log","#timestamp":"2020-01-22T17:27:55Z","tags":["warning","plugins","licensing"],"pid":23107,"message":"License information could not be obtained from Elasticsearch for the [data] cluster. [security_exception] missing authentication credentials for REST request [/_xpack], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } :: {\"path\":\"/_xpack\",\"statusCode\":401,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication credentials for REST request [/_xpack]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"}}],\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication credentials for REST request [/_xpack]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"}},\\\"status\\\":401}\",\"wwwAuthenticateDirective\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}"}
when having the following two options enabled:
elasticsearch.sniffOnStart: true
elasticsearch.sniffOnConnectionFault: true
Any idea what I am doing wrong ?
The complete Kibana config follows:
server.port: 5601
server.host: 0.0.0.0
server.name: kibana
kibana.index: ".kibana"
kibana.defaultAppId: "discover"
elasticsearch.hosts: ["http://node1.test.com:9200", "http://node2.test.com:9200", "http://node3.test.com:9200", "http://node4.test.com:9200", "http://node5.test.com:9200"]
elasticsearch.pingTimeout: 1500
elasticsearch.requestTimeout: 30000
elasticsearch.logQueries: true
elasticsearch.sniffOnStart: true
elasticsearch.sniffOnConnectionFault: true
elasticsearch.username: "kibana"
elasticsearch.password: "XXX"
logging.dest: /var/log/kibana.log
logging.verbose: false
xpack.security.enabled: true
xpack.monitoring.enabled: true
xpack.monitoring.ui.enabled: true
xpack.security.encryptionKey: "XXX"
If I remove elasticsearch.sniffOnStart: true all is well.
This "xpack.security.enabled: false" worked for 6.2.x version as well

Unable to resolve values from spring boot application yaml files

Hi I am haveing a spring boot rest based application . I have added a couple of properties related to elastic search in my application-dev.yml and application-prod.yml file . These properties are injected into my PerformanceReportingRepository class . however they are set to null .
so following is my yml definition .
# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================
logging:
level:
ROOT: TRACE
com.openmind.primecast: DEBUG
io.github.jhipster: TRACE
spring:
profiles:
active: dev
include: swagger
devtools:
restart:
enabled: true
livereload:
enabled: false # we use gulp + BrowserSync for livereload
jackson:
serialization.indent_output: true
data:
cassandra:
contactPoints: localhost
protocolVersion: V4
compression: LZ4
keyspaceName: Openmind
mail:
host: localhost
port: 25
username:
password:
properties:
mail:
smtp:
auth: true
starttls.enable: true
messages:
cache-seconds: 1
thymeleaf:
cache: false
http:
multipart:
maxFileSize: 150MB
maxRequestSize: 150MB
# ===================================================================
# To enable SSL, generate a certificate using:
# keytool -genkey -alias primecast -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650
#
# You can also use Let's Encrypt:
# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm
#
# Then, modify the server.ssl properties so your "server" configuration looks like:
#
# server:
# port: 8443
# ssl:
# key-store: keystore.p12
# key-store-password: <your-password>
# key-store-type: PKCS12
# key-alias: primecast
# ===================================================================
server:
port: 8080
# ===================================================================
# JHipster specific properties
#
# Full reference is available at: http://www.jhipster.tech/common-application-properties/
# ===================================================================
jhipster:
http:
version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration)
cache: # Cache configuration
hazelcast: # Hazelcast distributed cache
time-to-live-seconds: 3600
backup-count: 1
management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html
enabled: false
update-interval: 3
url: http://localhost:8180/mancenter
# CORS is only enabled by default with the "dev" profile, so BrowserSync can access the API
cors:
allowed-origins: "*"
allowed-methods: "*"
allowed-headers: "*"
exposed-headers: "Authorization,Link,X-Total-Count"
allow-credentials: true
max-age: 1800
security:
authentication:
jwt:
secret: my-secret-token-to-change-in-production
# Token is valid 24 hours
token-validity-in-seconds: 86400
token-validity-in-seconds-for-remember-me: 2592000
mail: # specific JHipster mail property, for standard properties see MailProperties
from: primecast#localhost
base-url: http://127.0.0.1:8080
metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
jmx.enabled: true
graphite: # Use the "graphite" Maven profile to have the Graphite dependencies
enabled: false
host: localhost
port: 2003
prefix: primecast
prometheus: # Use the "prometheus" Maven profile to have the Prometheus dependencies
enabled: false
endpoint: /prometheusMetrics
logs: # Reports Dropwizard metrics in the logs
enabled: false
report-frequency: 60 # in seconds
logging:
logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
enabled: false
host: localhost
port: 5000
queue-size: 512
google:
accessToken: AIzaSyBasWNyK7ELbLlopD3anXrJCgtXUPRZYN8
endpoint: https://www.googleapis.com/urlshortener/v1/url
urlshortener:
is.gd:
endpoint: https://is.gd
http:
proxyEnabled: false
proxyHost:
proxyPort:
password:
expiryInDays: 90
historyCount: 3
expiryEmailAlertInDays: 3
policy: '^(?!.*(.)\1\1)(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!#$%^&*-]).{8,}.*$'
file:
size: 5242880
elasticsearch:
host: localhost
port: 9200
and my repository class is
#Repository
public class PerformanceReportingRepository {
#Value("${elasticsearch.host}")
private String host;
#Value("${elasticsearch.port}")
private Integer port;
#Value("${file.size}")
private long fileUploadSizeLimit;
private RestHighLevelClient elasticSearchClient;
public PerformanceReportingRepository() {
System.out.println(this.fileUploadSizeLimit);
this.elasticSearchClient = new RestHighLevelClient(RestClient.builder(new HttpHost(host, port)));
}
public void setElasticSearchClient(RestHighLevelClient elasticSearchClient) {
this.elasticSearchClient = elasticSearchClient;
}
}
However the bean creation fails because host and port are not resolved from the yaml file.
I am sharing the project in https://github.com/prasanthmp500/mep.git
please checkout the branch ENG-170-performance-reports
appreciate any help
thanks a lot

Email service in Jhipster

I'm new to Jhispter and I created an application using the yeoman generator for Jhipster.
When I logged as an admin to this application to check the Health checks section I noticed that email service is down and the details says this :
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1
How can I solve this problem ?
You must fill properties in application-dev.yml or application-prod.yml with your real account data (eg gmail account)
mail:
host: localhost
port: 25
username:
password:
Sample file:
https://github.com/jhipster/jhipster-sample-app-token/blob/master/src/main/resources/config/application-dev.yml
Go to application-prod.yml and add config below to fix it.
spring:
mail:
host: smtp.gmail.com
port: 587
user: your gmail address
password: your password
protocol: smtp
tls: true
auth: true
from: spoonatte#gmail.com
properties.mail.smtp:
auth: true
starttls.enable: true
ssl.trust: smtp.gmail.com
OR in application-prod.yml
mail:
host: smtp.gmail.com
port: 587
username: your gmail address
password: your password
protocol: smtp
tls: true
properties.mail.smtp:
auth: true
starttls.enable: true
ssl.trust: smtp.gmail.com
messages:
cache-seconds: 1
thymeleaf:
cache: false

REDMINE on Debian 7 doesn't send mails over Exchange

i'm running Redmine on Debian 7 and try to send mails via Mircosoft Exchange.
My configuration.yml looks like:
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: <FIREWALLIP or SMTPIP>
port: 25
domain: <MYDOMAIN.local or mydomain.de>
authentication: :login
user_name: "username"
password: "pwd"
I used both the Firewall and smtp ips and various combinations of domains and usernames to try it.
Sending the mail via telnet works with both ips.
Can anyone help?
Thanks.
edit resolved:
works with this configuration:
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: <FIREWALLIP>
port: 25
domain: <mydomain.de>
works with this configuration:
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: <FIREWALLIP>
port: 25
domain: <MYDOMAIN.local or mydomain.de>
authentication: :login
user_name: "username"
password: "pwd"

Resources