Ask Your Question
0

SAIO does not accept connection other than from 127.0.0.1

asked 2017-02-13 04:17:09 -0500

lviggiani gravatar image

Hi, this is my very first installation of SAIO. I managed to install it on a virtula machine for development by following the instructions provided http://docs.openstack.org/developer/swift/development_saio.html (here) I had to manually install liberasurecode, and now everything works fine and startmain works without any error message.

Also getting a toke works, but only from localhost:

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0

If I try from host machine:

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://192.168.1.5:8080/auth/v1.0

I get:

' http://192.168.1.6:8080/auth/v1.0

  • Trying 192.168.1.6...

  • TCP_NODELAY set

  • connect to 192.168.1.6 port 8080 failed: Connessione rifiutata

  • Failed to connect to 192.168.1.6 port 8080: Connessione rifiutata

  • Closing connection 0 curl: (7) Failed to connect to 192.168.1.6 port

8080: Connessione rifiutata (connection refused)

Please note that networking is properly configured for the virtual machin and the host machine can successfully connect to guest via SSH.

I've searched in configuration files and foud for example /etc/swift/proxy-server.conf reading

[DEFAULT]

bind_ip = 127.0.0.1

bind_port = 8080

workers = 1

So I guess I just need to change some config files but I don't know what and how. Thanks!

EDIT

Ok, I think it was very esay... just commented out #bind_ip = 127.0.0.1 in /etc/swift/proxy-server.conf and restarted. Is that enough in order to call the REST API from another computer?

edit retag flag offensive close merge delete

Comments

Ok, I think it was very esay... just commented out #bind_ip = 127.0.0.1 in /etc/swift/proxy-server.conf and restarted. Is that enough in order to call the REST API from another computer?

lviggiani gravatar imagelviggiani ( 2017-02-13 04:17:21 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-28 11:48:25 -0500

ntata gravatar image

Hello,

You've got to the right place to make appropriate changes. So, proxy server offers the endpoint to the outside world to connect to Swift cluster. By default, proxy-server.conf that ships with SAIO will bind to port 8080 on the loopback interface (127.0.0.1). However, if you want to use any other ethernet interface, say 192.168.1.6 in your case, you need to make the proxy-server bind to the 192.168.1.6 interface and restart the service in order to apply changes.

#make these changes in /etc/swift/proxy-server.conf
[DEFAULT]
bind_ip = 192.168.1.6
bind_port = 8080

NOTE: If you want to make your proxy-server process to listen on all the interfaces i.e. both 127.0.0.1 and 192.168.1.6, bind the process to 0.0.0.0 as below:

#make these changes in /etc/swift/proxy-server.conf
[DEFAULT]
bind_ip = 0.0.0.0
bind_port = 8080

P.S. Remember to restart the service for the changes to take effect. A good read: https://www.howtogeek.com/225487/what-is-the-difference-between-127.0.0.1-and-0.0.0.0/ (https://www.howtogeek.com/225487/what...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-02-13 02:16:35 -0500

Seen: 168 times

Last updated: Feb 13 '17