Hazelcast successfully discovers nodes but unable to connect (OrientDB) - amazon-ec2

I'm using Hazelcast in EC2 discovery mode to allow OrientDB to run in distributed mode. The nodes are running in the same security group under the same EC2 role. The plugin successfully discovers other nodes but fails to connect over ports 5701-5703. Here is the error message:
2019-05-31 19:44:45:303 INFO [10.4.31.181]:5701 [orientdb] [3.8.4] Could not connect to: /10.4.26.235:5703. Reason: SocketException[Connection timed out to address /10.4.26.235:5703] [InitConnectionTask]
I checked if any process is listening on those ports on other nodes (lsof -i -P -n) and discovered these entries
java 10023 root 91u IPv6 357165 0t0 TCP *:2424 (LISTEN)
java 10023 root 92u IPv6 357166 0t0 TCP *:2480 (LISTEN)
java 10023 root 135u IPv6 357826 0t0 TCP *:5701 (LISTEN)
It seems that all OrientDB listeners are using IPv6 although I never enabled it anywhere (there are no IPv4 listeners). How do I make it listen using IP4? Here is the only thing I changed in hazelcast.xml after I install it.
<network>
<join>
<multicast enabled="false"/>
<aws enabled="true">
<tag-key>Name</tag-key>
<tag-value>orientdb-test</tag-value>
</aws>
</join>
</network>

Related

How to run Laravel 5.4 on port 80 successfully

I am using a Laravel package to connect to a payment system and this particular package sends and receives data via port 80 (and as I use port 8000 to make payments, I will encounter failures).
As seen here:
How to run laravel 5 on port 80 of localhost?
I decided to give it a try but this error is returned:
Failed to listen on 127.0.0.1:80 (reason: Permission denied)
To discover which program is using port 80, I entered sudo lsof -i :80 and received the following output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 3102 root 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3103 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3104 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3105 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3106 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3107 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3108 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3115 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3116 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
apache2 3117 www-data 4u IPv6 46970 0t0 TCP *:http (LISTEN)
I also tried the command: sudo netstat -nltp | grep -iw "80" and the following is its output:
tcp6 0 0 :::80 :::* LISTEN 3102/apache2
To free port 80 I tried: sudo kill -9 3102, afterwards I ran: sudo netstat -nltp | grep -iw "80" and the output was: tcp6 0 0 :::80 :::* LISTEN 3330/apache2
(the port is re-occupied).
I very much like to know how I can use port 80 to develop my Laravel app on it (I am using Debian 9 Stretch).
Let me guess. I think you are running artisan server in the server. It's not recommended to run it on your production server. artisan server should only used for development environment.
Based on your explanation, port 80 has been used by apache2 server. That's normal. What you need to do is to put your Laravel application to apache DocumentRoot directory. Because apache2 is the real web server. For Debian like distribution, DocumentRoot for apache2 located at /var/www. You may follow this guide for more information.
Hope it helps.

PhpStorm not receiving Xdebug from Vagrant machine

I've a Vagrant VM for dev with xdebug installed and I want to connect it to PhpStorm.
In my xdebug.ini I have this:
zend_extension=xdebug.so
xdebug.remote_connect_back = 0
xdebug.idekey = "vagrant"
xdebug.remote_enable=on
xdebug.remote_host=192.168.56.1
xdebug.remote_port=9001
xdebug.remote_log=/tmp/xdebug.log
But it doesn't work. I did some debug and I check that in my host machine the 9001 port was open, and it is:
phpstorm 311 jose 41u IPv4 0x2b62c0b107d1be65 0t0 TCP *:9001 (LISTEN)
phpstorm 311 jose 42u IPv4 0x2b62c0b1056e5245 0t0 TCP *:10137 (LISTEN)
phpstorm 311 jose 143u IPv4 0x2b62c0b10ae27e65 0t0 TCP 127.0.0.1:6942 (LISTEN)
phpstorm 311 jose 168u IPv4 0x2b62c0b107cd875d 0t0 TCP *:20080 (LISTEN)
phpstorm 311 jose 342u IPv4 0x2b62c0b110c70245 0t0 TCP 127.0.0.1:63342 (LISTEN)
JuniperSe 497 jose 10u IPv4 0x2b62c0b10696675d 0t0 TCP 127.0.0.1:3333 (LISTEN)
VBoxHeadl 726 jose 24u IPv4 0x2b62c0b1086e6b3d 0t0 TCP 127.0.0.1:2222 (LISTEN)
VBoxHeadl 726 jose 25u IPv4 0x2b62c0b10fe1d435 0t0 TCP *:33060 (LISTEN)
VBoxHeadl 726 jose 26u IPv4 0x2b62c0b108709435 0t0 TCP *:8088 (LISTEN)
But from Vagrant the 9001 port is not accessible:
nc -z -v -w5 192.168.56.1 9001
nc: connect to 192.168.56.1 port 9001 (tcp) timed out: Operation now in progress
And that's the same for all PhpStorm ports. But I can access 8088 or 33060
nc -z -v -w5 192.168.56.1 8088
Connection to 192.168.56.1 8088 port [tcp/omniorb] succeeded!
I've checked the option to accept external connections in PhpStorm for xdebug. I'm using Mac OS.
Ok, very silly problem. I had the external connections blocked for phpstorm, I changed that in System Preferences > Security > Firewall, on the list of apps I searched phpstorm and allow external connections

Find which process is listening on port 8001 on Mac OS X

How can I see which process is listening on port 8001 on Mac OS X?
I have tried several commands:
lsof -i | grep LISTEN
Output:
qbittorre 321 user 26u IPv4 0xc8e6037f28270c31 0t0 TCP *:6881 (LISTEN)
qbittorre 321 user 27u IPv6 0xc8e6037f216348e1 0t0 TCP *:6881 (LISTEN)
mysqld 14131 user 10u IPv4 0xc8e6037f3218da91 0t0 TCP *:mysql (LISTEN)
httpd 14133 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14135 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14136 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14137 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14138 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14139 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14148 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14149 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
httpd 14150 user 16u IPv6 0xc8e6037f216352e1 0t0 TCP *:http (LISTEN)
Skype 14543 user 57u IPv4 0xc8e6037f324f9a91 0t0 TCP *:18666 (LISTEN)
java 24640 user 68u IPv6 0xc8e6037f3295a3e1 0t0 TCP *:http-alt (LISTEN)
java 24640 user 73u IPv6 0xc8e6037f32958fe1 0t0 TCP *:8009 (LISTEN)
java 24640 user 101u IPv6 0xc8e6037f32959ee1 0t0 TCP localhost:8005 (LISTEN)
lsof:
sudo lsof -nPi -sTCP:LISTEN | grep 8001
Nothing found
netstat:
netstat -a | grep 8001
Nothing found
I know that the port is in use by someone, because I am trying to change the Emacs simple-httpd default httpd-port from 8080 (default) to 8001, and it fails:
Warning (initialization): An error occurred while loading `/Users/user/.emacs':
File error: Cannot bind server socket, address already in use
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
How can I resolve it? I tried also to set the port to 8002, with the same problem and didn't find which process is listening on port 8002.
What can be the source of the problem?
Using nmap I discovered that port 8001 is used by vcom-tunnel service and it’s a closed port and that port 8002 is used by teradataordbms and is also closed.
What are these services used for? Can I disable them and use their occupied ports?
You can use lsof to detect who is using the connection as long as there is active traffic on the connection.
Here is a demonstration:
setting a server on a given port fails with the error Address already in use
lsof doesn't report any listener for that port
Here is the shell log demonstrating this:
python -m SimpleHTTPServer 3333 2>&1 | fgrep error
Output:
socket.error: [Errno 48] Address already in use
sudo lsof -i TCP:3333
echo $?
Output:
1
[1] : starting a web server on port 3333 fails with the error Address already in use
[2] : lsof doesn't report port 3333 being used by anyone
Let's generate traffic in order to force lsof to detect the usage of the port: in another terminal open a telnet connection:
telnet localhost 3333
Now back on your previous terminal, you will see that lsof finds your port:
sudo lsof -n -P -i :3333
Output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
telnet 78142 loic 5u IPv4 0x3fa2e8474ece6129 0t0 TCP 127.0.0.1:51855->127.0.0.1:3333 (ESTABLISHED)
There is traffic going on, but according to the OS, only one end of the connection is there, the initiator, there still isn’t any `LISTENER`!
Note: in my case, OS is macOS v10.13.3 (High Sierra), but I had that with previous versions of macOS/OSX too

Cannot connect to apache server locally

I am trying to access an Apache server on my local machine, but can't get it to work. I had it working last week, but then it randomly stopped working. I have edited the httpd.conf file to update the port to 9876. I also added the ExecCGI directive in the HTDocs directory.
I usually see the index.html page I created by visiting localhost:9876, but now I just see an erroneous page. When I just run localhost:80, I see the it works page! How is something still showing up on port 80 when I clearly changed it to another port? I read more about this and found out it has to do with the sharing settings on OSX. These settings were never enabled to begin with. Why am I still seeing a page on port 80, and why is the designated port I chose not showing any content?
Things I have done:
I have tried stopping and restarting the server multiple times(with
sudo)
I use the web browser or netcat to connect to apache, but I get no response.
I ran lsof -i4TCP:9876 and get the following output:
launchd 1 root 25u IPv6 0xee69429dde6f1b6f 0t0 TCP localhost:ipp (LISTEN)
launchd 1 root 26u IPv4 0xee69429dde6f2b77 0t0 TCP localhost:ipp (LISTEN)
LogMeIn 82 root 5u IPv4 0xee69429dde6f238f 0t0 TCP *:globe (LISTEN)
vpnagentd 83 root 6u IPv4 0xee69429de115bb77 0t0 TCP localhost:29754 (LISTEN)
GitHub 201 kamranpirwani 6u IPv4 0xee69429de35f4b77 0t0 TCP localhost:25035 (LISTEN)
GitHub 201 kamranpirwani 7u IPv6 0xee69429dde6f0eaf 0t0 TCP localhost:25035 (LISTEN)
mysqld 412 _mysql 14u IPv6 0xee69429dde6efdaf 0t0 TCP *:mysql (LISTEN)
Coda\x202 726 kamranpirwani 5u IPv4 0xee69429deb25fb77 0t0 TCP *:6942 (LISTEN)
Coda\x202 726 kamranpirwani 7u IPv6 0xee69429dde6f12ef 0t0 TCP *:6942 (LISTEN)
Coda\x202 726 kamranpirwani 10u IPv4 0xee69429deb47438f 0t0 TCP *:50490 (LISTEN)
Coda\x202 726 kamranpirwani 11u IPv6 0xee69429dde6f062f 0t0 TCP *:50490 (LISTEN)
Coda\x202 726 kamranpirwani 12u IPv4 0xee69429dea898b77 0t0 TCP *:50491 (LISTEN)
Coda\x202 726 kamranpirwani 13u IPv6 0xee69429dde6ef96f 0t0 TCP *:50491 (LISTEN)
httpd 1879 root 5u IPv6 0xee69429dde6f172f 0t0 TCP *:http (LISTEN)
httpd 1880 _www 5u IPv6 0xee69429dde6f172f 0t0 TCP *:http (LISTEN)
httpd 1920 _www 5u IPv6 0xee69429dde6f172f 0t0 TCP *:http (LISTEN)
This leads me to believe the my apache web server is listening for requests on this port. Why can't the browser or netcat connect to it?
Edit:
Log file(with personal email removed) http://pastebin.com/84RcB2Er
First you say (emphasis mine):
I am trying to access an Apache server on my local machine, but
can't get it to work.
But then you say (again, emphasis mine):
When I just run on localhost, I see the it works page!
So unclear what the problem is.When you say you edited the .conf which one? Apache by default can handle virtual hosts so it’s possible you are running two virtual hosts on your machine with different document roots: One responding on port 80 & the other on port 9876. Can you exact details of the contents of the file you changed?
EDIT: The original poster indicates they are editing the httpd.conf in this location:
~/apache/conf/httpd.conf
When the systemwide Apache config is in this location:
/etc/apache2/httpd.conf

how to establish the RegionServer of Hbase to master

Please tell me how to establish the RegionServer of Hbase to master.
I configured 5 region servers, however, only 2 server is worked properly.
hbase(main):001:0> status
2 servers, 0 dead, 1.5000 average load
The hostname of this two servers are sm3-10 and sm3-12 from http://hbase-master:60010.
But the other servers like sm3-8 not work.
I'd like to know the trouble shooting step and resolutions.
sm3-10:slave, work well
[root#sm3-10 ~]# jps
2581 QuorumPeerMain
2761 SecondaryNameNode
2678 DataNode
19913 Jps
2551 HRegionServer
[root#sm3-10 ~]# lsof -i:54310
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2678 hdfs 52r IPv6 27608 TCP sm3-10:33316->sm3-12:54310 (ESTABLISHED)
[root#sm3-10 ~]# lsof -i:3888
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2581 zookeeper 19u IPv6 7239 TCP *:ciphire-serv (LISTEN)
java 2581 zookeeper 20u IPv6 7242 TCP sm3-10:ciphire-serv->sm3-11:53593 (ESTABLISHED)
java 2581 zookeeper 25u IPv6 27011 TCP sm3-10:ciphire-serv->sm3-12:40352 (ESTABLISHED)
java 2581 zookeeper 29u IPv6 25573 TCP sm3-10:ciphire-serv->sm3-8:44271 (ESTABLISHED)
sm3-8:slave, not work properly, however, the status looks good
[root#sm3-8 ~]# jps
3489 Jps
2249 HRegionServer
2463 DataNode
2297 QuorumPeerMain
2686 SecondaryNameNode
[root#sm3-8 ~]# lsof -i:54310
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2463 hdfs 51u IPv6 9919 TCP sm3-8.nos-seamicro.local:40776->sm3-12:54310 (ESTABLISHED)
[root#sm3-8 ~]# lsof -i:3888
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2297 zookeeper 18u IPv6 5951 TCP *:ciphire-serv (LISTEN)
java 2297 zookeeper 19u IPv6 9839 TCP sm3-8.nos-seamicro.local:52886->sm3-12:ciphire-serv (ESTABLISHED)
java 2297 zookeeper 20u IPv6 5956 TCP sm3-8.nos-seamicro.local:44271->sm3-10:ciphire-serv (ESTABLISHED)
java 2297 zookeeper 24u IPv6 5959 TCP sm3-8.nos-seamicro.local:47922->sm3-11:ciphire-serv (ESTABLISHED)
Mastet:sm3-12
[root#sm3-12 ~]# jps
2760 QuorumPeerMain
3035 NameNode
3096 SecondaryNameNode
2612 HRegionServer
4330 Jps
2872 DataNode
3723 HMaster
[root#sm3-12 ~]# lsof -i:54310
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2872 hdfs 51u IPv6 7824 TCP sm3-12:45482->sm3-12:54310 (ESTABLISHED)
java 3035 hdfs 54u IPv6 7783 TCP sm3-12:54310 (LISTEN)
java 3035 hdfs 70u IPv6 7873 TCP sm3-12:54310->sm3-8:40776 (ESTABLISHED)
java 3035 hdfs 71u IPv6 7874 TCP sm3-12:54310->sm3-11:54990 (ESTABLISHED)
java 3035 hdfs 72u IPv6 7875 TCP sm3-12:54310->sm3-10:33316 (ESTABLISHED)
java 3035 hdfs 74u IPv6 7877 TCP sm3-12:54310->sm3-12:45482 (ESTABLISHED)
[root#sm3-12 ~]#
[root#sm3-12 ~]# cat /etc/hbase/conf/hbase-site.xml
hbase.rootdir
hdfs://sm3-12:54310/hbase
true
hbase.zookeeper.quorum
sm3-8,sm3-10,sm3-11,sm3-12,sm3-13
true
--- snip ---
[root#sm3-12 ~]# cat /etc/zookeeper/zoo.cfg
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/zookeeper
clientPort=2181
server.1=sm3-10:2888:3888
server.2=sm3-11:2888:3888
server.3=sm3-12:2888:3888
server.4=sm3-8:2888:3888
[root#sm3-12 ~]#
Thanks in advance,
Hiromi
check to make sure your dns is configured properly on all of the hosts, and each server can do a reverse lookup

Resources