Pages:
Author

Topic: cgminer "stratum connection to pool 0 interrupted" issue (Read 42412 times)

JBT
full member
Activity: 165
Merit: 100
Also getting lost shares stratum not connecting to pool etc. after checking everything network card internet etc I turned out to be my usb switch  Angry  I plugged the miners into a cheap 10port switch and voila! they al started hashing at full speed accept shares no disconnects  or lost shares
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
There appears to be some bug in the firmware/software/hardware combination that is SP30/31 and static IP addresses. I don't have one so can only offer advice generically, but using DHCP fixes the issue.
sr. member
Activity: 314
Merit: 250
Thank you Con!
Interesting the fact that this only happens with static IP ... its definitively not a Firewall thing ....
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Check your firewall/gateway. It might not like you running a static ip address unless you add it to address reservation.
sr. member
Activity: 314
Merit: 250
Hello, I am running a SP30 and I have this issue .. the miner simple does not mine and is always giving the following messages

Stratum connection to pool 0 interrupted.
Lost X shares due to stratum disconnect on pool 0
Stratum from pool 0 requested work restart

Any ideas?

PS: This behavior is only true if the machine uses a static IP address ... with DHCP it works fine
legendary
Activity: 2576
Merit: 1186
The fork of my miner uses the original stratum code I wrote for cgminer which used libcurl to set up the stratum socket connection. When this problem originally occurred, it would crash in libcurl. After tons of debugging I had so many crashes due to libcurl bugs that I decided to abandon using libcurl and just use raw socket code for all stratum code. That fixed the crashes (on both linux and windows) but on windows for some reason a socket just hangs up and never returns without any meaningful failure that should normally happen instead. That's why this bug manifests in two different ways. Older versions of cgminer would also crash during this interruption if you read back through this thread.  However so many other crashes were fixed by abandoning libcurl that it was worth it. It's worth noting that improvements to this code keep going in and as recently as 3.3.2 another stratum disconnect issue was fixed, so if you're on an older version I highly recommend upgrading to 3.3.4 (the latest).
Actually, the BFGMiner crash (now fixed) was in entirely independent code that never appeared in cgminer.

Nor can cgminer's former crashes be blamed on libcurl.
I found the bug in the stratum code, fixed it, and even offered it to you for cgminer.
You chose to ignore it.
The only reason switching to raw sockets fixed cgminer was because you removed the offending code in the process.

BFGMiner 3.2.0 has the stratum crashes fixed while still using libcurl so it's proxy-friendly.
hero member
Activity: 602
Merit: 500
3.34 has finally fixed this pesky issue?
thanks for all the hard work btw
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
The fork of my miner uses the original stratum code I wrote for cgminer which used libcurl to set up the stratum socket connection. When this problem originally occurred, it would crash in libcurl. After tons of debugging I had so many crashes due to libcurl bugs that I decided to abandon using libcurl and just use raw socket code for all stratum code. That fixed the crashes (on both linux and windows) but on windows for some reason a socket just hangs up and never returns without any meaningful failure that should normally happen instead. That's why this bug manifests in two different ways. Older versions of cgminer would also crash during this interruption if you read back through this thread.  However so many other crashes were fixed by abandoning libcurl that it was worth it. It's worth noting that improvements to this code keep going in and as recently as 3.3.2 another stratum disconnect issue was fixed, so if you're on an older version I highly recommend upgrading to 3.3.4 (the latest).
legendary
Activity: 1344
Merit: 1004
I get this issue too in cgminer, but it occurs differently in bfgminer. Instead of hanging, it causes a miner software crash (it'll just close in latest revision. if debug log is on you will see some hex codes and dll files in the log).

theres definitely something in common between the two that prevent a connection recovery.

Incidentally, if I don't use stratum and I use getwork instead, crashes/hangs never happen and if a connection is interrupted, it recovers gracefully.
member
Activity: 112
Merit: 10
I had a couple of my cgminers go offline with the message "stratum connection to pool 0 interrupted", a third however, which was mining on the same pool did not disconnect and kept running fine. I noticed it an hour later...  Huh

I have a failover set up on another pool, but for some reason that did not kick in on either machine.

Has anyone had this issue come up and have you found any solutions? I thought having a failover set up would have prevented my miners frm shutting down...

Thanks for any advice anyone can offer.

i ran into that kind of problem when rewriting my own pool engine. It appears miners expects "mining.notify" notifications at various minimum intervals before considering a pool as dead, interrupting connection.

for example, cgminer 3.3.3 source code include the following comment:
Quote
/* The protocol specifies that notify messages should be sent
 * every minute so if we fail to receive any for 90 seconds we
 * assume the connection has been dropped and treat this pool
 * as dead */

my rewritten pool now notifies miners at 45 seconds interval (without asking them to discard previous jobs in this case).


If you're running into that "stratum connection to pool xx interrupted" problem, there are chances the chosen pool just waits for new transactions or new blocks before notifying miners.
(i must admit i was first doing the same thing, as i could not see any minimum notification delay in specifications)
hero member
Activity: 546
Merit: 500
I have always had these messages (regularly) for the backup / block detection pools on my computers that solo mine:

Computer 1: Desktop PC, Vista 64 bit, 4x GPU, cgminer 3.3.0
Computer 2: Samsung Netbook, Win 7 32 bit, Block erupter USB's, cgminer 3.1.1

Each with:
3 stratum pools URLs,
1 LP pool URL

I have always assumed the errors were related to high network traffic or the fact all the pools have 250+ ms pings (because of my location). Cgminer never crashes or hangs though..
erk
hero member
Activity: 826
Merit: 500
I am also getting the "stratum connection to pool 0 interrupted" hang issue with 3.3.1 and windows 7

Have to close the command window and start a fresh one.


hero member
Activity: 588
Merit: 500
Today It seems I got connectivity problems with long poll. At least when I came home I've noticed there is something about no connection and caching the results. And cgminer wasn't hashing for several hours.

I did not set backup pool, so maybe thus cgminer wasn't able to recover.

Something is wrong with cgminer not recovering still.
member
Activity: 102
Merit: 10
I completely missed that option.  I am setting it now and hope that works.
full member
Activity: 154
Merit: 100
What sucks is that cgwatcher doesn't catch this.  Often I will head to bed at like 1am and wake up in the morning to see that the last activity in cgminer is interrupted at 1:45am. 

Have you tried the 'restart cgminer if shares haven't changed in 10 minutes'?  Works for me--at least in the context you've described, at a high level.  Good luck...

Same problem and same solution as you.

Using cgminer 3.3.1 on Windows 7 x64. "Lost xx shares due to stratum disconnect" and cgminer never recovers from it. Note, that only happens sometimes, at other times it will go to the failover pool.

Cgwatcher fails at monitoring the drop in hash rate (the cgminer window still shows the last value before the disconnect), however "restart cgminer if shares haven't changed in x minutes" works just fine.
member
Activity: 87
Merit: 10
What sucks is that cgwatcher doesn't catch this.  Often I will head to bed at like 1am and wake up in the morning to see that the last activity in cgminer is interrupted at 1:45am. 

Have you tried the 'restart cgminer if shares haven't changed in 10 minutes'?  Works for me--at least in the context you've described, at a high level.  Good luck...
member
Activity: 102
Merit: 10
What sucks is that cgwatcher doesn't catch this.  Often I will head to bed at like 1am and wake up in the morning to see that the last activity in cgminer is interrupted at 1:45am.  You can still ping it, you can still vnc into it.  Not sure how I can detect there is a problem other than a managed pool that emails you when it hasn't received shares in awhile.
member
Activity: 87
Merit: 10
It happens to me sometimes with rigs on the same network. It will say "... interrupted" and never reconnect but other miners are fine and never disconnected in the first place so the pool isn't the issue. Sometimes it reconnects but lately it hasn't.

Good summary of what I'm experiencing.  I'd only add that two win7 rigs on the same hub as a linux rig, the win7s puke often.  The linux rig is a rock. 
member
Activity: 60
Merit: 10
It happens to me sometimes with rigs on the same network. It will say "... interrupted" and never reconnect but other miners are fine and never disconnected in the first place so the pool isn't the issue. Sometimes it reconnects but lately it hasn't.

Trying to figure out how to get around this atm...
member
Activity: 87
Merit: 10
I haven't found cgminer dead in the water for some time now, but cgwatcher has restarted one rig a couple times a day due to 'no new shares submitted for x minutes'.  I can't say if that's stratum interrupt, or some other issue, but I don't care with cgwatcher babysitting.

Thanks for the updated software, ck!
Pages:
Jump to: