Change localhost for confluence

Robert Imhoff July 28, 2014

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

0 votes
Answer accepted
Robert Imhoff July 29, 2014

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 votes
Arley Silveira March 31, 2015

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

0 votes
Chag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

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.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2014

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)

Robert Imhoff July 28, 2014

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2014

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2014

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!

Robert Imhoff July 28, 2014

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?

Robert Imhoff July 28, 2014

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2014

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

Robert Imhoff July 28, 2014

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.

Robert Imhoff July 28, 2014

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.

Robert Imhoff July 28, 2014

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2014

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.

Chag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events