<p>When you run the miner, you should specify the port 8332 (instead of 3333 or 8333 as in the above posts).</p>

<pre><code>minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD
</code></pre>

<p>becomes</p>

<pre><code>minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:8332 -O USERNAME.1:PASSWORD
</code></pre>

<p>When using 3333, your proxy believes that your miner asks work using the stratum protocol but your miner asks for it using the getwork protocol ==> it needs to speak to the proxy on the 8332 port.</p>

<blockquote>
  <p>minerd -a scrypt -o 127.0.0.1:8333 -O nybbler905.1:x<br />
  minerd -a scrypt -o 127.0.0.1:8332 -O nybbler905.1:x</p>
</blockquote>

<p>That was just a typo as the comment is correct:</p>

<blockquote>
  <p>Port 8332 ( local ) is...</p>
</blockquote>

<p>I don't know if you have to put http:// or not</p>

CC BY-SA 3.0
2013-08-16T20:17:06.777Z
Hi ServeV, welcome to StackExchange. I've tried to clarify your post. I couldn't understand what you meant by `That was just a typo`. Could you clarify?
Nick ODell
CC BY-SA 3.0
2013-08-15T19:18:52.813Z
2013-08-16T20:15:06.550Z
2013-08-16T20:15:06.550Z
SergeV
<p>I use 2 .sh files from teh desktop, one for the proxy to start for Burnside's pool, the other to start the miner.  The basic command is this one line ( as it runs in terminal in Ubuntu 12.04 ) after using CD ( directory ) to get to where I unpacked the proxy.</p>

<pre><code>./mining_proxy.py -o ltc-stratum.kattare.com -p 3333
</code></pre>

<p>The next .SH file also used cd .... to get to where I unpaced my miner, teh minerd command is as follows </p>

<pre><code>minerd -a scrypt -o 127.0.0.1:8333 -O nybbler905.1:x
</code></pre>

<p>Port 8332 ( local ) is <strong>getwork unless otherwise set for the proxy</strong>.  The other errors are related to not fully installing python and then the proxy.</p>

<pre><code> sudo python setup.py install
./mining_proxy.py --help
</code></pre>

<p>If you do not get the help info, look in to re-re-re-installing python and the proxy.</p>

CC BY-SA 3.0
2013-07-25T01:52:20.200Z
2014-09-20T03:30:05.200Z
2014-09-20T03:30:05.200Z
nybbler905
<p>I'm attempting to run stratum-mining-proxy with minerd. Proxy starts and runs with the following command:</p>

<pre><code>python ./mining_proxy.py -o ltc-stratum.kattare.com -p 3333 -pa scrypt
</code></pre>

<p>Proxy starts fine. Run Minerd (U/P removed):</p>

<pre><code>minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD
</code></pre>

<p>Following errors are received. This one from the proxy:</p>

<pre><code>2013-07-18 01:33:59,981 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1
</code></pre>

<p>And this from minerd. What am I doing wrong? Any help is appreciated!</p>

<pre><code>[2013-07-18 01:33:59] HTTP request failed: Empty reply from server
[2013-07-18 01:33:59] json_rpc_call failed, retry after 30 seconds
</code></pre>

<miner-configuration><stratum><proxy>
Stratum Mining Proxy - Error decoding message on startup
Dustin
# Stratum Mining Proxy - Error decoding message on startup

(Asked by: username_0 on 2013-07-18)

I'm attempting to run stratum-mining-proxy with minerd. Proxy starts and runs with the following command:

```
python ./mining_proxy.py -o ltc-stratum.kattare.com -p 3333 -pa scrypt

```

Proxy starts fine. Run Minerd (U/P removed):

```
minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD

```

Following errors are received. This one from the proxy:

```
2013-07-18 01:33:59,981 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1

```

And this from minerd. What am I doing wrong? Any help is appreciated!

```
[2013-07-18 01:33:59] HTTP request failed: Empty reply from server
[2013-07-18 01:33:59] json_rpc_call failed, retry after 30 seconds

```

**Tags:** miner-configuration, stratum, proxy


---

## 2 answers

### Answer by username_1 on 2013-08-15. Score: 0 | Accepted answer

When you run the miner, you should specify the port 8332 (instead of 3333 or 8333 as in the above posts).

```
minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD

```

becomes

```
minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:8332 -O USERNAME.1:PASSWORD

```

When using 3333, your proxy believes that your miner asks work using the stratum protocol but your miner asks for it using the getwork protocol ==> it needs to speak to the proxy on the 8332 port.

> minerd -a scrypt -o 127.0.0.1:8333 -O username_3.1:x  
> minerd -a scrypt -o 127.0.0.1:8332 -O username_3.1:x

That was just a typo as the comment is correct:

> Port 8332 ( local ) is...

I don't know if you have to put http:// or not

> **Comments:**
> **username_2**: Hi ServeV, welcome to StackExchange. I've tried to clarify your post. I couldn't understand what you meant by `That was just a typo`. Could you clarify?  

---

### Answer by username_3 on 2013-07-25. Score: 0

I use 2 .sh files from teh desktop, one for the proxy to start for Burnside's pool, the other to start the miner. The basic command is this one line ( as it runs in terminal in Ubuntu 12.04 ) after using CD ( directory ) to get to where I unpacked the proxy.

```
./mining_proxy.py -o ltc-stratum.kattare.com -p 3333

```

The next .SH file also used cd .... to get to where I unpaced my miner, teh minerd command is as follows

```
minerd -a scrypt -o 127.0.0.1:8333 -O username_3.1:x

```

Port 8332 ( local ) is **getwork unless otherwise set for the proxy**. The other errors are related to not fully installing python and then the proxy.

```
 sudo python setup.py install
./mining_proxy.py --help

```

If you do not get the help info, look in to re-re-re-installing python and the proxy.


---

