Closed sparnell closed 3 years ago
@sparnell I'll have to test this. But you should be able to set mlHost in gradle.properties. The datahub project should be deployed prior to running CE.
Regression maybe? Seems similar to this one: Not able to launch Envision
Result: fails almost immediately when attempting to connect to localhost port 8011
did you try setting marklogic.host in application.properties? looking at the code, that should work. and yes, we should document it.
in your steps above, you may want to add a user with hub-central-developer role prior to deploying, this will be required for login. Otherwise appears correct.
Also, after setting marklogic.host in application.properties, execute jar as: java -jar -DforceInstall=true hub-central-community-5.4.2.jar
Yes, I have set marklogic.host in application.properties. I may have a clue as to where the problem is. This is InstallService.java:
ManageClient manageClient = config.getManageClient();
AppDeployer appDeployer =
new SimpleAppDeployer(manageClient, config.getAdminManager(),
new DeployEnvisionModulesCommand(config.getModulesClient(), config.isMultiTenant()));
The ManageClient instance is getting configured from application.properties and has the required values set as expected. The DatabaseClient returned from config.getModulesClient() does not. The values appear to be from HubClientConfig.applyDefaultPropertyValues (localhost, etc.). When I run the application in a debugger, I'm not seeing any sign that these default values are being updated prior to the deployment command getting executed.
I have it up and running the way you describe. But, with initial connection error, also, and had to look at ML server logs to see that it was permissions. Often I find I don't have enough role-privileges assigned even to the admin user - admittedly not ideal ... my admin user had these and I successfully connected: "admin", "manage-admin", and "security"
I found I could use the "flow-developer" user found in gradle.properties and just cut and pasted user/pass into application.properties
I assume you know how to use ML Server admin console and check users and role permissions assigned to them ...
Hope this helps
Thanks, but I don't think it's a permissions issue. By the time it fails, the only requests made are to localhost, not the remote host it should be using.
Not sure where hubConfigImpl should be getting it's config settings from, but it doesn't seem to be using the injected values in EnvisionConfig. It also doesn't seen to be reading the gradle property files for the DHF project.
It looks like a simple fix would be to add:
hubConfig.setHost(markLogicHost);
to setupHubConfig after the call to hubConfig.setMlPassword(password);
Welcome Data Hub Central Community Edition enthusiast!
Let's get the most out of this ticket.
The issue
Initial execution of hub-central-community fails because it assumes MarkLogic is running on localhost and FINAL is available on port 8011.
What behavior are you expecting?
I was expecting the application to either honor the settings in application.properties (which seems to be missing a host property), or to read the DHF project's properties file before attempting to deploy code.
Tech details
Which Operating System are you using?
macOS Catalina (10.15.7) to host the project
Which version of MarkLogic are you using?
10.0-6.1
Which version of Data Hub are you using?
5.4.2
The devil is in the details...
application.properties
gradle.properties