jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set #4659

Closed spyhunter88 closed 7 years ago

spyhunter88 commented 7 years ago
Overview of the issue

It said: Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8761/config/bch3/dev/master": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect I found it's not a new issue, but hard to find how to resolve it. I tried with fresh installation, without any others config after generator but still get this error.

I am using window 10 (latest release build), JHipster Generator v3.12.1, then create with following log:

Welcome to the JHipster Generator v3.12.1
Documentation for creating an application: https://jhipster.github.io/creating-an-app/
Application files will be generated in folder: D:\Workspaces\FTG\BCH_3\102_git
? (1/14) Which *type* of application would you like to create? Microservice gateway
? (2/14) What is the base name of your application? bch3
? (3/14) Would you like to install other generators from the JHipster Market Place? No
? (3/14) As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8080
? (4/14) What is your default Java package name? ftg.bch3
? (5/14) Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? (6/14) Which Service Discovery and Configuration solution would you like to use? JHipster Registry (using Eureka and Spring Cloud Config)
? (7/14) Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? (8/14) Which *production* database would you like to use? PostgreSQL
? (9/14) Which *development* database would you like to use? PostgreSQL
? (10/14) Do you want to use Hibernate 2nd level cache? Yes, with HazelCast (distributed cache, for multiple nodes)
? (11/14) Would you like to use Maven or Gradle for building the backend? Maven
? (12/14) Which other technologies would you like to use? (Press <space> to select, <a> to toggle all, <i> to inverse selection)
? (13/14) Would you like to use the LibSass stylesheet preprocessor for your CSS? No
? (14/14) Would you like to enable internationalization support? Yes
? Please choose the native language of the application? English
? Please choose additional languages to install Vietnamese
? (15/14) Which testing frameworks would you like to use? (Press <space> to select, <a> to toggle all, <i> to inverse selection)Gatling

I also tried to re-generate with H2 database for development but still got this.

Please tell me how to resolve, I used Jhipster for long time but new to Eureka technology.

pascalgrimaud commented 7 years ago

It should be easier for us if you copy/past your .yo-rc.json. You can use the sub generator yo jhipster:info for that.

Then, tell us how to reproduce your issue:

jdubois commented 7 years ago

I'm pretty sure this because you didn't start up the JHipster Registry, that's why I'm closing this. The error message should be better, maybe.

spyhunter88 commented 7 years ago

I use window 10, no docker, just open cmd and setting yo jhipster like above. I tried both mvnw.cmd and main class Bch3App.java from Eclipse. Also, my yo-rc.json

{
  "generator-jhipster": {
    "jhipsterVersion": "3.12.1",
    "baseName": "bch3",
    "packageName": "ftg.bch3",
    "packageFolder": "ftg/bch3",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "hibernateCache": "hazelcast",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "prodDatabaseType": "postgresql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": "eureka",
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "jwtSecretKey": "9669ea8b3b2acdab792fc19d9defa5356cfcc6ff",
    "useSass": false,
    "applicationType": "gateway",
    "testFrameworks": [
      "gatling"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "vi"
    ]
  }
}

What am I missing?

jdubois commented 7 years ago

@spyhunter88 I'm sorry to repeat this, but did you follow the documentation and ran the JHipster Registry? If you're not running it, then that's normal

abhishekj commented 5 years ago

Hi I too get this error on latest Jhipster 6. My app is monolithic, and i am running prod build. what change should i do in current app to get past it pleaae?

thanks

pascalgrimaud commented 5 years ago

@abhishekj : plz, don't comment old ticket and open a new one if you thing there is an issue with JHipster. Anyway, if you have the same error, it's because you didn't start the registry.

clementdessoude commented 5 years ago

Yes, as @pascalgrimaud said, if you think this is a bug, please open a new ticket and follow the template as it will give us steps to reproduce and information about your configuration.

Otherwise, we won't be able to give you any help

monzertaq commented 4 years ago

Hello, I started the registry, and it works really fine, but all the other projects (uaa server, gateway and microservice) are giving the error, which is: java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing this happens on production profile, I built all the 4 projects into jar files and ran them.

xetys commented 4 years ago

hey @monzertaq

As in the two comments before, please do not comment on such old issues. We consider this one as closed, and if it is not, please open a new one with more details on your configuration, error messages and more. Otherwise, we will have issues to support you.

Thanks

monzertaq commented 4 years ago

Oh, I am really really sorry @xetys in fact, it worked with me, I noticed that I did change anything in the application-prod.yml nor bootstrap-prod.yml files. I am sorry again.