Giter Club home page Giter Club logo

Comments (7)

manprint avatar manprint commented on June 14, 2024

I've turned on debugging. I am attaching additional log files with debugging and sish server configurations

debug_log.txt

debug_log_1.txt

start_sish_script.txt

apache2_config.txt

I hope they can be useful to you

Thanks.

from sish.

manprint avatar manprint commented on June 14, 2024

Hi Antonio,

I was able to reproduce the case where this error occurs.

Panic error occurs when accessing files in webdav server

In particular, when I access some file (for example "griffin1x01.mp4" (PS: I like griffins :D )) the error is shown in the logs.

I am attaching the complete log file with all the calls that are made to the server.

issue_full_log.txt

If you want me to test the fix, publish the docker image with it.
I'll be happy to check it out.

Thank you.
Fabio

from sish.

antoniomika avatar antoniomika commented on June 14, 2024

Hey @manprint,

Does this actually cause an issue for you? Kinda looks like a delayed error that shouldn't really cause a problem.

Best,

from sish.

manprint avatar manprint commented on June 14, 2024

Hi @antoniomika
Thanks for the reply!!!

Functionally the error doesn't cause me problems. Sish works fine!

I'll explain why I opened the issue.

My team works a lot with small video clips and we use webdav servers. Sish helps us a lot to do tests.
I noticed that over time the system logs (normal, not debugged) grew in size very quickly. Looking at the logs I found the error repeated countless times working with these video files.
While doing some tests (with griffin file :D) I saw that it happens when these video files are accessed via webdav via sish. Thats all.

Maybe something could be done to catch the error and show a warning instead of the whole error panic stack?
So the logs are cleaner.

What do you think about it?

Thanks.
Fabio

from sish.

antoniomika avatar antoniomika commented on June 14, 2024

I appreciate it! I think the issue is a context deadline is being hit when streaming the data.

Did you try disabling idle connection checking (i.e. --idle-connection=false)?

Essentially, this sets the connection timeout for reads/writes. My guess is that's actually prematurely killing HTTP streaming connections.

Try it out and let me know!

from sish.

manprint avatar manprint commented on June 14, 2024

Hi @antoniomika
As always, thanks for the reply.

I tried with version 2.9.2 with the following run:

docker run -itd --name sish \
        -v $(pwd)/keys:/keys \
        -v $(pwd)/pubkeys:/pubkeys \
        --restart=always \
        -p 2222:2222 \
        -p 4443:4443 \
        -p 8765:80 \
        --log-driver=json-file \
        --log-opt max-size=5m \
        --log-opt max-file=2 \
        --log-opt compress=true \
        antoniomika/sish:v2.9.2 \
        --ssh-address=:2222 \
        --http-address=:80 \
        --https=true \
        --authentication-keys-directory=/pubkeys \
        --private-keys-directory=/keys \
        --tcp-aliases \
        --bind-random-aliases=false \
        --bind-random-ports=false \
        --bind-random-subdomains=false \
        --authentication-password= \
        --domain=apps.internaltest.tk \
        --idle-connection=false \
        --admin-console \
        --admin-console-token=mysecrettoken \
        --verify-ssl=false \
        --service-console-max-content-length=0

Unfortunately with the --idle-connection=false option the error is still there.

I saw the line of code that gives the error. It is an error generated in the go reverseproxy library (reverseproxy.go:363).
It's not a sish issue.

err = p.copyResponse(rw, res.Body, p.flushInterval(res))
	if err != nil {
		defer res.Body.Close()
		// Since we're streaming the response, if we run into an error all we can do
		// is abort the request. Issue 23643: ReverseProxy should use ErrAbortHandler
		// on read error while copying body.
		if !shouldPanicOnCopyError(req) {
			p.logf("suppressing panic for copyResponse error in test; copy error: %v", err)
			return
		}
		panic(http.ErrAbortHandler)
	}
	res.Body.Close() // close now, instead of defer, to populate res.Trailer

At this point, since for me the error is not blocking, if you believe that in other use cases it does not generate problems, you can close the issue.

For the issue of growing logs, I can safely put limits like --log-opt max-size=5m in the docker run.

Thank you so much and I wish you a merry Christmas.

Best,
Fabio

from sish.

antoniomika avatar antoniomika commented on June 14, 2024

Appreciate it @manprint! Gonna close for now as it's not a blocking issue. If we starting having more problems with it, we can look into it again.

Merry christmas and happy holidays as well!

from sish.

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.