<p>Most likely, you'll have to open that port on your EC2 instance.</p>

CC BY-SA 3.0
2015-12-13T08:43:43.690Z
I changed the Security Group HTTO 80. However, it returned error. How should I do?

http://stackoverflow.com/questions/5004159/opening-port-80-ec2-amazon-web-services/10454688#10454688
Toshi
CC BY-SA 3.0
2015-12-12T16:47:33.507Z
2015-12-12T16:47:33.507Z
Jimmy Song
<p>I'd like to access bitocind mainnet node on AWS EC2 from ruby. I've written as follows using <a href="https://github.com/jjeffus/rpcjson" rel="nofollow">rpcjson</a>, however it cannot connect, then returned the error </p>

<pre><code>client = RPC::JSON::Client.new 'http://rpcuser:rpcpassword@publicIP:8332', 1.1
</code></pre>

<p><strong>Operation timed out - connect(2) for publicIP port 8332</strong></p>

<p>publicIP is the Public IP shown on EC2 instance page.</p>

<p>On the other hand, when I wrote as follows in order to connect localhost testnet node, it has no problem.</p>

<pre><code>client = RPC::JSON::Client.new 'http://rpcuser:rpcpassword@127.0.0.1:8332', 1.1
</code></pre>

<p>Could you tell me what is the problem? </p>

<bitcoind><client><ruby>
How to connect bitcoind mainnet node on AWS EC2 by using rpcjson?
Toshi
# How to connect bitcoind mainnet node on AWS EC2 by using rpcjson?

(Asked by: username_0 on 2015-12-12)

I'd like to access bitocind mainnet node on AWS EC2 from ruby. I've written as follows using [rpcjson](https://github.com/jjeffus/rpcjson), however it cannot connect, then returned the error

```
client = RPC::JSON::Client.new 'http://rpcuser:rpcpassword@publicIP:8332', 1.1

```

**Operation timed out - connect(2) for publicIP port 8332**

publicIP is the Public IP shown on EC2 instance page.

On the other hand, when I wrote as follows in order to connect localhost testnet node, it has no problem.

```
client = RPC::JSON::Client.new 'http://rpcuser:rpcpassword@127.0.0.1:8332', 1.1

```

Could you tell me what is the problem?

**Tags:** bitcoind, client, ruby


---

## 1 answers

### Answer by username_1 on 2015-12-12. Score: 2 | Accepted answer

Most likely, you'll have to open that port on your EC2 instance.

> **Comments:**
> **username_0**: I changed the Security Group HTTO 80. However, it returned error. How should I do?  http://stackoverflow.com/questions/5004159/opening-port-80-ec2-amazon-web-services/10454688#10454688  

---

