Change localhost for confluence

I am installing confluence on a CentOS 7 vm in VM Fusion. I cannot test "localhost:8090" since there is no browser on the VM. How do I edit server.xml to allow for connection from a different computer for initial setup?

4 answers

1 accepted

Adding "-Djava.net.preferIPv4Stack=true" to the end of the first Java prefix line in %install%/bin/setenv.sh fixed this issue in combo with "iptables -F" which flushed the local fw rules. I will need to add rule for after reboot. Thank you for the help!

0 vote

You don't. Server.xml is only telling it what port to listen on. How other computers get to that port is up to your network.

localhost is always "this computer". Your VM has another IP address it exposes to your network, so replacing localhost with that IP address means "go to that VM". You can then use DNS to give it a name. All you need to do is tack :8090 to the end of the ip or name to get to Confluence. ( I suspect you're already accessing it with something like "ssh Robert@ourserver.ournetwork" - try browsing to http://ourserver.ournetwork:8090)

When I do http://ip:8090I get "no data recieved" from my chrome browser. When I do netstat -an | grep 8090, it only displays 127.0.0.1:8090 in the list, not *:8090 or ip:8090

That doesn't sound like a server error. Could you try a different browser? (Or even just chrome in private browsing mode)

Ah, ok, it's using IPv6. I half-answered that on your other question (sorry - I didn't realise it was the same person!).

I say half because all I've got there is a workaround - you'll be able to use CentOS 7, forced to use IPv4 (actually, just the Tomcat running Confluence will use it). But Confluence ought to work on IPv6 and I don't know why it messes up like this. Oddly, I got a different error, but I suspect it was compounded with SSL, so I was getting better error messages!

tried on Chrome private, firefox and safari. No dice.

I can ssh to box, that is fine.

I do look carefully at netstat -an | grep LIST and see that it is:

tcp6 0 0 :::8090 :::* LISTEN

Not sure how to make CentOS 7 force it to regular ipv4. Should I just dump CentOS 7 and go back to 6?

CentOS 7 defaults to IPv6 not IPv4 on install of Confluence. Unable to get to work with IPv4. If you know how to force IPv4, that will be a first step before moving forward with installation on CentOS 7.

The flag I mentioned on your other question will solve it.

I am unsure how to force CentOS 7 to make this use ipv4 only (tried doing the system.disable_ipv6 thing, which did not work).

I will just use CentOS 6 for this project.

Adding "-Djava.net.preferIPv4Stack=true" to the end of the first Java prefix line in %install%/conf/setenv.sh fixed this issue for not listening on ipv4. However, the page still does not load from another host.

I can connect on localhost now, but still cannot get the server to respond from another host.

$ netstat -na | grep LIST

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

tcp6 0 0 ::1:25 :::* LISTEN

tcp6 0 0 :::22 :::* LISTEN

$ nc 127.0.0.1 8090

GET / HTTP/1.0

HTTP/1.1 302 Found

Server: Apache-Coyote/1.1

X-Confluence-Request-Time: 1406655181924

Location: http://localhost:8090/bootstrap/selectsetupstep.action

Content-Type: text/html;charset=UTF-8

Content-Length: 0

Date: Tue, 29 Jul 2014 17:33:01 GMT

Connection: close

The fact you're getting the setup location means there's somethign useful coming back from the server. That implies your network is blocking the next response, or your browser isn't getting it.

you mentioned you are using VM fusion correct? are you using a regular IP with the HOST's IP? or using NAT? if using NAT make sure you are forwanding ports

you mentioned you are using VM fusion correct? are you using a regular IP with the HOST's IP? or using NAT? if using NAT make sure you are forwanding ports.

HAving pretty much the same issue...ne1 got this working?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

253 views 11 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you