Getting User Creation Exception With the Jhipster Application - jhipster

I have successfully generated the application using Jhipster (Angular, MySQL). As an admin, I have logged in and trying to create a new user but I am getting the below error.
2021-05-10 21:55:14.218 ERROR 29756 --- [ XNIO-1 task-2] com.kc.bsadhana.service.UserService : Exception in createUser() with cause = 'java.lang.RuntimeException: Connection refused' and exception = 'Connection refused; nested exception is java.lang.RuntimeException: Connection refused'
org.springframework.dao.DataAccessResourceFailureException: Connection refused; nested exception is java.lang.RuntimeException: Connection refused
at org.springframework.data.elasticsearch.core.ElasticsearchExceptionTranslator.translateExceptionIfPossible(ElasticsearchExceptionTranslator.java:75)
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.translateException(ElasticsearchRestTemplate.java:362)
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.execute(ElasticsearchRestTemplate.java:345)
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.doIndex(ElasticsearchRestTemplate.java:143)
...
Caused by: java.lang.RuntimeException: Connection refused
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.translateException(ElasticsearchRestTemplate.java:360)
... 198 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:849)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:259)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1613)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1583)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1553)
at org.elasticsearch.client.RestHighLevelClient.index(RestHighLevelClient.java:970)
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.lambda$doIndex$0(ElasticsearchRestTemplate.java:143)
at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.execute(ElasticsearchRestTemplate.java:343)
... 197 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:589)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:839)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
... 1 common frames omitted
2021-05-10 21:55:14.238 ERROR 29756 --- [ XNIO-1 task-2] com.kc.bsadhana.web.rest.UserResource : Exception in createUser() with cause = 'java.lang.RuntimeException: Connection refused' and exception = 'Connection refused; nested exception is java.lang.RuntimeException: Connection refused'
org.springframework.dao.DataAccessResourceFailureException: Connection refused; nested exception is java.lang.RuntimeException: Connection refused
In application-dev.yml file I have entered the database credentials :
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://localhost:3306/bsadhana?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: root
password: rxxxx!
hikari:
Even the jhipster related tables were created in my database. But when I am trying to create a new user it is throwing the above-reported error. is there anywhere else I need to enter these credentials?

The error says your app cannot connect to your Elasticsearch instance, you should make sure you started it with following command as explained in the doc:
docker-compose -f src/main/docker/elasticsearch.yml up

Related

Mongo shutting down with error code(1) after running the mongo command

I am new to MongoDB and I keep getting a SocketException and a shutting down with exit code : 1
error. I have also tried stopping and restarting the mongod servers. The error I get is as follows :
root#sam-sepiol:~# mongo
MongoDB shell version v4.2.8
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
2020-07-01T08:19:45.406-0400 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-07-01T08:19:45.407-0400 F - [main] exception: connect failed
2020-07-01T08:19:45.407-0400 E - [main] exiting with code 1

armitage teamserver tthrowing connection refused on startup ubuntu

I tried every possible answer online! It was running sometime back.
OS: Ubuntu 16.04
Error:
Warning: checkError(): java.lang.RuntimeException:
java.net.ConnectException: Connection refused (Connection refused) at server.sl:450

Databricks writing data to MapD: Connection failed

When I try to write a simple table (simpleTable) to MapD, I get the following error:
java.sql.SQLException: Connection failed - org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
Here is my code:
%python
simpleTable.write.format("jdbc").option("url",
"jdbc:mapd:localhost:8000:mapd:http").option("driver",
JDBC_DRIVER).option("dbtable", "venues").option("user", "mapd").option("password", "<PasswordHere>").save()

Jenkins: "javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;"

all on a sudden i am not able to trigger emails via Jenkins which is running in rhel 6.2 . It was working fine before. But i am able to sent mails via server.
Below is the error which i am getting..
ERROR: Could not connect to SMTP host: smtp.uk.ri.ad, port: 465
javax.mail.MessagingException: Could not connect to SMTP host: smtp.uk.ri.ad, port: 465;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at hudson.tasks.MailSender.run(MailSender.java:129)
at hudson.tasks.Mailer.perform(Mailer.java:170)
at
hudson.tasks.BuildStepCompatibilityLayer.perform
(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at
hudson.model.AbstractBuild$AbstractBuildExecution.perform
(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps
(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post
(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at
java.net.AbstractPlainSocketImpl.connectToAddress
(AbstractPlainSocketImpl.java:200)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:205)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 18 more
Finished: SUCCESS
Please help to fix the issue.. Thanks in advance
Someone changed the configs of email server in the machine itself.. So when i wrote the configuration in Jenkins it was attempting to overwrite the machine configuration and eventually timed out so i removed the config and it worked fine..

Failed to fetch drpc result

I've this problem with supervisor:
DRPCSpout [ERROR] Failed to fetch DRPC result from DRPC server
org.apache.thrift7.transport.TTransportException: java.net.ConnectException:
Connection refused
What are data? If you need that, I can share it here.

Resources