openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.36k stars 2.53k forks source link

luci-app-ddns: error when trying to create a service #5987

Open castillofrancodamian opened 2 years ago

castillofrancodamian commented 2 years ago

Steps to reproduce:

  1. go to: Services → Dynamic DNS→ Add new services...
  2. In the pop-up enter any name and choose any provider.
  3. Click on "Create service"

Actual behavior: Error that prevents the creation of a service.

Expected behavior: Create a DDNS service and make the corresponding configuration.

Additional Information:

One solution that works is to press "Cancel" to return to the app and configure the service.

Screenshot_20220923_175800

DISTRIB_ID='OpenWrt' DISTRIB_RELEASE='SNAPSHOT' DISTRIB_REVISION='r20728-a24e07700d' DISTRIB_TARGET='ath79/generic' DISTRIB_ARCH='mips_24kc' DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r20728-a24e07700d' DISTRIB_TAINTS='no-all'

csjtl commented 2 years ago

me too

IP don't Update

214812 : **** ** ** ** 214812 note : PID '3375' started at 2022-10-01 21:48 214812 : ddns version : 2.8.2-27 214812 : uci configuration: ddns.proxypoolCheck.check_unit='minutes' ddns.proxypoolCheck.domain='ddns.xxxxxx.com' ddns.proxypoolCheck.enabled='1' ddns.proxypoolCheck.force_unit='minutes' ddns.proxypoolCheck.interface='wan' ddns.proxypoolCheck.ip_network='wan' ddns.proxypoolCheck.ip_source='network' ddns.proxypoolCheck.lookup_host='ddns.xxxxxx.com' ddns.proxypoolCheck.password='PW' ddns.proxypoolCheck.retry_unit='seconds' ddns.proxypoolCheck.service_name='google.com' ddns.proxypoolCheck.use_ipv6='0' ddns.proxypoolCheck.use_syslog='2' ddns.proxypoolCheck.username='xxxxxxxxxxxxxx' ddns.proxypoolCheck=service 214813 : verbose mode : 0 - run normal, NO console output 214813 : check interval: 600 seconds 214813 : force interval: 4320 seconds 214813 : retry interval: 60 seconds 214813 : retry max count : 0 times 214813 : No old process 214813 : last update: never 214813 : Detect registered/public IP 214813 : #> /usr/bin/nslookup ddns.xxxxxx.com >/var/run/ddns/proxypoolCheck.dat 2>/var/run/ddns/proxypoolCheck.err 214813 : Registered IP 'xx.xx.215.41' detected 214813 info : Starting main loop at 2022-10-01 21:48 214814 : Detect current IP on 'network' 214814 : Current IP 'xx.xx.92.242' detected on network 'wan' 214814 : Update needed - L: 'xx.xx.92.242' <> R: 'xx.xx.215.41' 214814 : Force communication via device 'pppoe-wan' 214814 : #> /usr/bin/curl -RsS -o /var/run/ddns/proxypoolCheck.dat --stderr /var/run/ddns/proxypoolCheck.err --interface pppoe-wan --noproxy '*' 'https://xxxxxxxxxxxxxx:***PW***@domains.google.com/nic/update?hostname=ddns.xxxxxx.com&myip=xx.xx.92.242' 215112 ERROR : cURL Error: '28' 215112 : curl: (28) Failed to connect to domains.google.com port 443 after 132154 ms: Operation timed out 215112 WARN : Transfer failed - retry 1/0 in 60 seconds 215212 : #> /usr/bin/curl -RsS -o /var/run/ddns/proxypoolCheck.dat --stderr /var/run/ddns/proxypoolCheck.err --interface pppoe-wan --noproxy '*' 'https://xxxxxxxxxxxxxx:***PW***@domains.google.com/nic/update?hostname=ddns.xxxxxx.com&myip=xx.xx.92.242' 215421 ERROR : cURL Error: '28' 215421 : curl: (28) Failed to connect to domains.google.com port 443 after 129270 ms: Operation timed out 215421 WARN : Transfer failed - retry 2/0 in 60 seconds 215521 : #> /usr/bin/curl -RsS -o /var/run/ddns/proxypoolCheck.dat --stderr /var/run/ddns/proxypoolCheck.err --interface pppoe-wan --noproxy '*' 'https://xxxxxxxxxxxxxx:***PW***@domains.google.com/nic/update?hostname=ddns.xxxxxx.com&myip=xx.xx.92.242' 215731 ERROR : cURL Error: '28' 215731 : curl: (28) Failed to connect to domains.google.com port 443 after 129281 ms: Operation timed out 215731 WARN : Transfer failed - retry 3/0 in 60 seconds 215831 : #> /usr/bin/curl -RsS -o /var/run/ddns/proxypoolCheck.dat --stderr /var/run/ddns/proxypoolCheck.err --interface pppoe-wan --noproxy '*' 'https://xxxxxxxxxxxxxx:***PW***@domains.google.com/nic/update?hostname=ddns.xxxxxx.com&myip=xx.xx.92.242'

jcassette commented 2 years ago

I can reproduce this on OpenWrt 22.03.0 r19685-512e76967f / LuCI openwrt-22.03 branch git-22.245.77528-487e58a

Traceback: (click to expand) ``` error (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#165) renderMoreOptionsModal (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#228) handleCreateDDnsRule (http://openwrt.lan/luci-static/resources/view/ddns/overview.js?v=git-22.245.77528-487e58a#54) createHandlerFn (http://openwrt.lan/luci-static/resources/ui.js?v=git-22.245.77528-487e58a#352) attr (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#114) create (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#121) E (http://openwrt.lan/luci-static/resources/cbi.js?v=git-22.141.59265-d8ecf48#127) handleAdd (http://openwrt.lan/luci-static/resources/view/ddns/overview.js?v=git-22.245.77528-487e58a#58) handleAdd (http://openwrt.lan/luci-static/resources/view/ddns/overview.js?v=git-22.245.77528-487e58a#58) createHandlerFn (http://openwrt.lan/luci-static/resources/ui.js?v=git-22.245.77528-487e58a#352) attr (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#114) create (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#121) E (http://openwrt.lan/luci-static/resources/cbi.js?v=git-22.141.59265-d8ecf48#127) renderSectionAdd (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#148) renderContents (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#166) render (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#159) renderChildren (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#34) renderContents (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#48) render (http://openwrt.lan/luci-static/resources/form.js?v=git-22.245.77528-487e58a#48) render (http://openwrt.lan/luci-static/resources/view/ddns/overview.js?v=git-22.245.77528-487e58a#130) __init__ (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#147) super (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#22) ClassConstructor (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#12) compileClass (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#182) compileClass (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#178) require (http://openwrt.lan/luci-static/resources/luci.js?v=git-22.245.77528-487e58a#184) instantiateView (http://openwrt.lan/luci-static/resources/ui.js?v=git-22.245.77528-487e58a#352) (http://openwrt.lan/cgi-bin/luci/admin/services/ddns#54) (http://openwrt.lan/cgi-bin/luci/admin/services/ddns#53) ```

It seems related to validating the option after saving it:

https://github.com/openwrt/luci/blob/50f84c7293a25187a46bf1cec41bf8c7c78452a9/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js#L479

https://github.com/openwrt/luci/blob/50f84c7293a25187a46bf1cec41bf8c7c78452a9/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js#L505

Introduced by #4471 ?

SkateWarp commented 2 months ago

Same issue here