mkschreder / juci-openwrt-feed

OpenWRT feed with all JUCI related packages.
31 stars 34 forks source link

can't have juci run up while following the instructions #26

Open ajeecai opened 7 years ago

ajeecai commented 7 years ago

Hi,

This is my steps:

  1. Install all prerequisites including run "./ubuntu-bootstrap.sh" on a Ubuntu 14.04 LTS.
  2. git clone juci-openwrt-feed into this PC.
  3. Run ./build-uml-image.sh
  4. Setup tap0 as said in the readme in https://github.com/mkschreder/juci
  5. run "./openwrt-uml-vmlinux ubd0=openwrt-uml-ext4.img eth0=tuntap,tap0" in the output bin/uml
  6. change the IP setting after uml openwrt starts up, also as juci readme said.
  7. Using Firefox to access 192.168.2.100, the browser always show an endless rolling wheel with blank page.
  8. Check and find openwrt using original lighttpd, so ln -sf ../../../feeds/juci/libwebsockets libwebsockets && ln -sf ../../../feeds/juci/lighttpd lighttpd.
  9. go back to make openwrt manually with make V=99. When it is done, run it as step 5.
  10. Now it displays this page:

image

Click OK then another error comes up:

image

muvarov commented 7 years ago

I have the same. Reason is modified lighthttpd from juci layer is not compiled and OE version is shipped. That leads to ws:// IP/websocket/ url not working. And on web console FF says that it can not connect.

Modified version is PKG_VERSION:=1.4.33 but OpenWrt original has PKG_VERSION:=1.4.45, so shipped is original version. And it's not clear how to force new version to image.

mkschreder commented 7 years ago

The websocket extension for lighttpd is licensed under GPLv3 and lighttpd devs don't want to include it because of that (too bad for them). This creates a lot of inconvenience for many people having to include lighttpd with modwebsocket as a separate package.

The general build rule is: on a clean openwrt build install all custom feeds first, including juci feed, then install openwrt feeds. Packages that have already been installed will not be installed twice so you will get the right versions.

On 20 Apr 2017 15:58, "muvarov" notifications@github.com wrote:

I have the same. Reason is modified lighthttpd from juci layer is not compiled and OE version is shipped. That leads to ws:// IP/websocket/ url not working. And on web console FF says that it can not connect.

Modified version is PKG_VERSION:=1.4.33 but OpenWrt original has PKG_VERSION:=1.4.45, so shipped is original version. And it's not clear how to force new version to image.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-295747657, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqia81LD5Ips8W9AFp2_rEAOHdrX_Fks5rx2SEgaJpZM4M7aqL .

muvarov commented 7 years ago

make it work finally and I think I understand how it works and lest at high level communication pieces together. In general looks good vlan settings are missing. And for some reason it excludes devices from bridge after some time. That wasn't happen with luci. orangerpcd takes 23% of cpu time which looks like too high.

mkschreder commented 7 years ago

what is the last commit date in the orangerpcd you are using. It should be idle most of the time. You can use ps -T option to view threads and see if there is some particular thread that consumes more cpu.

On 20 Apr 2017 17:57, "muvarov" notifications@github.com wrote:

make it work finally and I think I understand how it works and lest at high level communication pieces together. In general looks good vlan settings are missing. And for some reason it excludes devices from bridge after some time. That wasn't happen with luci. orangerpcd takes 23% of cpu time which looks like too high.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-295790298, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiVt_NGh_bKaoH7V6kjp80PrZyb1Nks5rx4BPgaJpZM4M7aqL .

olesorensen commented 7 years ago

Hi muvarov

I'm having same problem. How did you make it work?

muvarov commented 7 years ago

@mkschreder openwrt code does not support ps -T, at lest my build. Perf shows me that info:

    35.45%  [kernel]         [k] __getnstimeofday64         
     9.27%  [kernel]         [k] vector_swi                 
     6.73%  [kernel]         [k] sys_clock_gettime          
     5.95%  libc.so          [.] 0x00051f80                 
     4.59%  [kernel]         [k] clocksource_read_cycles    
     1.38%  [kernel]         [k] lock_acquire               
     0.97%  [kernel]         [k] __copy_to_user_std         
     0.89%  [kernel]         [k] _raw_spin_unlock_irqrestore
     0.78%  [kernel]         [k] lock_is_held_type          
     0.73%  [kernel]         [k] posix_clock_realtime_get   
     0.55%  [kernel]         [k] ret_fast_syscall           
     0.50%  libc.so          [.] 0x00028730                 
     0.47%  libc.so          [.] 0x00028748                 
     0.47%  [kernel]         [k] __do_softirq               
     0.46%  [kernel]         [k] lock_release               
     0.46%  [kernel]         [k] getnstimeofday64           
     0.40%  [kernel]         [k] clockid_to_kclock          
     0.37%  liblua.so.5.1.5  [.] 0x0000f7c8                 
     0.36%  libc.so          [.] 0x00028ab0                 
     0.31%  liblua.so.5.1.5  [.] 0x00009b48  

PKG_SOURCE_URL:=https://github.com/mkschreder/orangerpcd.git PKG_SOURCE_VERSION:=0ba596e8d14362eea89442c0e0ccbc94ecd44e8f

muvarov commented 7 years ago

@olesorensen in general you need just to follow instructions and select target machine which you need. Do not forget to enable openssl lib and sha1 support in busy box. Also you need to check that feeds/juci/lighttpd with it's configs delivered to image and /www directory is full of scripts. Kernel have to support ipv6, if not orange-rpcd will show big warn that it can not bind to socket, but might be it continuous work with ipv4. So if you compiled everything ok (in many places of juci feed you need to update to the latest git) then you need to check what all pieces are set and working - /www files, telnet to rpc socket, httpserver with configs.

mkschreder commented 7 years ago

Try ps -eLf.

On 21 Apr 2017 09:19, "muvarov" notifications@github.com wrote:

@olesorensen https://github.com/olesorensen in general you need just to follow instructions and select target machine which you need. Do not forget to enable openssl lib and sha1 support in busy box. Also you need to check that feeds/juci/lighttpd with it's configs delivered to image and /www directory is full of scripts. Kernel have to support ipv6, if not orange-rpcd will show big warn that it can not bind to socket, but might be it continuous work with ipv4. So if you compiled everything ok (in many places of juci feed you need to update to the latest git) then you need to check what all pieces are set and working - /www files, telnet to rpc socket, httpserver with configs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-296104375, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiTgZdfHvnb_jThE3jvr9rjHlEii7ks5ryFhwgaJpZM4M7aqL .

ajeecai commented 7 years ago

Looks like things were not done correctly at the time I posted this question, today I retried with on Ubuntu 14.04, running ./build-uml-image.sh from scratch, without any interference the uml image is built. Running up this image gives me the same error as said, but I modified the orangerpcd with 0ba596e, and built it again, this time I got it running well :) Thanks @muvarov . I suggest to update the repository, a new comer may feel frustrated if not easy to set it up.

I recalled hard, the problem I met may be that I run it over the latest openwrt from head of https://github.com/openwrt/openwrt.git, instead of 15.05 version. Then I tried it again and found I had to figure out some compiling error, after I went through it (also update orangerpcd of course), the GUI doesn't show popup error but also there are some abnormal rolling wheels. So looks like current code doesn't match latest openwrt.

Another question for @mkschreder , is there any plan to update angularjs to 2.0 since it becomes mainstream now.

Thanks

muvarov commented 7 years ago

@mkschreder looks like some internal bug. After reboot cpu usage is very small and it's hard to capture conditions where I saw that. Some time see javascript errors but in general it works. Do you develop support juci alone or there is some community?

djhamzas commented 7 years ago

Hi ,

I want to develop my own WEBGUI with uci and php or pl can any one give me an example of interaction between language php and uci .or how prepare platform to do that .

thanks

2017-04-24 15:17 GMT+01:00 muvarov notifications@github.com:

@mkschreder https://github.com/mkschreder looks like some internal bug. After reboot cpu usage is very small and it's hard to capture conditions where I saw that. Some time see javascript errors but in general it works. Do you develop support juci alone or there is some community?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-296682298, or mute the thread https://github.com/notifications/unsubscribe-auth/AU-BueS-37QnhpqdecYzmt3Giw1Bfjetks5rzK7dgaJpZM4M7aqL .

mkschreder commented 7 years ago

You interact with backend using javascript. There is uci.js and rpc.js which are fairly standalone which you can use in your php code. orangerpcd provides everything you need to bind to both uci (over ubus), ubus, and custom lua plugins that it can execute in parallel to maximize request throughput.

On 24 Apr 2017 17:34, "djhamzas" notifications@github.com wrote:

Hi ,

I want to develop my own WEBGUI with uci and php or pl can any one give me an example of interaction between language php and uci .or how prepare platform to do that .

thanks

2017-04-24 15:17 GMT+01:00 muvarov notifications@github.com:

@mkschreder https://github.com/mkschreder looks like some internal bug. After reboot cpu usage is very small and it's hard to capture conditions where I saw that. Some time see javascript errors but in general it works. Do you develop support juci alone or there is some community?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment- 296682298, or mute the thread https://github.com/notifications/unsubscribe-auth/AU-BueS- 37QnhpqdecYzmt3Giw1Bfjetks5rzK7dgaJpZM4M7aqL .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-296708503, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqie6ATvhs0Kz5goa3xuRlR_EqbPaXks5rzMDmgaJpZM4M7aqL .

mkschreder commented 7 years ago

It was previously a bug in an older version related to how deferred shell was running commands. I don't know if it is some related issue you have now. Easiest way to check is to see what thread consumes the cpu when it happens. Since each type of thread has a distinct name in orangerpcd, it is possible to view them using ps as though they were distinct processes (which they are under linux) and see which one of them consumes the cpu when it happens. The bug is then somewhere in the code of that process (thread).

I wrote it myself (something like >95%, rest is adopted from other projects). Now I moved on to other things that interest me. But it is a GPL project, GPL projects can change management at any time and continue to evolve independently. Feel like you are up for the job? Go on and develop it further or make some new GPL project out of it that's even better! :-)

On 24 Apr 2017 16:17, "muvarov" notifications@github.com wrote:

@mkschreder https://github.com/mkschreder looks like some internal bug. After reboot cpu usage is very small and it's hard to capture conditions where I saw that. Some time see javascript errors but in general it works. Do you develop support juci alone or there is some community?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-openwrt-feed/issues/26#issuecomment-296682298, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiWr0KgGiDDINl3tiUw4jVnJdUaE4ks5rzK7dgaJpZM4M7aqL .