Git Product home page Git Product logo

Comments (3)

hgy59 avatar hgy59 commented on August 16, 2024

I believe this is intended behaviour, and #5378 suggests starting on boot is not generally intended for spksrc. However cloudflared clearly is a service, and one that can be pretty critical, so I'd like to ask to reconsider that decision in this context.

No, this is not the intended behaviour.
The referenced issue is related to synocli-net package, a package that contains several command line utilites and no service.
As service must be running after a restart of the NAS.

Log files are welcome. In this case the most interesting file is /var/packages/cloudflared/var/cloudflared.log

Additional tests are manual stop and start of cloudflared in the package center to see regular entries in cloudflared.log.

from spksrc.

davidn avatar davidn commented on August 16, 2024

For log context, my NAS had a power failure and automatically rebooted at 2024-01-09 09:50 PST. I noticed the cloudflare tunnel was down and manually started cloudflared arount 11:04 PST.

/var/log/packages/cloudflared.log from first entry in 2024:

2024/01/09 09:51:17	(system) trigger cloudflared 2023.7.1-10 Begin start-stop-status start
2024/01/09 09:51:18	(system) trigger cloudflared 2023.7.1-10 End start-stop-status start ret=[0]
2024/01/09 11:03:59	start cloudflared 2023.7.1-10 Begin start-stop-status stop
2024/01/09 11:03:59	start cloudflared 2023.7.1-10 End start-stop-status stop ret=[0]
2024/01/09 11:04:01	start cloudflared 2023.7.1-10 Begin start-stop-status start
2024/01/09 11:04:01	start cloudflared 2023.7.1-10 End start-stop-status start ret=[0]

/var/packages/cloudflared/var/cloudflared.log from start of file:

Tue Jan  9 11:04:01 PST 2024
Starting cloudflared command /volume1/@appstore/cloudflared/bin/cloudflared --no-autoupdate tunnel run --token REDACTED
2024-01-09T19:04:01Z INF Starting tunnel tunnelID=65aae4dd-5a29-4039-866b-f1c7c2943c4a
2024-01-09T19:04:01Z INF Version 2023.7.1
2024-01-09T19:04:01Z INF GOOS: linux, GOVersion: go1.20.5, GoArch: amd64
2024-01-09T19:04:01Z INF Settings: map[no-autoupdate:true token:*****]
2024-01-09T19:04:01Z INF Generated Connector ID: 8503fab3-76d1-453a-8eb8-9cd1047bb766
2024-01-09T19:04:01Z INF Initial protocol quic
2024-01-09T19:04:01Z INF ICMP proxy will use 192.168.0.8 as source for IPv4
2024-01-09T19:04:01Z INF ICMP proxy will use fe80::9209:d0ff:fe0f:a7c5 in zone ovs_eth0 as source for IPv6
2024-01-09T19:04:01Z WRN The user running cloudflared process has a GID (group ID) that is not within ping_group_range. You might need to add that user to a group within that range, or instead update the range to encompass a group the user is already in by modifying /proc/sys/net/ipv4/ping_group_range. Otherwise cloudflared will not be able to ping this network error="Group ID 207066 is not between ping group 1 to 0"
2024-01-09T19:04:01Z WRN ICMP proxy feature is disabled error="cannot create ICMPv4 proxy: Group ID 207066 is not between ping group 1 to 0 nor ICMPv6 proxy: socket: permission denied"
2024-01-09T19:04:01Z INF Starting metrics server on 127.0.0.1:37744/metrics
2024/01/09 11:04:01 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.
2024-01-09T19:04:01Z WRN Your version 2023.7.1 is outdated. We recommend upgrading it to 2023.10.0
2024-01-09T19:04:01Z INF Registered tunnel connection connIndex=0 connection=e5207723-6062-4602-8d60-62a6f76f2cb1 event=0 ip=198.41.192.77 location=lax06 protocol=quic
2024-01-09T19:04:01Z INF Registered tunnel connection connIndex=1 connection=253c3967-383b-4222-9fac-248698b8bfd2 event=0 ip=198.41.200.33 location=sea05 protocol=quic
2024-01-09T19:04:02Z INF Updated to new configuration config="{\"ingress\":[{\"hostname\":\"nas.newg.as\",\"originRequest\":{\"access\":{\"audTag\":[],\"required\":false,\"teamName\":\"newgas\"},\"caPool\":\"\",\"noTLSVerify\":false,\"originServerName\":\"killroy.newg.as\"},\"service\":\"https://killroy.sea.newg.as:5001\"},{\"hostname\":\"homeassistant.newg.as\",\"originRequest\":{\"caPool\":\"\",\"originServerName\":\"homeassistant.newg.as\"},\"service\":\"https://homeassistant.sea.newg.as\"},{\"hostname\":\"grafana.newg.as\",\"originRequest\":{},\"service\":\"http://killroy.sea.newg.as:3000\"},{\"hostname\":\"router.newg.as\",\"originRequest\":{},\"service\":\"http://192.168.0.1\"},{\"hostname\":\"video.newg.as\",\"originRequest\":{\"originServerName\":\"killroy.newg.as\"},\"service\":\"https://killroy.sea.newg.as:9007\"},{\"hostname\":\"file.newg.as\",\"originRequest\":{\"originServerName\":\"killroy.newg.as\"},\"service\":\"https://killroy.sea.newg.as:7001\"},{\"hostname\":\"syndrive.newg.as\",\"originRequest\":{\"originServerName\":\"killroy.newg.as\"},\"service\":\"https://killroy.sea.newg.as:10002\"},{\"hostname\":\"13ft.newg.as\",\"originRequest\":{},\"service\":\"http://killroy.sea.newg.as:5005\"},{\"hostname\":\"homeassistant-mtls.newg.as\",\"originRequest\":{},\"service\":\"https://homeassistant.sea.newg.as\"},{\"service\":\"http_status:404\"}],\"warp-routing\":{\"enabled\":false}}" version=44
2024-01-09T19:04:03Z INF Registered tunnel connection connIndex=2 connection=27febaae-a59f-4eca-8ce6-a1eb6d40262f event=0 ip=198.41.192.167 location=lax07 protocol=quic
2024-01-09T19:04:03Z INF Registered tunnel connection connIndex=3 connection=24622c06-155d-4e50-bbea-66d4862c6926 event=0 ip=198.41.200.53 location=sea01 protocol=quic

/var/log/synopkg.log.1.xz (snippet):

2024/01/09 09:51:17 (system) trigger cloudflared 2023.7.1-10 Begin start-stop-status start
2024/01/09 09:51:18 (system) trigger cloudflared 2023.7.1-10 End start-stop-status start ret=[0]

/var/log/synopkg.log:

2024/01/09 11:03:59 start cloudflared: begin to stop due to abnormal status
2024/01/09 11:03:59 start cloudflared: begin to stop version 2023.7.1-10
2024/01/09 11:03:59 start cloudflared 2023.7.1-10 Begin start-stop-status stop
2024/01/09 11:03:59 start cloudflared 2023.7.1-10 End start-stop-status stop ret=[0]
2024/01/09 11:04:01 start cloudflared: stop version 2023.7.1-10 successfully, result 0
2024/01/09 11:04:01 start cloudflared: begin to start version 2023.7.1-10
2024/01/09 11:04:01 start cloudflared 2023.7.1-10 Begin start-stop-status start
2024/01/09 11:04:01 start cloudflared 2023.7.1-10 End start-stop-status start ret=[0]
2024/01/09 11:04:02 start cloudflared: start version 2023.7.1-10 successfully, result 0

It looks like there was some attempt to start cloudflared at 9:51. At 11 it looked like it was not started in the package center, and I just clicked Run, but from the logs it looks like that actually terminated and started some kind of "abnormal status". However I haven't found any log with more info.

One possibility is that when it started at 9:51 my router had not come up yet after the power cut and cloudflared was in a bad state due to a failed connection. I find this unlikely as my recollection is that I have had this issue even after rebooting the NAS while my internet stayed up (e.g. on system update).

from spksrc.

davidn avatar davidn commented on August 16, 2024

OK just updated to DSM 7.2.1-69057 Update 3 and rebooted. cloudflared did start correctly. As I can't repro I am closing this issue. If I find out what has been causing this other times, I will open a new more specific bug.

Apologies for the mis-report.

from spksrc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.