-
1. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 3, 2012 2:39 PM (in response to rakeshsagar)Did you add the management user? You need to use "add-user.sh" or "add-user.bat" script in the <jboss-as>/bin" directory. This will add the management user and password that you can use in the above admin createAdmin call.
Ramesh..
-
2. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 4, 2012 8:11 AM (in response to rareddy)I tried this and still I get the same error.
Ramesh, can you please give us some pointers to this error so that we can try debugging and fix this issue.
Thanks
Rakesh.
-
3. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 4, 2012 9:38 AM (in response to rakeshsagar)Rakesh,
Is your started at address '127.0.0.1" and management port is configured as 9999? It will be in the server.log pls check.
Ramesh..
-
4. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 4, 2012 11:25 AM (in response to rareddy)Yes. I tried changing the port to other value and host to the systems IP address through the jboss.bind.address.management and port to a different value by passing through the jboss.management.native.port values.
For example If I change the value to 126.123.5.125 and port to 7878 then I get the error TEIID70051 The controller is not available at /126.123.5.125:7,878
Thanks
Rakesh.
-
5. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 4, 2012 12:02 PM (in response to rakeshsagar)What does your logs say about the management port?
Also, in the bin directory, you can execute "jboss-cli.bat" or "jboss-cli.sh" depending upon your environment, then issue a "connect" command. If you do that can you connect to the JBoss AS instance? Teiid Admin connection is nothing but a simple wrapper over the JBoss AS's CLI.
Ramesh..
-
6. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
gsinghal Sep 4, 2012 2:02 PM (in response to rareddy)Is there a way to create a teiid admin connection with going through ports and hostname, just a direct "local" connection? Because we are trying to create a connection using the java teiid admin api from within the same jvm in which teiid is brought up so if we could get around using host name and port it might help.
-
7. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 4, 2012 2:37 PM (in response to gsinghal)Yes, you can. However for that you need to write JBoss AS service and write a dependency on the "ModelController" class. For an example take look at "VDBDeployer.java" class, and find the line
{code}
vdbService.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, vdb.controllerValue);
{code}
and follow from there. Once you have the ModelController class, you can call the adminFactory.createAdmin(controllerValue.getValue()) to create the admin object.
Ramesh..
-
8. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 5, 2012 11:21 AM (in response to rareddy)Hi Ramesh,
By JBoss Service do you mean creating a new JBoss Extension or creating a SAR file?
We are not sure of creating a JBoss AS Service. Can you please help us in pointing to the document for creating a JBoss AS Service.
Your help would be highly appriciated
Thanks,
Rakesh.
-
9. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 5, 2012 3:22 PM (in response to rakeshsagar)Rakesh,
For extending the JBoss AS7, please see this document https://docs.jboss.org/author/display/AS71/Extending+JBoss+AS+7#ExtendingJBossAS7-IntegratewithJBossAS7
If you want, you can write Simple service (any class that extends org.jboss.msc.service.Service<T>) and add to your Teiid subsystem code. There is specific way you would need to register the service and and provide the lifecycle methods. Teiid sub system has many such services, so I suggest you take a look at the code.
The above example uses the said uses ModelController class, see how it id defined and how its dependencies are declared etc.
Ramesh..
-
10. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 6, 2012 7:39 AM (in response to rareddy)Hi Ramesh,
Thanks for your reply.
I had gone through the code and I created a Service and added my jar file to the Teiid Subsystem Code i.e. to the module \org\jboss\teiid\main.
And I am trying to create the Admin object as follows:
ChorusVDBAdminService service = new ChorusVDBAdminService();
final Admin testAdmin = adminFactory.createAdmin(service.getControllerValue().getValue());
I am getting the following exception. Looks like I am not getting the InjectedValue of the ModelControllerClient.
java.lang.IllegalStateException
at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
The following is my Service
public class ChorusVDBAdminService implements Service<ChorusVDBAdminService> {
protected final InjectedValue<ModelControllerClient> controllerValue = new InjectedValue<ModelControllerClient>();
public InjectedValue<ModelControllerClient> getControllerValue() {
return controllerValue;
}
public ChorusVDBAdminService() {
}
@Override
public ChorusVDBAdminService getValue() throws IllegalStateException, IllegalArgumentException {
return this;
}
@Override
public void start(StartContext context) throws StartException
{
System.out.println("Starting ChorusVDBAdminService...");
}
@Override
public void stop(StopContext context) {
}
public static ServiceName createServiceName(String suffix) {
return ServiceName.JBOSS.append("ChorusVDBAdminService", suffix);
}
I added the Service using the following code:
ChorusVDBAdminService vdbAdminService = new ChorusVDBAdminService();
ServiceName adminName = ChorusVDBAdminService.createServiceName(suffix);
ServiceController<ChorusVDBAdminService> vdbController = context
.getServiceTarget().addService(adminName, vdbAdminService)
.addListener(verificationHandler).setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(vdbController);
Can you please take a look and let me know if I missed anything.
Thanks
Rakesh.
-
11. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 6, 2012 8:21 AM (in response to rakeshsagar)Look at the VDBService example I pointed above, it does exactly what you are trying to do. Look at how dependencies for VDBService is defined by looking for its references.
Ramesh..
-
12. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 6, 2012 11:10 AM (in response to rareddy)Hi Ramesh,
Thanks for the information. Sorry for bothering you again. I am not completly understanding the implementation
I googled for the exact steps but could not find anything related to implementing the Service and plugging it into JBoss.
The following are the steps in order which I am thinking will solve my problem. Please suggest if any changes are required.
1. Create a class which implements the org.jboss.msc.service.Service interface.
Do we also extend the class AbstractVDBDeployer as we have done in VDBService Example?
Do we use the VDBService example or VDBDeployer example?
2. Register this service using the following from VDBDeployer.java:
final ServiceBuilder<RuntimeVDB> vdbService = context.getServiceTarget().addService(TeiidServiceNames.vdbServiceName(deployment.getName(), deployment.getVersion()), vdb);
vdbService.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, vdb.controllerValue);
3. Package this as a jar file and copy to the module \org\jboss\teiid\main
4. Start JBoss and get the Admin object.
Also can we extend the VDBService class to use this as our service and use this for creating the Admin object?
-
13. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rareddy Sep 6, 2012 12:21 PM (in response to rakeshsagar)// service class class AdminProvider implements Service<Admin> { protected final InjectedValue<ModelController> controllerValue = new InjectedValue<ModelController>(); protected final InjectedValue<Executor> executorInjector = new InjectedValue<Executor>(); private Admin admin; @Override public void start(StartContext context) throws StartException { this.admin = AdminFactory.getInstance().createAdmin(controllerValue.getValue().createClient(executorInjector.getValue())); // do whatever you need to do here.. } @Override public void stop(StopContext context) { this.admin = null; } @Override public Admin getValue() throws IllegalStateException,IllegalArgumentException { return this.admin; } } // Add the following to the bootstrap the service in some class like TeiidAdd.java or in your subsystem in the performRuntime method. AdminProvider adminProvider = new AdminProvider(); adminProvider.addDependency(TeiidServiceNames.executorServiceName(this.asyncThreadPoolName), Executor.class, adminProvider.executorInjector); adminProvider.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, adminProvider.controllerValue); ServiceBuilder<AdminProvider> adminService = context.getServiceTarget().addService(ServiceName.JBOSS.append("teiid", "admin"), adminProvider); newControllers.add(adminService.install());
Ramesh..
-
14. Re: TEIID70051 The controller is not available at /127.0.0.1:9,999
rakeshsagar Sep 7, 2012 11:07 AM (in response to rareddy)Hi Ramesh,
Thanks for the code snippet. Sorry for bothering you again
I had created the created the service and registered the Service in my Subsystem.
But while starting JBoss I am getting the following error:
JBAS014775: New missing/unsatisfied dependencies: service jboss.thread.executor.async-thread-pool (missing) dependents: [service jboss.teiid.admin] Looks like the Service is not getting registered and not being started.
The following is the code for registering the service:
ChorusVDBAdminProvider adminService = new ChorusVDBAdminProvider();
ServiceBuilder<Admin> adminServiceBinder = context.getServiceTarget().addService(ServiceName.JBOSS.append("teiid", "admin"), adminService);
adminServiceBinder.addDependency(TeiidServiceNames.executorServiceName("async-thread-pool"), Executor.class, adminService.executorInjector);
adminServiceBinder.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, adminService.controllerValue);
newControllers.add(adminServiceBinder.install());
I tried adding the dependencies to the teiid admin but still I get the same error.
Can we add the Service registration code in TeiidAdd.java class ?
Please suggest.
Thanks
Rakesh