Apache Drill UI server binding issue - apache-drill

I am trying to configure Apache drill.
I have downloaded, build and tested few things already, clustered configured on Zookeeper seems to run fine.
I am okay with the drill bit startup and all but the inbuilt Jetty server used by Drill is not binding to all the ips automatically.
Output of netstat:
$>sudo netstat -nlp | grep 8047
tcp6 0 0 :::8047 :::* LISTEN 23041/java
I want to make it listen from 0.0.0.0.
Any pointers appreciated.

Delving into it a bit, I see in the source code, drill uses Jetty Server class for the UI, that class has a convenience constructor that only accepts a port.
http://api.dpml.net/org/mortbay/jetty/6.1.0/org/mortbay/jetty/Server.html
Looks like it would require using the .addConnector() to support port and IP address.

Related

RSYSLOG listening on ephemeral (high) port

I've been poking around the internet trying to get an answer to this one but so far I've only seen it as "normal" behavior.
I have a fedora 29 host configured to send rsyslog messages over the default 514 port. That works as intented and has been for some time now. I had a client notice that the host would "listen" on an ephemeral port that appears to change with each reboot:
ss -tulnp | grep 46852
udp UNCONN 1536 0 0.0.0.0:468520.0.0.0:* users:(("rsyslogd",pid=676,fd=15))
also:
lsof -i :46852 -P
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsyslogd 676 root 15u IPv4 24836 0t0 UDP *:46852
Anyone know why rsyslog is doing this? It appears to be default behavior, and I'm not worried about it as the port can't be hit externally (firewall prohibits it) but just wanted to understand it. I also couldn't find anything in the rsyslog docs that talked about it.
Thanks!
This is just observed behavior I am curious about.
This isn't something that rsyslog is doing, but rather your OS.
Clients are assigned port numbers (random and sequential) by your operating system, as part of the sequence of system calls, that create a network connection. For example TCP and UDP typically use an "ephemeral" port for the client-end of a client–server communication.
These port numbers are - as you said - called "ephemeral" because they are valid only for the life of the connection and have no special significance.
As to why ephemeral ports are used.. I don't know. Maybe someone on ServerFault or Network Engineering can answer this question.
From my understanding ephemeral ports can be used either temporary or private. So if a service (temporarily) needs a port it can use an ephemeral port. After the service has done it's requests and has timed-out for some time, the port is released and can be used by some other service. This way a service doesn't block a port even though it doesn't even use it, or just frequently uses it.

issue to access multiple applications with IP and port on Google Compute Engine

I am new to Google Cloud. Instance has been created with Ubuntu16.04 image on Compute Engine. Three applications has been installed on it. One is running on nginx on port 80 [say A], second is on 8001[say B] and other one is on 8080 [say C].
I can able to access application A directly when click on external IP [or if give port 80 along with IP]. This application internally access application B on port 8001. Configuration of two applications has been updated for. There is inbound firewall rule for 8001. This application can not be accessible when we try to access with IP and port.
Same case with application C. That application is running on port 8080 in tomcat. Inbound Firewall rule has been created for this port too. This application is not accessible with IP and port. Server.xml for this application is updated to 0.0.0.0 instead of localhost [as mentioned not able to access port(11444 & 5072 ) externally(using Ubuntu on Google compute Engine)
I am not sure about the issue. Can anyone help me out?
I searched around but did not find anything for multiple applications. And most of the time example has given for port 80 only.
This application internally access application B on port 8001
Same case with application C.
It sounds like you don't actually want 8001 or 8080 to be accessible; in this case, leave the firewall rules alone (don't permit traffic to them from the outside) and configure them to listen only on localhost (which is not firewalled anyway).
In case you do want these to be accessible, then post a screenshot of your firewall configuration and we'll take a look.

Trying to run Kurento remotely on EC2

I try to run Kurento on a remote EC2 instance, but I can't seem to wrap my head around how do I load the page up.I have opened all UDP ports, I have configured my kurento server to a STUN server and checked that it worked but if I run npm start -- --ws_uri=ws://kms_host:kms_port/kurento it still says that it's running on localhost.
etc/kurento/WebRtcEndpoint.conf.ini
stunServerAddress=74.125.200.127
stunServerPort=19302
; turnURL gives the necessary info to configure TURN for WebRTC.
; 'address' must be an IP (not a domain).
; 'transport' is optional (UDP by default).
; turnURL=user:password#address:port(?transport=[udp|tcp|tls])
;pemCertificate is deprecated. Please use pemCertificateRSA instead
;pemCertificate=<path>
;pemCertificateRSA=<path>
;pemCertificateECDSA=<path>
Now I'm sure I have something wrong with the way I configured it or how I think it's supposed to work. Basically what I want to know is if I want to see the page the kurento hello-world example in the documentation shows but from a remote EC2 instance running kurento, how do I do that because after following their steps
The best way to make kurento work on EC2 is configure coturn server as described in official documentation here
If you don't want it, you must find working STUN servers. In my case, on EC2, this server works fine now:
stunServerAddress=74.125.142.127
stunServerPort=19302

Apache won't bind to ANY port (OS 10048)

I can't get the Apache service to start.
When I try to start it from services I get the following events in event viewer.
The Apache service named reported the following error: (OS
10048)Only one usage of each socket address (protocol/network
address/port) is normally permitted. : AH00072: make_sock: could not
bind to address 0.0.0.0:8090
AH00451: no listening sockets available, shutting down .
AH00015: Unable to open logs
.
I've tried port 80 port 8080 and 8090 and I'm getting the same errors.
I've checked to see if these ports are in use and they are not listed through netstat or through a currports.exe I've used.
I had everything running but I did a SYMLINKS rebuild on apache and mysql and I think I may have done them too quick as I got an error message at the time and mysql and apache stayed down.
I had to re-install the mysql service but the Apache service is going nowhere!!
I have wamp 2.5 with apache 2.4.9 running on windows 2008 R2 Enterprise for the purpose of an office intranet using wordpress.
Help very much appreciated
Cheers
JCro
EDIT Code from Httd.conf. I have just added the lines I've amended #
#
Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
#
ServerName localhost:80
HostnameLookups Off
#
Its not too clear what caused this situation but this may get you back up and running.
Start WAMPServer
uninstall the Apache service
wampmanager -> Apache -> Service -> Remove Service
reinstall the Apache service
wampmanager -> Apache -> Service -> Install Service
start Apache
wampmanager -> Apache -> Service -> Start/Resume Service
Now if you ever want to rebuild the Apache SYMLINKS (mysql has non by default) you do this :-
wampmanager -> Apache -> Version -> (click on the current version number)
Then wait a few seconds while WAMPServer rebuilds the SYMLINKS and restarts Apache for you.
Oh then I would put Apache back to Listen on port 80.
RE: Your httpd.conf amendments
This line should be a comment, its an example but not intended to be part of the used parameters in this file
#Listen 12.34.56.78:80
These 2 lines shoud be
# this is for IPV4
Listen 0.0.0.0:80
# This is for IPV6
Listen [::0]:80
These 2 lines look ok as
ServerName localhost:80
HostnameLookups Off
How to see port number in Windows 10?
Open a command prompt window (as Administrator) From "Start\Search box" Enter "cmd" then right-click on "cmd.exe" and select "Run as Administrator"
Enter the following text then hit Enter. netstat -abno. ...
Find the Port that you are listening on under "Local Address"
Look at the process name directly under that.
After you found the PID of the service running on a given your computer, open your task Manager and sort the running processes by PID. find your target PID right click and go to services, right click on the service and stop the service. without starting your apache 2.4 service just start by getting this path "C:\Apache24\bin>httpd -k start" then enter. This is the way I become successful after many ups and down.
OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address [::]:80 (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:80 AH00451: no listening sockets available, shutting down AH00015: Unable to open logs
I was getting the same error when i tried to start the Apache2.4. But when i replaced the Listen 80 with Listen 8080(by going to httpd.conf file placed in conf folder inside Apache24 folder), my problem solved.
you may still get the complaint about port 443. If you look through the httpd.conf, you won’t be able to find 443. But, you will find the following:
Secure (SSL/TLS) connections
Include “conf/extra/httpd-ssl.conf”
Look in the httpd-ssl.conf file, and replace 443 with some other port.
Enjoy!

Starting a service which may have port conflicts with existing service

Is there any way to start a service and force a service that is already running to stop if it uses the port that the service I want to start is going to be using?
I'm going to be installing apache and mysql, and want the services to be running without having to manually stopping existing services that use port 80/3306 such as existing apache/mysql services.
I'm using NSIS to make my installer.
To find the process listening on port 80 perhaps you could do the equivilent of this from the command line:
c:\>netstat -aon | findstr 0.0:80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3488
3488 is the process id. Not sure what APIs netstat is using though.
Without disabling or reconfiguring the service that is already using the desired port is still going to cause problems on system restart. The best bet might be to abort the install if the port is already in use. To check if a port is in use, use this NSIS TCP plugin.