- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Cannot get service from controller.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2014 10:53 PM
05-29-2014 10:53 PM
Cannot get service from controller.
I'm a new developer trying to develop a sdn controller app.
After reading the programmer, i tried to program a demo app to test the Database and ofm module.
So i code like this :
@Component
public class Test{
@Reference(name = "ControllerService", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MANDATORY_UNARY)
private volatile ControllerService ctrlService;
...
public void bind(ControllerService service) {....}
public void unbindControllerService(ControllerService service) {....}
}
And then, the embrassing bug came.
---------------------------------------------------------------------------------
Connection Error in Persistence layercom.netflix.astyanax.connectionpool.exceptions.NoAvailableHostsException: NoAvailableHostsException: [host=None(0.0.0.0):0, latency=0(0), attempts=0]No hosts to borrow from
---------------------------------------------------------------------------------
ps. when i tried to get the service like DataStoreService<DataStoreContext>,which should be implements in the cassandra module, i get the same bug.
Is there anyone could help me ? I'm dying debuging this with no clue.It's even better if someone could offer me soem demo code.
Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 11:13 AM
06-25-2014 11:13 AM
Re: Cannot get service from controller.
I don't think you want to call bind and unbind. This is what you put in the post:
@Component
public class Test{
@Reference(name = "ControllerService", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MANDATORY_UNARY)
private volatile ControllerService ctrlService;
public void bind(ControllerService service) {....}
public void unbindControllerService(ControllerService service) {....}
It appears you should be writing your own bind method. Please see this example:
@Reference(name = "ControllerService",
cardinality = ReferenceCardinality.OPTIONAL_UNARY,
policy = ReferencePolicy.DYNAMIC)
private ControllerService cs;
/** Bind hook for the controller service. */
protected void bindControllerService(ControllerService cs) {
...
}
Regards,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2014 11:16 AM
06-30-2014 11:16 AM
Re: Cannot get service from controller.
Hello youngnr,
Doing a follow up to check if you tried as suggested in erliar post.
Please do let us know if your problem is solved.
If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.
Thanks
HP SDN Team