soachishti / moss.py

Python client for Moss: A System for Detecting Software Similarity
MIT License
381 stars 75 forks source link

moss connection errors #9

Closed barry closed 6 years ago

barry commented 6 years ago

Hi,

I am having trouble using MOSS. I am a new MOSS and mosspy user.

When I run the original Perl script, I get the line: Query submitted. Waiting for the server's response. and then nothing else happens.

When I try to run my mosspy script on Linux, I get the following error at the line url = m.send(): ConnectionResetError: [Errno 104] Connection reset by peer

When I run the same mosspy script on Windows, I get the following error at the line url = m.send(): TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

In all cases I am using my own userid, which I get from the MOSS perl script that was emailed me.

Any idea what might be going wrong?

Many thanks,

Barry.

soachishti commented 6 years ago

Can you access moss.stanford.edu from your machine? It looks like a connectivity or internet issue.

barry commented 6 years ago

Many thanks for the advice. Yes, I can connect to moss.stanford.edu in my browser; it redirects to https://theory.stanford.edu/~aiken/moss/.

Including urllib.request.urlretrieve ('http://moss.stanford.edu', 'TMP.HTML') in my mosspy script also retrieves the expected HTML content.

Barry.

soachishti commented 6 years ago

Can you ensure that you can access moss.stanford.edu at port 7690 and you have allowed the incoming connection? It looks like moss is unable to make connections back to you...

barry commented 6 years ago

Looks ok?

barry@ubuntu:~/Documents$ nc -v -u -z -w 30 moss.stanford.edu 7690
Connection to moss.stanford.edu 7690 port [udp/*] succeeded!

I will try on my home machine and see if the issue persists there.

Many thanks for your help.

soachishti commented 6 years ago

Do let us know if it works there.

barry commented 6 years ago

It works at home so it was a local network issue. Many thanks for all your help.

soachishti commented 6 years ago

Great! Thanks for the update.

sethiadivyadtu commented 4 years ago

Please help. nc -v -u -z -w 30 moss.stanford.edu 7690 is open. What to do? Was working for sometime and then suddenly unable to get server response

soachishti commented 4 years ago

Please help. nc -v -u -z -w 30 moss.stanford.edu 7690 is open. What to do? Was working for sometime and then suddenly unable to get server response

Working fine from my end, please try again on different network and verify that your ISP or system isn't blocking moss.stanford.edu port.

delrocco commented 3 years ago

There's definitely some issues server side, that I suspect (without having any knowledge of their setup at all) is due to server load. Some evenings or "peak times" both submissions and responses are delayed, if not timed out. Other times no issues at all. I'm not complaining, just sharing information. I've used MOSS for many years, and I am very thankful for the project and the people still running it. It has been invaluable over the years.

On my end, there are no port issues. I can run a job and it works great, then a few hours later it gets hung at either "OK" or "Waiting for the server's response." For example, just 1 hour ago, I ran a large job, and it never went through at all; it hung at "OK". Then about 2 minutes ago I ran a tiny 2 file job, which went through after minor delay and gave me a response. Then I ran the big job again, and all files were submitted, but it "hung" or eventually timed out at "Waiting for the server's response." So I just ran the job again, and after long delay, everything went through including returned response, which I've checked and it looks fine.

Perhaps the more popular it's become over the years (maybe even this year) there has been an increase in traffic? Are you guys seeing that server side? Is the hardware it's running on able to keep up with peak load traffic?

soachishti commented 3 years ago

@delrocco This issue is quiet prompt these days (recent discussion #32). Also, this issue is broadcasted in Update section of https://theory.stanford.edu/~aiken/moss/.

delrocco commented 3 years ago

Thank you. Ah sorry, I didn't realize it's been an issue since April.

Do you guys have fund for donation campaign? I understand it's under an academic funding setup. Is there enough funding to keep it running swell? Is there anything against posting a donation button that leads to an account that can be used to purchase/allocate/use more/better hardware? Can we buy a shirt? lol

I love MOSS :)

soachishti commented 3 years ago

I am not directly affiliated. Prof would know better, he is available at aiken@cs.stanford.edu

RupaSiddana commented 3 years ago

import mosspy

userid = 987654321

m = mosspy.Moss(userid, "python")

m.addBaseFile("MOSS/moss.py-1.0.8/submission/a01.py") m.addBaseFile("MOSS/moss.py-1.0.8/submission/test_student.py")

Submission Files

m.addFile("MOSS/moss.py-1.0.8/submission/a01-sample.py") m.addFilesByWildcard("MOSS/moss.py-1.0.8/submission/a01-*.py")

url = m.send()

print ("Report URL: " + url)

Save report file

m.saveWebPage(url, "MOSS/moss.py-1.0.8/submission/report.html")

mosspy.download_report(url, "submission/report/", connections=8, log_level=10) # logging.DEBUG (20 to disable)

iam getting error please help me:

Report URL: Traceback (most recent call last): File "/home/ib-developer/Desktop/Roopa/Data_Analytics_utils/MOSS/moss.py-1.0.8/moss_usage.py", line 20, in m.saveWebPage(url, "MOSS/moss.py-1.0.8/submission/report.html") File "/home/ib-developer/Desktop/Roopa/Data_Analytics_utils/MOSS/moss.py-1.0.8/mosspy/moss.py", line 144, in saveWebPage raise Exception("Empty url supplied") Exception: Empty url supplied


2. **What should i pass as url**
3. How it works?
4. what are base files?
5. whar are submision files?
soachishti commented 3 years ago

@RupaSiddana Please ask your questions in a separate issue.

nsksai6 commented 3 years ago

Showing the same error connection refused. I am also unable to open moss.stanford.edu website. Any help would be appreciated :)

soachishti commented 3 years ago

@Siva123495 There seems to be an issue, I am also unable to access the website at http://moss.stanford.edu/. May be it's down for maintenance let wait for some time.

Shubham-Kumar-2000 commented 3 years ago

Hi I am also facing the same issue. http://moss.stanford.edu/ refused to connect.

It had been more than 12hrs bt there has been no update in https://theory.stanford.edu/~aiken/moss/ Any help would be appreciated :)

soachishti commented 3 years ago

@Shubham-Kumar-2000 For latest server status you can reach out to Prof's email given on this site.

http://theory.stanford.edu/~aiken/index.html