2011-02-10 88 views
1

我正在EC2上運行Amazon Linux映像。但是,當啓動我的扭曲服務器時,我無法打開端口443。無法偵聽EC2上的https端口443(Amazon Linux)

我創建了一個安全組,並驗證了該實例使用的是允許HTTPS通信的實例。 (HTTPS tcp 443 443 0.0.0.0/0)。

這裏是輸出:

ERROR:root:Exception launching the json rpc server 
Traceback (most recent call last): 
    File "start_ipns_proxy.py", line 27, in launch_json_rpc 
    RPC_SSL_CERTIFICATE_FILE)) 
    File "/home/ec2-user/ipns_proxy/push_notify/twisted/internet/posixbase.py", line 444, in listenSSL 
    p.startListening() 
    File "/home/ec2-user/ipns_proxy/push_notify/twisted/internet/tcp.py", line 857, in startListening 
    raise CannotListenError, (self.interface, self.port, le) 
CannotListenError: Couldn't listen on any:443: [Errno 13] Permission denied. 

這是工作在我的本地盒就好了,當我更改端口80我仍然有問題(HTTP也是在我的安全組)。我也重新啓動了實例,但沒有運氣。

編輯:

Here is my netstat output 
[[email protected] push_notify]$ sudo netstat -nupt -l 
Active Internet connections (only servers) 
Proto Recv-Q Send-Q Local Address    Foreign Address    State  PID/Program name 
tcp  0  0 0.0.0.0:22     0.0.0.0:*     LISTEN  1559/sshd   
tcp  0  0 127.0.0.1:25    0.0.0.0:*     LISTEN  1592/sendmail: acce 
udp  0  0 0.0.0.0:68     0.0.0.0:*        1428/dhclient  
udp  0  0 10.220.29.22:123   0.0.0.0:*        1572/ntpd   
udp  0  0 127.0.0.1:123    0.0.0.0:*        1572/ntpd   
udp  0  0 0.0.0.0:123     0.0.0.0:*        1572/ntpd 

回答

1

您可能正在運行使用低於1024的端口的程序。 嘗試使用root或sudo運行程序。

+0

另一個極好的選擇是authbind。 – 2011-02-10 13:42:09

0

你有機器已經在443端口監聽另一臺服務器?這聽起來像是這個端口被另一個進程打開,所以你的進程無法訪問它。

+0

我不認爲這是問題,我已經包括我的netstat輸出上面。 – 1337Rooster 2011-02-10 02:56:46