MySql backup + Sharetribe GO install

I installed MySQL and imported a backup of my marketplace. I then installed Sharetribe and all of its dependencies. I am able to start the application and see a connection when I query the database

STARTUP

[@cent7-as-web-01 sharetribe]$ bundle exec rails server -e development
=> Booting WEBrick
=> Rails 5.1.6.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
[2019-07-16 19:42:50] INFO WEBrick 1.3.1
[2019-07-16 19:42:50] INFO ruby 2.3.4 (2017-03-30) [x86_64-linux]
[2019-07-16 19:42:50] INFO WEBrick::HTTPServer#start: pid=9005 port=3000

But, I receive a connection refused when connecting with web browser or curl on a remote system.

  > curl 192.168.1.4:3000
  curl: (7) Failed to connect to 192.168.1.4 port 3000: Connection refused

I can not telnet to port 3000 from a remote system

~> telnet 192.168.1.4 3000    
Trying 192.168.1.4...
telnet: connect to address 192.168.1.4: Connection refused
telnet: Unable to connect to remote host

Attempt locally from sharetribe server works

[root@cent7-as-web-01 ~] telnet localhost 3000   
Trying ::1...
Connected to localhost.
Escape character is '^]'.

My firewall is disabled

[root@cent7-as-web-01 ~]# firewall-cmd --state
not running

Curl from local server returns “you are being redirected”

[root@cent7-as-web-01 ~]# curl localhost:3000
<html><body>You are being 
<ahref="http://www.airsoftsmugglers.com:3000/">redirected</a>.</body></html>

Does anyone know what the issue is?

You are running the server in Dev mode so the server listens only on loopback interface (127.0.0.1)
Either make the server to listen on all interfaces ( or any non-loopback interface)
Or setup a reverse proxy

@kaleem

Would running in another mode also resolve the issue? Can you point me to instructions for workaround?

use following command to run in production mode

bundle exec rails server -e production

Its all wrong, @David, you need to update your localhost database.

p = Community.where(domain: “www.airsoftsmugglers.com”)
p.domain = “localhost”
p.save

Thanks

@vivekraj
I executed “grep -iRl ‘Comunity.where’ *” to search code and locate string in your comment above. but do not find line which include ‘domain’. Is there a specific file I need to edit?

Can i make this change to ‘domain’ field of ‘communities’ table in the MySQL database?

mysql> select domain from communities;
+--------------------------+
| domain                   |
+--------------------------+
| www.airsoftsmugglers.com |
+--------------------------+
1 row in set (0.00 sec)