Unable to access Docker Application via browser - linux

I am attempting to install a Tableau server running in a Docker Container and I seem to having a lot of issues accessing the application via my browser after the install.
I was able to create the docker image with no issues
REPOSITORY TAG IMAGE ID CREATED SIZE
tableau_server_image 20214.22.0314.1536 18f33191a8c5 10 hours ago 8.68GB
centos 7.9.2009 eeb6ee3f44bd 6 months ago 204MB
pvtmert/tableau latest 31c0207b828b 7 months ago 4.1GB
Also the container seems to currently be running
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5fd0604d7edc 18f33191a8c5 "/bin/sh -c ${DOCKER…" 6 hours ago Up 6 hours 0.0.0.0:8850->8850/tcp, :::8850->8850/tcp, 0.0.0.0:80->8080/tcp, :::80->8080/tcp zen_solomon
However, whenever I attempt to access the application via the public IP on either ports 8850 or port 80, nothing comes up.
Does anyone have any suggestions? Do I have the ports wrongly configured?
These are my results when I run netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 22654/docker-proxy
tcp 0 0 0.0.0.0:8850 0.0.0.0:* LISTEN 22632/docker-proxy
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1112/sshd
tcp6 0 0 :::80 :::* LISTEN 22662/docker-proxy
tcp6 0 0 :::8850 :::* LISTEN 22638/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 1112/sshd

Related

Why can't I talk to a service on tcp/3000 on my CentOS VPS

I'm trying to run a second web service on my VPS at port 3000.
On the VPS I run:
# php -S myhost.com:3000
and then in a browser, navigate to http://myhost.com:3000 but the browser times out and the service logs/outputs nothing.
If I run the service on port 80 (i.e., php -S myhost.com:80 and navigate to http://myhost.com), it works.
So firewall. Except that:
[root#spinal ~]# firewall-cmd --list-ports
3887/tcp 3000/tcp
(the 3887 is another service, which is working correctly.) And I rebooted the VPS after setting up port 3000 in the firewall. I reckon the service is listening correctly because:
[root#spinal ~]# netstat -tupl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:imap 0.0.0.0:* LISTEN 1907/dovecot
tcp 0 0 0.0.0.0:ciphire-data 0.0.0.0:* LISTEN 1876/sshd
tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN 1903/nginx: master
tcp 0 0 0.0.0.0:urd 0.0.0.0:* LISTEN 2004/master
tcp 0 0 myhost.com:hbci 0.0.0.0:* LISTEN 2206/php
tcp 0 0 localhost.loca:postgres 0.0.0.0:* LISTEN 1908/postgres
tcp 0 0 0.0.0.0:smtp 0.0.0.0:* LISTEN 2004/master
tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN 1903/nginx: master
tcp 0 0 0.0.0.0:imaps 0.0.0.0:* LISTEN 1907/dovecot
tcp 0 0 localhost.lo:cslistener 0.0.0.0:* LISTEN 1878/php-fpm: maste
tcp6 0 0 [::]:imap [::]:* LISTEN 1907/dovecot
tcp6 0 0 [::]:ciphire-data [::]:* LISTEN 1876/sshd
tcp6 0 0 [::]:urd [::]:* LISTEN 2004/master
tcp6 0 0 [::]:smtp [::]:* LISTEN 2004/master
tcp6 0 0 [::]:imaps [::]:* LISTEN 1907/dovecot
I can however connect locally. This works, when run on the VPS:
$ curl http://myhost.com:3000
so that again points at the firewall. But disabling the firewall doesn't help:
# systemctl stop firewalld
so it could be a DNS problem: my browser and the VPS differ on what myhost.com resolves-to. Except that, as mentioned above, switching to port 80 solves the problem. So it's something to do with coming-in on port 3000, from outside. But not firewalld.
The question at Can't reach nodejs on port 3000 from external on CentOS 7 is close to mine, but isn't conclusively answered.
I feel pretty stupid. It was a firewall; not on the VPS, but on my local network. When I tried it on a machine that doesn't go through my local network, it worked. I hope my public confession helps someone else.

Passenger, Plesk and Node.js: address already in use

My question is about getting Phusion Passenger and Plesk Onyx 17.5.3 to work together nicely. I have a new server running Ubuntu 16.04.
I am following the official Phusion Passenger tutorial on deploying a Node.js app, and I have followed it successfully to the point where I need to tell Passenger to listen on port 80.
Here are my steps:
With my registrar, I set up a DNS entry for the subdomain pass.domain.com
In the Plesk interface, I define the new subdomain
If I visit http://pass.domain.com in my browser, I get the default Plesk web page.
I follow the "Phusion Passenger: Node.js tutorial" until I reach this command:
sudo passenger start --port 80 --user someusername --environment production --daemonize
Note: I am using a valid custom user name in the place of `someusername'.
I get this error:
Could not start the Nginx engine:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
It appears that Plesk is already serving the default web page at this address, so Phusion Passenger cannot access it. What files do I need to add or edit to get Plesk to release the address so that Passenger can use it?
EDIT 4: I have found this question which describes similar symptoms. However the OP is using Meteor Up and I am using Passenger. His solution was to get Meteor Up to tell Node.js to run on port 3001, and get nginx to listen on port 80 and proxy requests to port 3001. I had understood that Phusion Passenger already does something similar under the hood.
Is there a way to modify the passenger start command to clarify this?
OLDER EDITS
EDIT 1: In response to #TarunLalwali, here is the output of sudo netstat -plnat on this server:
$ sudo netstat -plnat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:12768 0.0.0.0:* LISTEN 15654/psa-pc-remote
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 2293/mongod
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 15234/dovecot
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 1315/.spamassassin
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26659/nginx
tcp 0 0 0.0.0.0:8880 0.0.0.0:* LISTEN 23894/config
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 2142/master
tcp 0 0 172.17.0.1:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 94.76.206.212:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 17312/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1413/sshd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 12563/passenger-sta
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 17312/named
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2142/master
tcp 0 0 94.76.206.212:443 0.0.0.0:* LISTEN 26659/nginx
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 23894/config
tcp 0 0 94.76.206.212:993 92.130.47.95:49994 ESTABLISHED 15322/imap-login
tcp 0 0 127.0.0.1:51168 127.0.0.1:12768 TIME_WAIT -
tcp 0 0 94.76.206.212:25 200.188.141.75:51400 TIME_WAIT -
tcp 0 188 94.76.206.212:22 92.130.47.95:34414 ESTABLISHED 4035/sshd: blacksla
tcp6 0 0 :::4190 :::* LISTEN 15234/dovecot
tcp6 0 0 :::993 :::* LISTEN 15234/dovecot
tcp6 0 0 :::995 :::* LISTEN 15234/dovecot
tcp6 0 0 :::7080 :::* LISTEN 26432/apache2
tcp6 0 0 :::7081 :::* LISTEN 26432/apache2
tcp6 0 0 127.0.0.1:3306 :::* LISTEN 10040/mysqld
tcp6 0 0 :::106 :::* LISTEN 1532/xinetd
tcp6 0 0 :::110 :::* LISTEN 15234/dovecot
tcp6 0 0 :::143 :::* LISTEN 15234/dovecot
tcp6 0 0 ::1:783 :::* LISTEN 1315/.spamassassin
tcp6 0 0 2a02:af8:1:900::3860:80 :::* LISTEN 26659/nginx
tcp6 0 0 :::8880 :::* LISTEN 23894/config
tcp6 0 0 :::465 :::* LISTEN 2142/master
tcp6 0 0 :::53 :::* LISTEN 17312/named
tcp6 0 0 :::21 :::* LISTEN 1532/xinetd
tcp6 0 0 :::22 :::* LISTEN 1413/sshd
tcp6 0 0 :::25 :::* LISTEN 2142/master
tcp6 0 0 2a02:af8:1:900::386:443 :::* LISTEN 26659/nginx
tcp6 0 0 :::8443 :::* LISTEN 23894/config
Note: I have already asked about this issue on the Plesk forum, but it has received no response. I am hoping that asking the Phusion Passenger community here will be more productive. Once I have a working solution, I will post a link from the Plesk forum to the answer here.
Thanks in advance for your insights,
James
EDIT 2: Following #TarunLalwali's advice, I tried stopping nginx, but this produced an unknown error:
$ sudo nginx -s stop
$ sudo passenger start --port 80 --user node --environment production --daemonize
Could not start the Nginx engine:
nginx: [alert] Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Passenger core: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error)
EDIT 3: Attempting to disable nginx server-wide before invoking Passenger:
$ sudo systemctl disable nginx
Synchronizing state of nginx.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable nginx
insserv: warning: current start runlevel(s) (empty) of script `nginx' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nginx' overrides LSB defaults (0 1 6).
$ systemctl status nginx
* nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor preset: enabled)
Active: inactive (dead)
$ sudo passenger start --port 80 --user node --environment production --daemonize
Could not start the Nginx engine:
nginx: [alert] Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Passenger core: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error)
You mention that you need the system Nginx (at port 80) to run other subdomains on the server.
Passenger Standalone can coexist peacefully with a system Nginx using two steps:
Run it on a non-conflicting port, for example the default 3000:
sudo passenger start --port 3000 --user someusername --environment production --daemonize
For the domain that you want Passenger to server, tell the system Nginx to proxy to Passenger.
proxy_pass http://localhost:3000;
Remember to reload/restart Nginx to activate the config.
How to do step 2 exactly in Plesk is a question best asked on the Plesk forum, but from the Passenger point of view this setup should work.

Unable to access to Azure Puppet Enterprise console

I have provisioned an Azure VM based on Puppet Enterprise image, but I can't access to the console from https://.cloudapp.net as per this guide. I notice that my VM dns is https://.eastasia.cloudapp.net.
I'm guessing I will need to update the host file, but I'm not really familiar the right settings for Linux VM. Appreciate if someone can shed some light.
I have provisioned an Azure VM based on Puppet Enterprise image, but I
can't access to the console from https://.cloudapp.net as per this
guide.
When we deploy puppet use puppet Enterprise 3.7.2, deploy it to the classic mode or ARM module, I can't access the console same as you.
When we login this VM, we can not find puppet was running, here is the output:
jason#jasonpup1:~$ netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 10.0.0.4:16001 0.0.0.0:* LISTEN
tcp 0 256 10.0.0.4:22 167.220.255.6:62887 ESTABLISHED
tcp 0 0 10.0.0.4:42321 168.63.129.16:80 TIME_WAIT
tcp 0 0 10.0.0.4:42322 168.63.129.16:80 TIME_WAIT
tcp6 0 0 :::22 :::* LISTEN
jason#jasonpup1:~$
I guess there are something wrong with that template.
As a workaround, we can choose Puppet Enterprise 2016.1 Template to deploy puppet, we can find the guide here. After deployment completed, we can SSH to this VM, then we can find the puppet service is running:
root#puppetmaster:~# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.0.0.4:16001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 10.0.0.4:33096 168.63.129.16:80 TIME_WAIT
tcp 0 0 127.0.0.1:47946 127.0.0.1:61613 ESTABLISHED
tcp 0 0 127.0.0.1:34232 127.0.0.1:8140 TIME_WAIT
tcp 0 0 127.0.0.1:5432 127.0.0.1:58812 ESTABLISHED
tcp 0 0 10.0.0.4:43480 52.239.152.132:443 TIME_WAIT
tcp 0 0 10.0.0.4:43484 52.239.152.132:443 TIME_WAIT
tcp 0 0 10.0.0.4:43483 52.239.152.132:443 TIME_WAIT
tcp 0 0 10.0.0.4:43481 52.239.152.132:443 TIME_WAIT
tcp 0 0 127.0.0.1:58137 127.0.0.1:8142 ESTABLISHED
tcp 0 0 10.0.0.4:33099 168.63.129.16:80 TIME_WAIT
tcp 0 52 10.0.0.4:22 167.220.255.6:61149 ESTABLISHED
tcp6 0 0 :::56516 :::* LISTEN
tcp6 0 0 :::8140 :::* LISTEN
tcp6 0 0 :::61613 :::* LISTEN
tcp6 0 0 :::8142 :::* LISTEN
tcp6 0 0 :::61616 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::5432 :::* LISTEN
tcp6 0 0 127.0.0.1:8142 127.0.0.1:58137 ESTABLISHED
tcp6 0 0 127.0.0.1:58812 127.0.0.1:5432 ESTABLISHED
tcp6 0 0 127.0.0.1:61613 127.0.0.1:47946 ESTABLISHED
We can use this template to deploy Puppet in Azure, that works fine.

Galssfish install on CentOS not binding ipv4 port

After installing Glassfish on a CentOS only unziping the zip archive, my server doesn't not bind on ipv4.
With
netstat -tnlup
I've got the result :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5278/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 4621/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 4825/master
tcp 0 0 :::8686 :::* LISTEN 14659/java
tcp 0 0 :::4848 :::* LISTEN 14659/java
tcp 0 0 :::8080 :::* LISTEN 14659/java
tcp 0 0 :::3700 :::* LISTEN 14659/java
tcp 0 0 :::8181 :::* LISTEN 14659/java
tcp 0 0 :::22 :::* LISTEN 4621/sshd
tcp 0 0 ::1:25 :::* LISTEN 4825/master
tcp 0 0 :::7676 :::* LISTEN 14659/java
udp 0 0 0.0.0.0:68 0.0.0.0:* 1168/dhclient
How can I force glassfish listen on ipv4 addresses too ?
You may find Glassfish is bound to IPv4 (and IPv6) but is being blocked by the iptables firewall settings:
As root:
/etc/init.d/iptables stop
Then try accessing Glassfish via IPv4. If that works then you can re-enable iptables and set the appropriate rules for your environment.
That CentOS isn't showing ports bound on IPv4 when they are also bound on IPv6 looks like a bug to me (2.6.32-358.23.2.el6.x86_64).
I just had this same problem. Not sure yet what triggered the issue, as I have two other servers with the same software that don't show this issue.
In my case, I was able to fix it by adding this environment variable:
export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"
Once I restarted Java with this variable, it bound to IPv4, but not v6. I'm curious as to why it's not binding to both.

Linux Centos 6 Some how filtered port 80 + broke Apache 2

I have magically been able to break port 80 / Apache server when following a guide to install PHPMyAdmin (http://www.krizna.com/centos/installing-apache2-mysql-server-php-centos-6-lamp/#apache)
Prior to me to starting the guide, Apache 2 was working for me (was able to view pages and see the default blue one)
I followed the guide down to Step 4 under "PHP installation" and went to check the page and I was getting the following error (note: I skipped Mysql installation since I have it already installed and "Testing your page" in the Apache section since I had it working prior).
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://`192.168.141.22`/
Read Error
The system returned: (104) Connection reset by peer
An error condition occurred while reading data from the network. Please retry your request.
Your cache administrator is webmaster.
Generated Wed, 03 Jul 2013 19:04:56 GMT by tx22rrpep4da (hpm/3.0.55)
I tried to uninstall (yum erase) httpd and php and re-install and no success.
I did an nmap and it shows 80/tcp filtered http.
I even disabled/stopped IP tables incase that was the issue, no luck. I have other things like TS3 running on other ports fine.
Restarted the dedicated server.
netstat -tulpn
te PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 25896/httpd
tcp 0 0 0.0.0.0:30033 0.0.0.0:* LISTEN 2967/./ts3server_li
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2736/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2798/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2873/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2736/named
tcp 0 0 0.0.0.0:10011 0.0.0.0:* LISTEN 2967/./ts3server_li
tcp 0 0 ::1:53 :::* LISTEN 2736/named
tcp 0 0 :::22 :::* LISTEN 2798/sshd
tcp 0 0 ::1:953 :::* LISTEN 2736/named
udp 0 0 0.0.0.0:9987 0.0.0.0:* 2967/./ts3server_li
udp 0 0 127.0.0.1:53 0.0.0.0:* 2736/named
udp 0 0 ::1:53 :::* 2736/named
I had a few other people test the IP in case it was just my connection but they all got the same as well (IP: 192.168.141.22 )
Really hoping I can get this fixed with out doing something over the top like wiping and re-installing centos 6.
The netstat command is showing that Apache is in-deed listening on the following IP & port:
0 0.0.0.0:80
If you want reach Apache in 192... ip, then you need to edit one of the .conf files that has the "Listen" directive(normally in /etc/httpd/conf.d/ports.conf or the main .conf file) and either put in the ip or remove all ips so Apache can listen on all interfaces available in the machine.

Resources