CESNET / Netopeer-GUI

Graphical user interface for NETCONF client
MIT License
37 stars 9 forks source link

Appeal on install Netopeer-GUI #71

Closed lilonghua2014 closed 8 years ago

lilonghua2014 commented 9 years ago

I met a question,when I install Netopeer-GUI on ubuntu(12.04).As follow: checking for gcc... gcc checking whether the C compiler works... no configure: error: in /var/www/tmp/netopeer-gui/install/mod_netconf': configure: error: C compiler cannot create executables Seeconfig.log' for more details configure: error: ./configure failed for mod_netconf

config.log: configure:4095: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=. configure:4100: error: ./configure failed for mod_netconf

mod_netconf config.log: configure:4351: checking for C compiler version configure:4360: gcc --version >&5 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4371: $? = 0 configure:4360: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) configure:4371: $? = 0 configure:4360: gcc -V >&5 gcc: error: unrecognized option '-V' gcc: fatal error: no input files compilation terminated. configure:4371: $? = 4 configure:4360: gcc -qversion >&5 gcc: error: unrecognized option '-qversion' gcc: fatal error: no input files compilation terminated. configure:4371: $? = 4 configure:4391: checking whether the C compiler works configure:4413: gcc /usr/lib/x86_64-linux-gnu /usr/local/lib -I/usr/local/include -I/usr/include/libxml2 conftest.c /usr/lib/x86_64-linux-gnu /usr/local/lib -L/usr/local/lib -lnetconf -lxml2 >&5 /usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu: File format not recognized /usr/bin/ld: cannot find /usr/local/lib: File format not recognized /usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu: File format not recognized /usr/bin/ld: cannot find /usr/local/lib: File format not recognized

collect2: ld returned 1 exit status configure:4417: $? = 1 configure:4455: result: no configure: failed program was: /* confdefs.h _/ #define PACKAGE_NAME "mod_netconf" #define PACKAGE_TARNAME "mod_netconf" #define PACKAGE_VERSION "1.0.0" #define PACKAGE_STRING "mod_netconf 1.0.0" #define PACKAGE_BUGREPORT "cejkat@cesnet.cz" #define PACKAGE_URL "" #define PACKAGE "mod_netconf" #define VERSION "1.0.0" /_ end confdefs.h. */
int
main ()
{
;
return 0;
}

configure:4460: error: in /var/www/tmp/netopeer-gui/install/mod_netconf': configure:4462: error: C compiler cannot create executables Seeconfig.log' for more details

cejkato2 commented 9 years ago

Hello, I'll do my best to help you. What is the architecture of you system, x86_64? (try to execute uname -a) Do you have installed "build-essential" package? (apt-get install build-essential) It seems to me that configure could not find some libraries... Mod_netconf, which is being configured and compiled, is the backend of Netopeer-GUI web interface.

By default, it is compiled using Apache development tool apxs as a module for Apache and it is linked with libraries: libwebsockets, libjson, libnetconf, libxml2, libapr-1, libaprutil-1. Makefile also contains target for webgui_backend that is standalone executable. However, you should figure out the issue with failing configure at first... Tomas

lilonghua2014 commented 9 years ago

thanks for your help. I have installed "build-essential" package. And the system information: Linux netopeer 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux "it is compiled using Apache development tool apxs as a module for Apache ",How do I operate? I have linked the libraries to mod_netconf.Additionally,this issue is met when execute "./configure" in mod_netconf. thanks again!

cejkato2 commented 9 years ago

Here is the story: at first, we have designed the backend of NetopeerGUI as a module for Apache web server. Note: we need to create persistent NETCONF sessions that would be accessible from various HTTP requests without need of NETCONF reconnection on every request. The module is called mod_netconf and it is automaticaly compiled and installed via make and make install.

As an alternative way to run the backend, Makefile contains the webgui_backend target that is also made by make. However it can be compiled manually and separately in case a user don't want to use Apache.

As the result, backend can be run either in Apache (module is installed and restart of Apache should be sufficient) or as a standalone binary (execute webgui_backend).

Both solutions act in similar way: they create unix socket in /var/run and listen for requests from PHP. In addition, backend opens TCP port 8080 that is used for asynchronous NETCONF notifications that can be delivered to the GUI via websocket.

I hope this kind of additional information will be useful for You...

cejkato2 commented 9 years ago

You can try preinstalled demo virtual machine for VirtualBox that can be downloaded from http://www.liberouter.org/docs/2014-11-24-netopeer-demo.ova The machine contains netopeer-server with some transapi modules, netopeer-cli, Netopeer-GUI. If you had any feedback, please let us know... Tomas

Premilav commented 8 years ago

I have installed "http://www.liberouter.org/docs/2014-11-24-netopeer-demo.ova". I could like to add few modules. Request you to let me know the steps to add new module to the above netconf-server.

michalvasko commented 8 years ago

Hi,

you can easily add your transAPI modules using netopeer-manager.

Regards, Michal

Premilav commented 8 years ago

Hi Michal,

Thanks for the reply. I am using this "netopeergui", i am unable to execute any edit-config. Any help will be highly appreciated.

alexadavid commented 8 years ago

Hi, you can find basic informations in readme in virtual machine desktop.

... Problems with NETCONF tools: Try to look into log files: /var/log/messages (output from netopeer-server and netopeer-agent) /var/log/httpd/error_log (output from Netopeer-GUI backend) /var/www/netopeer-gui/app/logs/prod.* ...

But as I see now from discussion history, you have installed old demo version of virtual machine, please rather use one described here https://github.com/CESNET/Netopeer-GUI - it is last stable release of our demo.

Premilav commented 8 years ago

Hi,

I am trying to do "edit-config" on the device, below is the RPC stack. Request you to let me know what is wrong in this. It throws the error "There is no device/data that could be affected".

<?xml version="1.0" encoding="UTF-8" standalone="no"?><hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabiliti
es><capability>urn:ietf:params:netconf:base:1.0</capability></capabilities></hello>

The CONFIG TREE isiis : system

The output isiis : clock

<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<lock><target><candidate/></target></lock>
</rpc><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target><candidate/></target>
<test-option>set</test-option>
<config>
<system xmlns="xmlns=urn:ietf:params:xml:ns:yang:ietf-system">
<clock operation="create">
<timezone-name>PST</timezone-name>
</clock>
</system>
</config>
</edit-config>
</rpc>

REPLY:

 <?xml version="1.0" encoding="UTF-8" standalone="no"?><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" messag
e-id="2">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>There is no device/data that could be affected.</error-message>
  </rpc-error>
</rpc-reply>
cejkato2 commented 8 years ago

It seems to me that NETCONF messages were badly pasted in here... try to enclose your "code" into:

your XML samples

and use "Preview" please...

Premilav commented 8 years ago

Thanks for the info. I have added the module "toaster.yin" via "netopeergui-manager". The manager list shows the module is enabled. <module name="toaster" xmlns="urn:ietf:params:xml:ns:yang:yin:1"

<"yang-version value="1""> <"namespace uri="http://netconfcentral.org/ns/toaster""> <"prefix value="toast""> <"organisation"> <"text"> Netconf Central <"/text"> <"/organization"> This is the yin file i have added to "netopeergui" virtual box.Now when i do "get-config" with my own api it shows other default modules and not the module which i have added. Please let me know what should i do, to get this data. Used netopeer-configurator, the UI says module is enabled.
rkrejci commented 8 years ago

Hi, did you upgraded the VM demo as suggested @alexadavid?

Can you provide the list of capabilities announced by the server? It is available in the GUI when you connect to a device and then on the "Configuration" screen there is Info icon on the left side of the upper bar (next to the lock icon). So just click on the icon and post the content.

Premilav commented 8 years ago

I have installed the latest one https://www.liberouter.org/docs/2015-05-11-netopeer-demo.ova as instructed.

Now restarted the server in virtual box via UI-> popup->restart. NetopeerGui server is not getting initialized. Please let me know what might be the problem. I am in need of Netconf server for testing all the netconf operations.

Premilav commented 8 years ago

While connect the server via netconf cli it says error : libnetconf error:Unable to connect to localhost:830 connect:connecting to the localhost:830 as user"(null)" failed. Help is highly appreciated.

rkrejci commented 8 years ago

Does the netopeer-server provide some log messages? Try to start the server manually with a higher verbose level and check (post) the output:

# netopeer-server -v 3
Premilav commented 8 years ago

Thanks for response. I removed few newly added modules via netopeer-manager. When i restarted the server, itis getting started is listed below, Now i would like to add one module and do get-config & edit-config. Any small sample module for testing. The server capabilities, <?xml version="1.0" encoding="UTF-8" standalone="no"?><capabiliti es>urn:ietf:params:netconf:base:1.0Session Established >>>>>>>>>>>>>>>>>

CAPABILITIES :[urn:ietf:params:netconf:base:1.0, urn:ietf:params:netconf:base:1.1, urn:ietf:params:netconf:capability:writable-ru nning:1.0, urn:ietf:params:netconf:capability:candidate:1.0, urn:ietf:params:netconf:capability:startup:1.0, urn:ietf:pa rams:netconf:capability:rollback-on-error:1.0, urn:ietf:params:netconf:capability:interleave:1.0, urn:ietf:params:netcon f:capability:notification:1.0, urn:ietf:params:netconf:capability:validate:1.0, urn:ietf:params:netconf:capability:valid ate:1.1, urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-t agged,trim,explicit, urn:ietf:params:netconf:capability:url:1.0?scheme=scp,file, http://example.net/turing-machine?modul e=turing-machine&revision=2013-12-27, urn:ietf:params:xml:ns:yang:ietf-system?module=ietf-system&revision=2014-08-06&fea tures=authentication,local-users,timezone-name, urn:ietf:params:xml:ns:yang:ietf-ip?module=ietf-ip&revision=2014-06-16&f eatures=ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf, urn:ietf:params:xml:ns:yang:ietf-interfaces?module=ietf-inte rfaces&revision=2014-05-08, urn:ietf:params:xml:ns:yang:iana-if-type?module=iana-if-type&revision=2014-05-08, urn:cesnet :tmc:netopeer:1.0?module=netopeer-cfgnetopeer&revision=2015-01-15&features=ssh, urn:ietf:params:xml:ns:yang:ietf-netconf -server?module=ietf-netconf-server&revision=2014-01-24&features=ssh,inbound-ssh,outbound-ssh, urn:ietf:params:xml:ns:yan g:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2013-03-26, urn:ietf:params:xml:ns:yang:ietf-netconf-acm ?module=ietf-netconf-acm&revision=2012-02-22, urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf -with-defaults&revision=2010-06-09, urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-0 7-14, urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14, urn:ietf:params:xml:ns:yan g:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2011-08-07, urn:ietf:params:xml:ns:yang:ietf-net conf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04, urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf- netconf&revision=2011-03-08&features=writable-running,candidate,rollback-on-error,validate,startup,url, urn:ietf:params: xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15, urn:ietf:params:xml:ns:yang:ietf-inet-types?modu le=ietf-inet-types&revision=2010-09-24] /&&&&&& Testing hasStartup() method bool value : true /^^^^^^ Testing hasCandidate() method bool value : true /** Testing hasWritableRunning() bool value : true /^^^^^^ Testing hasUrl() method bool value : false /** Testing hasXPath() method bool value : false /^^^^^^ Testing hasInterleave() method bool value : true /** Testing hasPartialLock() method bool value : false /^^^^^^ Testing hasRollbackOnError() method bool value : true /** Testing hasNotification() method bool value : true /** Testing hasConfirmedCommit() method bool value : false /** Testing hasValidate() method bool value : true <?xml version="1.0" encoding="UTF-8" standalone="no"?><rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0

Premilav commented 8 years ago

Hi,

Could anyone tell me how the edit-config will be carried out for groups.

alexadavid commented 8 years ago

Hello, what do you exactly mean carried out for groups? Do you mean groups in linux module (called system in demo)? Or for more devices (group of devices)?

Premilav commented 8 years ago

Hi, "Grouping in Netconf" Eg : https://www.ietf.org/mail-archive/web/netconf/current/msg10318.html Few yang files have a set of groups named as "Grouping" http://dld.netconfcentral.org/src/ietf-ipfix-psamp@2012-09-05.yang How this is handled in netopeerGui server.

michalvasko commented 8 years ago

Hi,

groupings are basically just a syntactic construct, they are not handled specially. They get placed wherever uses with the name of the grouping occurs in the model to create the final model that is afterwards used in NetopeerGUI. You can see how the final model looks using, for instance, pyang -f tree path-to-the-model-file.

Regards, Michal

Premilav commented 8 years ago

Hi, When i did "edit-config" to netopeer, it says "ok" message.But the value is not added/modified in the server. What would be the problem.

rkrejci commented 8 years ago

The problem could be in your edit-config. It is impossible to say what should happen when we don't see the edit-config content and the content of the datastore being targeted.

BTW, please note the name of this issue - "Appeal on install Netopeer-GUI" I guess that this has nothing to do with install process, so please open a new issue and be more specific in what you are doing, what is expected result and what is, in contrast, the real result.