Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consult #1

Open
benboy-han opened this issue Mar 2, 2016 · 27 comments
Open

Consult #1

benboy-han opened this issue Mar 2, 2016 · 27 comments

Comments

@benboy-han
Copy link

Dear friend,
I see the floodlight-WebUI,I think it 's good.So ,i try a expriment,but i failed.The web can not get information about switch,host,topolopy and so on. In the Web , controller role is disable.Can you give me advices!Thank you very much!

@hknakcay
Copy link
Owner

hknakcay commented Mar 2, 2016

Hi,
This is the first version of web ui. The second is coming soon. In this version the contoller's ip address is hard coded in all modules. So, before to run, you should change the controller ip address in all modules. You should replace all hard coded ip adresses with your controller ip adress.

Thanks.
Hakan.

@benboy-han
Copy link
Author

Dear friend,
Firstly, Thank you very much! We have change the IP useing our controller ip in the pages document,But i also failed. So there are other documents needed to be changed?

@hknakcay
Copy link
Owner

hknakcay commented Mar 2, 2016

Did you change ip addresses in all html files ?

2 Mart 2016 Çarşamba tarihinde, benboy-han notifications@github.com yazdı:

Dear friend,
Firstly, Thank you very much! We have change the IP useing our controller
ip in the pages document,But i also failed. So there are other documents
needed to be changed?


Reply to this email directly or view it on GitHub
#1 (comment)
.

@benboy-han
Copy link
Author

yes,we did.And what the version of floodlight do you use?

@hknakcay
Copy link
Owner

hknakcay commented Mar 2, 2016

v1.1

@rizard
Copy link

rizard commented Mar 2, 2016

@hknakcay When can we expect the second version? Do you need any assistance developing it or are you running into any issues?

@benboy-han
Copy link
Author

Dear friend,
Now, we have used floodlight v1.1, and we used mininet to create a virtual network,but the Web was also failed. And the result show as follow:
Hata:undefined
Status:error
Error Thrown
, and we found the error from the source code:
error: function (jqXHR, textStatus, errorThrown) {
alert('Hata: ' + " " + jqXHR.responseText + " \n Status: " + textStatus + " \n Error Thrown: " + errorThrown);
Can you give me some advices?Thank you very much.

@hknakcay
Copy link
Owner

hknakcay commented Mar 2, 2016

Hi,

Can you send me screenshot ? It looks like a Rest API call error.

Thanks.

From: benboy-han [mailto:notifications@github.com]
Sent: Wednesday, March 2, 2016 3:15 PM
To: hknakcay/floodlight-WebUI floodlight-WebUI@noreply.github.com
Cc: hknakcay hknakcay@gmail.com
Subject: Re: [floodlight-WebUI] Consult (#1)

Dear friend,
Now, we have used floodlight v1.1, and we used mininet to create a virtual network,but the Web was also failed. And the result show as follow:
Hata:undefined
Status:error
Error Thrown
, and we found the error from the source code:
error: function (jqXHR, textStatus, errorThrown) {
alert('Hata: ' + " " + jqXHR.responseText + " \n Status: " + textStatus + " \n Error Thrown: " + errorThrown);
Can you give me some advices?Thank you very much.


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/AQBY6UcBTgj3tCmJizwMwnxWIt2EqsDeks5ppY06gaJpZM4HnNri.gif


Bu e-posta virüslere karşı Avast antivirüs yazılımı tarafından kontrol edilmiştir.
https://www.avast.com/antivirus

@benboy-han
Copy link
Author

Can you share me with you e-mail, so we can communicate with each other

@hknakcay
Copy link
Owner

hknakcay commented Mar 2, 2016

hknakcay@gmail.com

@rizard
Copy link

rizard commented Mar 2, 2016

It would be cool if you guys could CC the floodlight-dev@openflowhub.org
list. There are folks there who have tried to use your new web UI but have
run into the same problems, myself included. Thanks!

Ryan Izard
PhD Candidate, Research/Teaching Assistant
306B Fluor Daniel Building
ECE Department, Clemson University
Clemson, SC 29634

rizard@g.clemson.edu

Big Switch Networks
ryan.izard@bigswitch.com

On Wed, Mar 2, 2016 at 8:31 AM, hknakcay notifications@github.com wrote:

hknakcay@gmail.com


Reply to this email directly or view it on GitHub
#1 (comment)
.

@benboy-han
Copy link
Author

Dear Friend,
I have sent a e-mail to you! And i have gaven you a screenshot ,So can you help me to solve this problem! Thank you in advanced!

@hknakcay
Copy link
Owner

hknakcay commented Mar 4, 2016

Dear friend,

  Sorry for late reply. Firstly,  To run the web-ui application,  made

the changes below for all html pages.

For example (index.html) : replace your own controller ip address.

<script type="text/javascript"> ``` //Controller role LoadControllerRole(); function LoadControllerRole() { $.ajax({ url: "http://192.168.1.62:8080/wm/core/role/json", ``` Then, ``` I looked at screen shots, It looks like, caused by floodlight internal ``` rest api server policy error. In floodlight source code, you have to allow remote api call requests. In the net.floodlightcontroller.restserver -> RestApiServer.java file , replace the _Run_ method with below : public void run() { if (logger.isDebugEnabled()) { StringBuffer sb = new StringBuffer(); sb.append("REST API routables: "); for (RestletRoutable routable : restlets) { sb.append(routable.getClass().getSimpleName()); sb.append(" ("); sb.append(routable.basePath()); sb.append("), "); } logger.debug(sb.toString()); } _CorsService corsService=new CorsService();_ - corsService.setAllowedOrigins(new HashSet(Arrays.asList("_")));_ - corsService.setAllowedCredentials(true);* RestApplication restApp = new RestApplication(); restApp.getServices().add(corsService); restApp.run(fmlContext, restHost); } Then, you can retrive data from the controller. Thanks. 2016-03-04 4:25 GMT+02:00 benboy-han notifications@github.com: > Dear Friend, > I have sent a e-mail to you! And i have gaven you a screenshot ,So can you > help me to solve this problem! Thank you in advanced! > > — > Reply to this email directly or view it on GitHub > https://github.com//issues/1#issuecomment-192066684 > .

@hknakcay
Copy link
Owner

hknakcay commented Mar 4, 2016

Hi Ryan,

 I am working on it. There is no issue. But i am very busy in those days.  As soon as,  i will revize the first version.  I plan to develop a startup screen that asks to user to enter the controller remote ip address. 

So, the entered ip address will be used for entire the application.

Thanks.

From: Ryan Izard [mailto:notifications@github.com]
Sent: Wednesday, March 2, 2016 3:03 PM
To: hknakcay/floodlight-WebUI floodlight-WebUI@noreply.github.com
Cc: hknakcay hknakcay@gmail.com
Subject: Re: [floodlight-WebUI] Consult (#1)

@hknakcay https://github.com/hknakcay When can we expect the second version? Do you need any assistance developing it or are you running into any issues?


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/AQBY6enS29Jcz0VIOwVUkGU7h4mp_tZCks5ppYp5gaJpZM4HnNri.gif


Bu e-posta virüslere karşı Avast antivirüs yazılımı tarafından kontrol edilmiştir.
https://www.avast.com/antivirus

@hknakcay
Copy link
Owner

hknakcay commented Mar 4, 2016

Hi Hakan,

What if the interface was installed with the controller? It would replace
the existing web interface of the controller and use the localhost as the
IP, thus eliminating the need to ask the user for the IP. I've tested this,
and it works.

Ryan Izard
PhD Candidate, Research/Teaching Assistant
306B Fluor Daniel Building
ECE Department, Clemson University
Clemson, SC 29634

rizard@g.clemson.edu

Big Switch Networks
ryan.izard@bigswitch.com

On Fri, Mar 4, 2016 at 10:18 AM, HAKAN AKÇAY GMAİL hknakcay@gmail.com
wrote:

Hi Ryan,

 I am working on it. There is no issue. But i am very busy in those

days. As soon as, i will revize the first version. I plan to develop a
startup screen that asks to user to enter the controller remote ip address.

So, the entered ip address will be used for entire the application.

Thanks.

From: Ryan Izard [mailto:notifications@github.com]
Sent: Wednesday, March 2, 2016 3:03 PM
To: hknakcay/floodlight-WebUI floodlight-WebUI@noreply.github.com
Cc: hknakcay hknakcay@gmail.com
Subject: Re: [floodlight-WebUI] Consult (#1)

@hknakcay https://github.com/hknakcay When can we expect the second
version? Do you need any assistance developing it or are you running into
any issues?


Reply to this email directly or view it on GitHub
#1 (comment)
.

Bu e-posta Avast tarafından korunan virüssüz bir bilgisayardan
gönderilmiştir.
www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient

You received this message because you are subscribed to the Google Groups
"Floodlight-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to floodlight-dev+unsubscribe@openflowhub.org.
To post to this group, send email to floodlight-dev@openflowhub.org.
Visit this group at
https://groups.google.com/a/openflowhub.org/group/floodlight-dev/.

@hknakcay
Copy link
Owner

hknakcay commented Mar 4, 2016

Yes, you are right. It works.

 In my senario,  the controller is running on an ubuntu server and the web interface is hosted  on a windows machine. So, the web-interface is needed the controller remote ip address. 

By the way,

             I want to develop a new routing algorithm such as Multipath Routing or L3 Routing.  So, how should i start and from where ?  Should i know the openflow switch specifications very well ? And what are  the routing  algorithms that can be applied to floodlight ?  I think floolight is using dijkstra. 

Thanks.

From: Ryan Izard [mailto:rizard@g.clemson.edu]
Sent: Friday, March 4, 2016 5:31 PM
To: floodlight-dev@openflowhub.org
Cc: hknakcay/floodlight-WebUI reply@reply.github.com; hknakcay/floodlight-WebUI floodlight-WebUI@noreply.github.com; hknakcay@gmail.com
Subject: Re: [floodlight-dev] RE: [floodlight-WebUI] Consult (#1)

Hi Hakan,

What if the interface was installed with the controller? It would replace the existing web interface of the controller and use the localhost as the IP, thus eliminating the need to ask the user for the IP. I've tested this, and it works.

Ryan Izard

PhD Candidate, Research/Teaching Assistant

306B Fluor Daniel Building
ECE Department, Clemson University
Clemson, SC 29634
mailto:rizard@g.clemson.edu rizard@g.clemson.edu


Big Switch Networks

mailto:ryan.izard@bigswitch.com ryan.izard@bigswitch.com

On Fri, Mar 4, 2016 at 10:18 AM, HAKAN AKÇAY GMAİL <hknakcay@gmail.com mailto:hknakcay@gmail.com > wrote:

Hi Ryan,

 I am working on it. There is no issue. But i am very busy in those days.  As soon as,  i will revize the first version.  I plan to develop a startup screen that asks to user to enter the controller remote ip address. 

So, the entered ip address will be used for entire the application.

Thanks.

From: Ryan Izard [mailto: mailto:notifications@github.com notifications@github.com]
Sent: Wednesday, March 2, 2016 3:03 PM
To: hknakcay/floodlight-WebUI < mailto:floodlight-WebUI@noreply.github.com floodlight-WebUI@noreply.github.com>
Cc: hknakcay < mailto:hknakcay@gmail.com hknakcay@gmail.com>
Subject: Re: [floodlight-WebUI] Consult (#1)

@hknakcay https://github.com/hknakcay When can we expect the second version? Do you need any assistance developing it or are you running into any issues?


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/AQBY6enS29Jcz0VIOwVUkGU7h4mp_tZCks5ppYp5gaJpZM4HnNri.gif

Bu e-posta Avast tarafından korunan virüssüz bir bilgisayardan gönderilmiştir.
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient www.avast.com

You received this message because you are subscribed to the Google Groups "Floodlight-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to floodlight-dev+unsubscribe@openflowhub.org mailto:floodlight-dev+unsubscribe@openflowhub.org .
To post to this group, send email to floodlight-dev@openflowhub.org mailto:floodlight-dev@openflowhub.org .
Visit this group at https://groups.google.com/a/openflowhub.org/group/floodlight-dev/.


Bu e-posta virüslere karşı Avast antivirüs yazılımı tarafından kontrol edilmiştir.
https://www.avast.com/antivirus

@benboy-han
Copy link
Author

Dear friend,
Firstly,thanks for you help.And I have modify the source code net.floodlightcontroller.restserver -> RestApiServer.java file like this :
public void run() {
if (logger.isDebugEnabled()) {
StringBuffer sb = new StringBuffer();
sb.append("REST API routables: ");
for (RestletRoutable routable : restlets) {
sb.append(routable.getClass().getSimpleName());
sb.append(" (");
sb.append(routable.basePath());
sb.append("), ");
}
logger.debug(sb.toString());
}
CorsService corsService=new CorsService();
corsService.setAllowedOrigins(new HashSet(Arrays.asList("*")));
corsService.setAllowedCredentials(true);

    RestApplication restApp = new RestApplication();
    restApp.getServices().add(corsService);
    restApp.run(fmlContext, restPort);
}

And for supporting the CorsService, I have add the cors-filter-1.7.1.jar and java-property-utils-1.9.1.jar.
But I also failed.So Is there anything other need to modify or add?Thank you in advanced!

@hknakcay
Copy link
Owner

hknakcay commented Mar 5, 2016

Hi ,

Did you debug floodlight code step by step?

Where did you take errors ?

Thanks.

From: benboy-han [mailto:notifications@github.com]
Sent: Saturday, March 5, 2016 4:32 AM
To: hknakcay/floodlight-WebUI floodlight-WebUI@noreply.github.com
Cc: hknakcay hknakcay@gmail.com
Subject: Re: [floodlight-WebUI] Consult (#1)

Dear friend,
Firstly,thanks for you help.And I have modify the source code net.floodlightcontroller.restserver -> RestApiServer.java file like this :
public void run() {
if (logger.isDebugEnabled()) {
StringBuffer sb = new StringBuffer();
sb.append("REST API routables: ");
for (RestletRoutable routable : restlets) {
sb.append(routable.getClass().getSimpleName());
sb.append(" (");
sb.append(routable.basePath());
sb.append("), ");
}
logger.debug(sb.toString());
}
CorsService corsService=new CorsService();
corsService.setAllowedOrigins(new HashSet(Arrays.asList("*")));
corsService.setAllowedCredentials(true);

RestApplication restApp = new RestApplication();
restApp.getServices().add(corsService);
restApp.run(fmlContext, restPort);

}

And for supporting the CorsService, I have add the cors-filter-1.7.1.jar and java-property-utils-1.9.1.jar.
But I also failed.So Is there anything other need to modify or add?Thank you in advanced!


Reply to this email directly or view it on GitHub #1 (comment) . https://github.com/notifications/beacon/AQBY6a3ZLwd_3ARtHOnRCm_NGXHqVp2rks5pqOsFgaJpZM4HnNri.gif


Bu e-posta virüslere karşı Avast antivirüs yazılımı tarafından kontrol edilmiştir.
https://www.avast.com/antivirus

@SABER087
Copy link

SABER087 commented Mar 9, 2016

Dear friend,
I see the floodlight-WebUI,I think it 's good.I'm a beginner,some code I could not understand,and I failed at first.
But I read your discuss and follow your suggestion step by step,finally it works. In addition, I try a lot of different version of floodlight and find that floodlight-1.2 also works.Thus,you are a very good programmer.
when I close mininet topo then I create a new topo,and I find there are a little bug about the cache of host. prevoius host catche also exit the web .

@SABER087
Copy link

SABER087 commented Mar 9, 2016

and thanks for your sharing.

@hknakcay
Copy link
Owner

hknakcay commented Mar 9, 2016

Dear firend,
Thanks for your nice thoughts. Yes, i know about the cache problem. But i am not sure if it is controller's bug or web ui.

@hknakcay
Copy link
Owner

Hi,
The startup page is added to application. And you don't need to enter the ip address anymore. With startup page, you can enter the ip address once and it will be available for entire the application. But it uses cookie and you shouldn't disable the cookies for your browsers.

Thanks

@xingkongyetan
Copy link

hi @SABER087,your webUI is works,could you give me a description in detail ? why I can't get info about floodlight,such as module,topo.there is nothing.

Thanks

@SABER087
Copy link

hi @xingkongyetan ,I'm a beginner,maybe I could not explain it correctly. You should read other comment and follow original master's suggestion step by step.
Firstly,Did you open the webUI by index.html and And the result show as follow:
Hata:undefined
Status:error
Error Thrown
.It looks like a Rest API call error,you should watch the previous comment,and find the way.
Secondly,you try to download the controller from http://www.projectfloodlight.org/ .

@hknakcay
Copy link
Owner

hi @xingkongyetan , it seems that your connection to controller was failed. Make you sure that floodlight controller is running and the ip address is correct. But before that, you may be fail because of the rest api policy constraint. To solve this, as @SABER087 said, you should apply the instructions in the previos comment.

Thanks.

@hknakcay
Copy link
Owner

The related comment,

"_CorsService corsService=new CorsService();
corsService.setAllowedOrigins(new HashSet(Arrays.asList("*")));
corsService.setAllowedCredentials(true);

RestApplication restApp = new RestApplication();
restApp.getServices().add(corsService);
restApp.run(fmlContext, restPort);_

@xingkongyetan
Copy link

Thanks a lot @hknakcay @SABER087 ,it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants