Confluence 4.0 installation fails (Linux)

Sven_Paulus September 19, 2011

Hi,

I'm trying to install Confluence 4.0 using the atlassian-confluence-4.0-x64.bin linux installer executable.

However I can't get past the question about the port numbers to be used. Every port number I define for the control port gets rejected for being in use, even if they aren't (I've checked this using "netstat -tlnp"). The error message is:

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
1
The Control port you have chosen appears to be in use. Please choose a different port number.
Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.

If I use "strace -f" on the installer to check the system calls leading to the error message, I get the following output (notice the -1 return value on the last bind(2) call):

30957 read(3, "\312\376\272\276\0\0\0001\0\r\1\0\3()V\1\0\25(Ljava/lang/S"..., 208) = 208
30957 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 23
30957 setsockopt(23, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
30957 bind(23, {sa_family=AF_INET6, sin6_port=htons(8090), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
30957 listen(23, 50)                    = 0
30957 dup2(24, 23)                      = 23
30957 close(23)                         = 0
30957 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 23
30957 setsockopt(23, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
30957 bind(23, {sa_family=AF_INET6, sin6_port=htons(8000), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
30957 listen(23, 50)                    = 0
30957 dup2(24, 23)                      = 23
30957 close(23)                         = 0
30957 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 23
30957 setsockopt(23, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
30957 bind(23, {sa_family=AF_INET6, sin6_port=htons(8000), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
30957 dup2(24, 23)                      = 23
30957 close(23)                         = 0
30957 write(1, "The Control port you have chosen"..., 95) = 95
30957 futex(0x40b5a414, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x40b5a410, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1

Does anyone have ideas how to get around this problem? Any kind of help is greatly appreciated.

Regards,

Sven

9 answers

2 votes
Jens Zastrow March 14, 2012

Seems that the install4j installer or maybe the bundled jre has a problem with ip4/ip6 binds.

Default debian is /etc/sysctl.d/bindv6only.conf

net.ipv6.bindv6only = 1

if its changed to 0 the installer will detect the free ports and can resume.

2 votes
m@
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2011

I can't easily tell what ports you're trying to use from your output, if you are installing Confluence as a non-root user you will need to use a port above 1024 as they are all reserved ports. Its also likely that most of the ports under 1024 are being used.

0 votes
Sascha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2012

Hello,

i got the same error during installation:

The Control port you have chosen appears to be in use.  Please choose a different port number.
Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1], Set custom value for HTTP and Control ports [2, Enter]

So if i choose any port >1024 everytime the installer fails. Do I need to open the firewall first?

I checked netstat -tulpe and there is no application running under port 8000.

Thanks,

Sash

0 votes
michael wojciechowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 21, 2012

Hi,

setting net.ipv6.bindv6only = 0 does not work for me.

I use: Linux u15984723 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux

Both ports (suggested as well as new picked are not used - I checked)

I keep getting:

--- snip ---

root@u15984723:~# ./atlassian-confluence-4.2.3-x64.bin

Unpacking JRE ...

Starting Installer ...

This will install Confluence 4.2.3 on your computer.

OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.

Please choose one of the following:

Express Install (uses default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing Confluence installation [3]

2

Where should Confluence 4.2.3 be installed?

[/opt/atlassian/confluence]

/var/www/confluence

Default location for Confluence data

[/var/atlassian/application-data/confluence]

Configure which ports Confluence will use.

Confluence requires two TCP ports that are not being used by any other

applications on this machine. The HTTP port is where you will access

Confluence through your browser. The Control port is used to Startup and

Shutdown Confluence.

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]

The Control port you have chosen appears to be in use. Please choose a different port number.

Configure which ports Confluence will use.

Confluence requires two TCP ports that are not being used by any other

applications on this machine. The HTTP port is where you will access

Confluence through your browser. The Control port is used to Startup and

Shutdown Confluence.

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]

2

HTTP Port Number

[8090]

8090

Control Port Number

[8000]

8100

The Control port you have chosen appears to be in use. Please choose a different port number.

Configure which ports Confluence will use.

Confluence requires two TCP ports that are not being used by any other

applications on this machine. The HTTP port is where you will access

Confluence through your browser. The Control port is used to Startup and

Shutdown Confluence.

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1], Set custom value for HTTP and Control ports [2, Enter]

--- snap ---

Assistance would be appreciated - thanks,

Mike

0 votes
Jens Zastrow March 15, 2012

Seems that the install4j installer or maybe the bundled jre has a problem with ip4/ip6 binds.

Default debian is /etc/sysctl.d/bindv6only.conf

net.ipv6.bindv6only = 1

if its changed to 0 the installer will detect the free ports and can resume.

0 votes
Jens Zastrow March 14, 2012

I'm facing the same problem with a brand new debian 6 system with any product (confluence, jira 5, etc...)

Maybe some external package is needed to do the port-check?!

The following default options cannot be used. You will be asked to provide alternatives for these options.
* Control Port (In use)

0 votes
Anatoli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2011

When you chose the port numbers installer checks if they are available by trying to bind to the given ports. If it can it assumes the ports are available and proceeds (it cleans up by closing the ports after it checks). If it cannot then it prompts you to chose alternative ports.

It looks like in your case it cannot bind and always asks you for alternative ports. I wander why it talks about "Invalid argument" as it is probably the problem.

bind(23, {sa_family=AF_INET6, sin6_port=htons(8000), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)




Can you please contact support so that we can work out exactly what's happening?

0 votes
Ryan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2011

From the initial output it looks like the ports you have specified (the default ports) are in use - do you have any other webapps or Confluence instances running on this machine?

The Control port you have chosen appears to be in use.

0 votes
Sven_Paulus September 19, 2011

As you can see from the installer log (answer "1") and the strace output (htons() in bind()), I'm trying to use the default ports 8090 and 8000.

Ports below 1024 aren't accepted by the installer:

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
2
HTTP Port Number
[8090]
1023
For security reasons the port number must be above 1023. Please enter a port number in the range from 1024-65536.

Btw this error message is wrong: the maximum allowed port number is 65535 (unsigned 16 bit integer value).

I tried various ports, each port I enter as the "control port" gets rejected.

This is on Debian Linux using the 3.0.0 amd64 kernel.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events