Connection Refused
Problem
The Manta Server URL returns a Connection Refused error both for access via the browser and in Manta Client.
Solution
This general error means that the server isn't accessible. There can be several reasons for this. Please see the checklist below.
This checklist applies when Apache Tomcat is used as the application container.
The Tomcat Process Isn't Running
-
Windows
- Check the process or service in the task manager.
-
Unix
-
Command:
ps -ef | grep $MANTA_SERVER_HOME | grep java
-
Output should be something like:
tfechtn+ 2071 1 19 14:26 pts/0 00:00:22 /home/tfechtner/java/jre1.7.0_80/bin/java -Djava.util.logging.config.file=/home/tfechtner/manta/server/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx4G -Djava.endorsed.dirs=/home/tfechtner/manta/server/endorsed -classpath /home/tfechtner/manta/server/bin/bootstrap.
jar:/home/tfechtner/manta/server/bin/tomcat-juli.jar-Dcatalina.base=/home/tfechtner/manta/server -Dcatalina.home=/home/tfechtner/manta/server -
Djava.io.tmpdir=/home/tfechtner/manta/server/temp org.apache.catalina.startup.Bootstrap start
-
Tomcat Started with Errors
- Open the log file
<MANTA_DIR_SERVER>/logs/catalina.rrrr-mm-dd.log
. -
There shouldn't be any error messages, especially not anything like:
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java.net.BindException: Address already in use: JVM_Bind <null>:8080
-
This specific error indicates that the port is occupied by another application.
- The last log records should be something like:
catalina.rrrr-mm-dd.log
XI 29, 2016 2:39:32 ODP. org.apache.catalina.startup.Catalina start
INFO: Server startup in 11261 ms
The Manta Application Is Not Deployed on Tomcat
- Open the log file
<MANTA_DIR_SERVER>/logs/catalina.rrrr-mm-dd.log
. - There should be log records similar to:
catalina.rrrr-mm-dd.log
XI 29, 2016 2:39:21 ODP. org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat\webapps\manta-dataflow-server.war
XI 29, 2016 2:39:26 ODP. org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
XI 29, 2016 2:39:31 ODP. org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive C:\apache-tomcat\webapps\manta-dataflow-server.war has finished in 10,849 ms
Tomcat Is Not Listening on the Requested IP Version
-
Find out what process ID is being used:
ps -ef | grep $MANTA_SERVER_HOME | grep java
. -
Run the command
netstat -tulpen
. -
netstat -tulpen
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 16002 - tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 17649 - tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 994 15249 - tcp6 0 0 :::8080 :::* LISTEN 1002 3439937 2071/java tcp6 0 0 ::1:25 :::* LISTEN 0 17650 - tcp6 0 0 :::5666 :::* LISTEN 994 15250 - tcp6 0 0 127.0.0.1:8005 :::* LISTEN 1002 3439998 2071/java tcp6 0 0 :::8009 :::* LISTEN 1002 3439938 2071/java udp 0 0 0.0.0.0:123 0.0.0.0:* 996 13548 - udp 0 0 127.0.0.1:323 0.0.0.0:* 996 13546 - udp6 0 0 ::1:323 :::* 996 13547 -
-
Line 6 says that Tomcat (in this case PID 2071) is listening on port 8080 via TCP IPv6.
-
If you need to access Manta over IPv4, continue with the following steps.
-
Create or edit the file
<MANTA_DIR_SERVER>/bin/setenv.sh
. -
Add the row
export CATALINA_OPTS="$CATALINA_OPTS -
Djava.net.preferIPv4Stack=true"
. -
Restart the server.
-
The output of the command
netstat -tulpen
should look like this. -
netstat -tulpen
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1002 3444068 2452/java tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 16002 - tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 17649 - tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 994 15249 - tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 1002 3444069 2452/java tcp6 0 0 ::1:25 :::* LISTEN 0 17650 - tcp6 0 0 :::5666 :::* LISTEN 994 15250 - udp 0 0 0.0.0.0:123 0.0.0.0:* 996 13548 - udp 0 0 127.0.0.1:323 0.0.0.0:* 996 13546 - udp6 0 0 ::1:323 :::* 996 13547 -
A Firewall Is Blocking the Specific Port
-
Check accessibility from the machine where Manta is installed.
-
wget <MANTA-URL>
-
The correct output is:
Correct output
--2016-11-29 15:13:46-- http://localhost:8080/manta-dataflow-server Resolving localhost (localhost)... ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:8080... failed: Connection refused. Connecting to localhost (localhost)|127.0.0.1|:8080... connected. HTTP request sent, awaiting response... 302 Found Location: http://localhost:8080/manta-dataflow-server/ [following] --2016-11-29 15:13:46-- http://localhost:8080/manta-dataflow-server/ Reusing existing connection to localhost:8080. HTTP request sent, awaiting response... 302 Found Location: http://localhost:8080/manta-dataflow-server/login;jsessionid=82B21726E8D371D3116F2DB2F602AC56 [following] --2016-11-29 15:13:46-- http://localhost:8080/manta-dataflow-server/login;jsessionid=82B21726E8D371D3116F2DB2F602AC56 Reusing existing connection to localhost:8080. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: âmanta-dataflow-serverâ [ <=> ] 3,293 --.-K/s in 0s 2016-11-29 15:13:46 (152 MB/s) - âmanta-dataflow-serverâ saved [3293]
-
The wrong output is:
-
Wrong output
--2016-11-29 15:16:16-- http://localhost/manta-dataflow-server
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused.
- If you get the correct output but Manta is inaccessible from another machine, please contact your ITS department about connectivity and firewall settings.