Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
343 stars 52 forks source link

Rootdevice Major Errors after installing LuCI #240

Closed kevdagoat closed 5 years ago

kevdagoat commented 5 years ago

NB: Before submitting an issue, check if there is one already open that suits the problem you are having!

Device Model: TG799 Gui Version: Latest Stable

Description of problem: rootdevice not working and erroring badly :(

How to reproduce (if possible):

Media/Photos (if possible):

Root Script: Rooting in progress... Command failed: Not found Root Script: Disable watchdog Root Script: Start rooting Root Script: Stopping nginx and transformer Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found Command failed: Not found ... It goes on another 50 ish lines like that

FrancYescO commented 5 years ago

and it never go over?

could you try to execute /etc/init.d/nginx stop and check if you get same errors?

kevdagoat commented 5 years ago

Yep.

kevdagoat commented 5 years ago

/root$ /etc/init.d/nginx stop Command failed: Not found

kevdagoat commented 5 years ago

cat /etc/init.d/nginx [

!/bin/sh /etc/rc.common

Copyright (C) 2015 OpenWrt.org

START=80

USE_PROCD=1

start_service() { [ -d /var/log/nginx ] || mkdir -p /var/log/nginx [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx procd_open_instance procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' procd_set_param file /etc/nginx/nginx.conf procd_set_param respawn procd_close_instance }

kevdagoat commented 5 years ago

cat /rom/etc/init.d/nginx

!/bin/sh /etc/rc.common

Copyright (C) 2015 OpenWrt.org

START=80

USE_PROCD=1

start_service() { [ -d /var/log/nginx ] || mkdir -p /var/log/nginx [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx procd_open_instance procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' procd_set_param file /etc/nginx/nginx.conf procd_set_param respawn procd_close_instance }

Ansuel commented 5 years ago

Not found error is because nginx is not running...

Il Lun 1 Ott 2018, 10:30 Kevdagoat notifications@github.com ha scritto:

cat /rom/etc/init.d/nginx

!/bin/sh /etc/rc.common

Copyright (C) 2015 OpenWrt.org

START=80

USE_PROCD=1

start_service() { [ -d /var/log/nginx ] || mkdir -p /var/log/nginx [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx procd_open_instance procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' procd_set_param file /etc/nginx/nginx.conf procd_set_param respawn procd_close_instance }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/240#issuecomment-425828135, or mute the thread https://github.com/notifications/unsubscribe-auth/ATWWQvXll53clAgVNtZzR0E22tx03fmHks5ugdKKgaJpZM4XBgfA .

kevdagoat commented 5 years ago

Changed it to killall nginx and got rootscript to function. Now have this error:

nginx: [emerg] BIO_new_file("/etc/nginx/server.crt") failed (SSL: error:02001002:lib(2):func(1):reason(2):fopen('/etc/nginx/server.crt','r') error:2006D080:lib(32):func(109):reason(128))

kevdagoat commented 5 years ago

Disabled ssl in nginx.conf and nginx is now running.

server { listen 80;

listen 443 ssl;

    listen       8443;
    # ssl_certificate /etc/nginx/server.crt;
    # ssl_certificate_key /etc/nginx/server.key;
    # based on https://wiki.mozilla.org/Security/Server_Side_TLS
    # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # sl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS;
    # sl_prefer_server_ciphers on;
    # l_session_tickets off;

Sadly dreaded 500 Internal Server Error

kevdagoat commented 5 years ago
<27>Oct 1 18:47:38 nginx: 2018/10/01 18:47:38 [error] 16160#0: *3 [lua] sessioncontrol.lua:79: get_datamodel_config(): failed to retrieve config: Connection refused, client: 10.0.0.38, server: localhost, request: "GET /cards.lp HTTP/1.1", host: "10.0.0.1 120.149.198.199 01/10 16:47:40.566 <27>Oct 1 18:47:38 nginx: 2018/10/01 18:47:38 [error] 16160#0: *4 [lua] sessioncontrol.lua:79: get_datamodel_config(): failed to retrieve config: Connection refused, client: 10.0.0.38, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "10.0. 120.149.198.199 01/10 16:47:40.582
kevdagoat commented 5 years ago

Coming from this line in /usr/lib/lua/web/sessioncontrol.lua:

local function get_datamodel_config(path) local data, errmsg = dm.get(path) if not data then ngx.log(ngx.ERR, "failed to retrieve config: ", errmsg) ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) end return convert_data_to_config(data) end

kevdagoat commented 5 years ago

Indicating that either transformer is dead or /etc/config/web is blank, which it isnt.

kevdagoat commented 5 years ago

http://whrl.pl/RfeLyc A common problem

kevdagoat commented 5 years ago

Transformer: /etc/config$ transformer lua: /usr/bin/transformer:26: module 'uci' not found: no field package.preload['uci'] no file './uci.lua' no file '/usr/share/lua/uci.lua' no file '/usr/share/lua/uci/init.lua' no file '/usr/lib/lua/uci.lua' no file '/usr/lib/lua/uci/init.lua' no file './uci.so' no file '/usr/lib/lua/uci.so' no file '/usr/lib/lua/loadall.so' stack traceback: C: in function 'require' /usr/bin/transformer:26: in function 'do_config' /usr/bin/transformer:74: in main chunk

Ansuel commented 5 years ago

You installed Luci right?

Il Lun 1 Ott 2018, 11:08 Kevdagoat notifications@github.com ha scritto:

Transformer: /etc/config$ transformer lua: /usr/bin/transformer:26: module 'uci' not found: no field package.preload['uci'] no file './uci.lua' no file '/usr/share/lua/uci.lua' no file '/usr/share/lua/uci/init.lua' no file '/usr/lib/lua/uci.lua' no file '/usr/lib/lua/uci/init.lua' no file './uci.so' no file '/usr/lib/lua/uci.so' no file '/usr/lib/lua/loadall.so' stack traceback: C: in function 'require' /usr/bin/transformer:26: in function 'do_config' /usr/bin/transformer:74: in main chunk

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/240#issuecomment-425838580, or mute the thread https://github.com/notifications/unsubscribe-auth/ATWWQhUwq0mEBs9MCNPnK7bYUhGvheiSks5ugduDgaJpZM4XBgfA .

Ansuel commented 5 years ago

If yes I know what's the problem ... Will tell you a way to fix this this afternoon

Il Lun 1 Ott 2018, 11:20 Ansuel Smith ansuelsmth@gmail.com ha scritto:

You installed Luci right?

Il Lun 1 Ott 2018, 11:08 Kevdagoat notifications@github.com ha scritto:

Transformer: /etc/config$ transformer lua: /usr/bin/transformer:26: module 'uci' not found: no field package.preload['uci'] no file './uci.lua' no file '/usr/share/lua/uci.lua' no file '/usr/share/lua/uci/init.lua' no file '/usr/lib/lua/uci.lua' no file '/usr/lib/lua/uci/init.lua' no file './uci.so' no file '/usr/lib/lua/uci.so' no file '/usr/lib/lua/loadall.so' stack traceback: C: in function 'require' /usr/bin/transformer:26: in function 'do_config' /usr/bin/transformer:74: in main chunk

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/240#issuecomment-425838580, or mute the thread https://github.com/notifications/unsubscribe-auth/ATWWQhUwq0mEBs9MCNPnK7bYUhGvheiSks5ugduDgaJpZM4XBgfA .

FrancYescO commented 5 years ago

try to execute cp /rom/usr/lib/lua/uci.so /usr/lib/lua/ than restart nginx

i've opened an issue about that on tg-luci repo https://github.com/nutterpc/tg-luci/issues/13

Ansuel commented 5 years ago

yep that's the problem luci install overwrite uci.so and transformer needs a modified library

luci is compatible with the modified uci.so but transformer is not compatible with the modified one ;)

Ansuel commented 5 years ago

also restart transformer

kevdagoat commented 5 years ago

Yep, did install LuCI

On 1 Oct 2018, at 9:22 pm, Ansuel Smith notifications@github.com wrote:

also restart transformer

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

FrancYescO commented 5 years ago

We found that installing Luci will break some nginx/transformer needed file (uci.so) the unistall script in the nutterpc repo is not able to fully revert all the edit that the install make: some Luci deps packages still remain installed and this will also give some issue when you try to reinstall LUCI as it will skip some files


From: Kevdagoat notifications@github.com Sent: Tuesday, October 2, 2018 1:21:03 AM To: Ansuel/tch-nginx-gui Cc: Francesco M; Comment Subject: Re: [Ansuel/tch-nginx-gui] Rootdevice Major Errors? (#240)

Yep, did install LuCI

On 1 Oct 2018, at 9:22 pm, Ansuel Smith notifications@github.com wrote:

also restart transformer

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Ansuel/tch-nginx-gui/issues/240#issuecomment-426095831, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEXNgTSzrhgZzriufgS8T5zCF0Zar65eks5ugqNfgaJpZM4XBgfA.

kevdagoat commented 5 years ago

That restored transformer.

Now have this issue hahaha :) image

kevdagoat commented 5 years ago

log: nginx: 2018/10/03 18:06:52 [error] 11937#0: *1 [lua] sessionmgr.lua:251: checkrequest(): Unauthorized request, client: 10.0.0.38, server: localhost, request: "GET / HTTP/1.1", host: "10.0.0.138"

nginx: 2018/10/03 18:07:04 [error] 11937#0: *2 open() "/www/docroot/theme/'); ngx.print( cui.gui_skin ); ngx.print('/script.js" failed (2: No such file or directory), client: 10.0.0.38, server: localhost, request: "GET /theme/');%20%2 10.0.0.138

nginx: 2018/10/03 18:07:04 [error] 11937#0: *4 open() "/www/docroot/theme/'); ngx.print( cui.gui_skin ); ngx.print('/style.css" failed (2: No such file or directory), client: 10.0.0.38, server: localhost, request: "GET /theme/');%20%2 10.0.0.138

nginx: 2018/10/03 18:07:04 [error] 11937#0: *6 open() "/www/docroot/theme/'); ngx.print( cui.gui_skin ); ngx.print('/script.js" failed (2: No such file or directory), client: 10.0.0.38, server: localhost, request: "GET /theme/');%20%2 10.0.0.138

FrancYescO commented 5 years ago

you got this after cp /rom/usr/lib/lua/uci.so /usr/lib/lua/? and restarted both nginx and transformer?

kevdagoat commented 5 years ago

Yep

Sent from Mail for Windows 10

From: Francesco M Sent: Wednesday, October 3, 2018 5:18 PM To: Ansuel/tch-nginx-gui Cc: Kevdagoat; Author Subject: Re: [Ansuel/tch-nginx-gui] Rootdevice Major Errors after installingLuCI (#240)

you got this after cp /rom/usr/lib/lua/uci.so /usr/lib/lua/? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Ansuel commented 5 years ago

luci was not supported in tg799 ! also for now is broken we need to wait a custom library from nutterpc