Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start on non loopback IP. #331

Open
arkastratuscent opened this issue Apr 15, 2021 · 7 comments
Open

Cannot start on non loopback IP. #331

arkastratuscent opened this issue Apr 15, 2021 · 7 comments

Comments

@arkastratuscent
Copy link

arkastratuscent commented Apr 15, 2021

-bash-4.2$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 68.183.194.158 netmask 255.255.240.0 broadcast 68.183.207.255
inet6 fe80::80ae:4bff:fe56:7e16 prefixlen 64 scopeid 0x20
ether 82:ae:4b:56:7e:16 txqueuelen 1000 (Ethernet)
RX packets 16658 bytes 20507619 (19.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7716 bytes 5188344 (4.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.118.0.2 netmask 255.255.240.0 broadcast 10.118.15.255
inet6 fe80::46:88ff:fe66:7a80 prefixlen 64 scopeid 0x20
ether 02:46:88:66:7a:80 txqueuelen 1000 (Ethernet)
RX packets 2 bytes 140 (140.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 838 (838.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 262 bytes 40134 (39.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 262 bytes 40134 (39.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

2021-04-15T17:29:56.675Z centos-s-1vcpu-1gb-tor1-01 1632 DEBUG TRIGGER_SERVICE [170901:GS_ERROR_TRIG_CONNECTION_POOL] numPooledConnection = 0, max = 5, numInstance=0
2021-04-15T17:29:56.690Z centos-s-1vcpu-1gb-tor1-01 1632 ERROR MAIN [130003:EE_OPERATION_NOT_ALLOWED] Address conflicted (address=10.118.0.2:10001,

-bash-4.2$ cat conf/gs_*.json | grep service
"servicePort":10010
"serviceAddress": "10.118.0.2",
"servicePort":10020
"serviceAddress": "10.118.0.2",
"servicePort":10040,
"serviceAddress": "10.118.0.2",
"servicePort":10001,
"serviceAddress": "10.118.0.2",
"servicePort":20001,

griddb-4.6.0-1.linux.x86_64
-bash-4.2$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

@knonomura
Copy link
Member

Sorry for late reply.

I guess you use RPM for GridDB V4.6.0.
This package doesn't include trigger function.

Could you please build from source code with "./configure --enable-activemq" ?

Note:
Default building environment repeals the trigger function. Add the following option in build to enable a trigger function. Add the following option in build to enable the trigger function.
$ ./configure --enable-activemq
https://github.com/griddb/docs-en/blob/master/manuals/GridDB_QuickStartGuide.md

@arkastratuscent
Copy link
Author

Thank you for the pointer , yes , i used the rpm.
Let me try compiling .

@arkastratuscent
Copy link
Author

arkastratuscent commented Apr 23, 2021

Dear Mr Nonomura , I tried your solution .
I compiled with --enable activemq for the trigger function.
I was able to run it.
Now I have landed into a different problem.
I installed it in production in Azure for the developer to test.

-bash-4.2$ netstat -ntlpu | grep gs
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 22441/gsserver
tcp 0 0 0.0.0.0:10040 0.0.0.0:* LISTEN 22441/gsserver
tcp 0 0 0.0.0.0:10010 0.0.0.0:* LISTEN 22441/gsserver
tcp 0 0 0.0.0.0:20001 0.0.0.0:* LISTEN 22441/gsserver
tcp 0 0 0.0.0.0:10020 0.0.0.0:* LISTEN 22441/gsserver
-bash-4.2$ whoami
gsadm

Azure had floating IPs not connected to host via Ethernet.
image

[root@29a744e2fc93 python_client-0.8.1-rc0]# telnet 40.76.81.227 10001
Trying 40.76.81.227...
Connected to 40.76.81.227.
Escape character is '^]'.

[root@29a744e2fc93 python_client-0.8.1-rc0]# python3 sample/sample1.py 40.76.81.227 10001 someCluster admin 123456
[ 0 ]
140046

[140046:CC_PLATFORM_ERROR] Failover timed out (trialCount=40, reconnectedTrial=-1, failureMillis=122883, reason=Failed to send message (address=172.17.0.4:10001, reason=Platform error (errno=113, description=No route to host)))
[ 1 ]
140046

[140046:CC_PLATFORM_ERROR] Failed to send message (address=172.17.0.4:10001, reason=Platform error (errno=113, description=No route to host))

Firewalld and SELINUX is disabled.

@arkastratuscent
Copy link
Author

arkastratuscent commented Apr 23, 2021

Sorry for late reply.

I guess you use RPM for GridDB V4.6.0.
This package doesn't include trigger function.

Could you please build from source code with "./configure --enable-activemq" ?

Note:
Default building environment repeals the trigger function. Add the following option in build to enable a trigger function. Add the following option in build to enable the trigger function.
$ ./configure --enable-activemq
https://github.com/griddb/docs-en/blob/master/manuals/GridDB_QuickStartGuide.md


Dear Mr Nonomura , I tried your solution .
I compiled with --enable activemq for the trigger function.
I was able to run it.
Now I have landed into a different problem.
I installed it in production in Azure for the developer to test.

Azure had floating IPs not connected to host via Ethernet.
image

-bash-4.2$ netstat -ntlpu | grep gs
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:10001           0.0.0.0:*               LISTEN      22441/gsserver      
tcp        0      0 0.0.0.0:10040           0.0.0.0:*               LISTEN      22441/gsserver      
tcp        0      0 0.0.0.0:10010           0.0.0.0:*               LISTEN      22441/gsserver      
tcp        0      0 0.0.0.0:20001           0.0.0.0:*               LISTEN      22441/gsserver      
tcp        0      0 0.0.0.0:10020           0.0.0.0:*               LISTEN      22441/gsserver      
-bash-4.2$ whoami
gsadm





[root@29a744e2fc93 python_client-0.8.1-rc0]# telnet 40.76.81.227 10001
Trying 40.76.81.227...
Connected to 40.76.81.227.
Escape character is '^]'.

[root@29a744e2fc93 python_client-0.8.1-rc0]# python3 sample/sample1.py  40.76.81.227 10001 someCluster admin 123456
[ 0 ]
140046

[140046:CC_PLATFORM_ERROR] Failover timed out (trialCount=40, reconnectedTrial=-1, failureMillis=122883, reason=Failed to send message (address=172.17.0.4:10001, reason=Platform error (errno=113, description=No route to host)))
[ 1 ]
140046

[140046:CC_PLATFORM_ERROR] Failed to send message (address=172.17.0.4:10001, reason=Platform error (errno=113, description=No route to host))

Firewalld and SELINUX is disabled.

@knonomura
Copy link
Member

Thank you for your usage.

Could you please use "Fixed list method" instead of "Multicast method" (default) as GridDB cluster configuration ?
https://github.com/griddb/griddb/blob/master/docs/TroubleShootingTips.md#using-the-environment-where-multicast-is-not-supported-like-aws-azure

@arkastratuscent
Copy link
Author

Hello Mr Knonomura,

I am using fixed list .
However the fixed list on the azure private ip.
Please check the error output.
172.17.0.4

Many Regards
Arka

@knonomura
Copy link
Member

knonomura commented May 10, 2021

In my understanding, you like to access GridDB cluster with Public IP.

There are two possible solutions.
Could you please try the following solutions ?

(A) Use only Public IP

[gs_node.json]

"cluster":{
"serviceAddress":"40.76.81.227",
"servicePort":10010
},
"sync":{
"serviceAddress":"40.76.81.227",
"servicePort":10020
},
"system":{
"serviceAddress":"40.76.81.227",
"servicePort":10040,
:
},
"transaction":{
"serviceAddress":"40.76.81.227",
"servicePort":10001,
:
},
"sql":{
"serviceAddress":"40.76.81.227",
"servicePort":20001,
:
},

[gs_cluster.json]

"notificationMember": [
{
"cluster": {"address":"40.76.81.227", "port":10010},
"sync": {"address":"40.76.81.227", "port":10020},
"system": {"address":"40.76.81.227", "port":10040},
"transaction": {"address":"40.76.81.227", "port":10001},
"sql": {"address":"40.76.81.227", "port":20001},
},

[Sample for Python Client]

gridstore = factory.get_store(host="40.76.81.227", port=10001, cluster_name="someCluster", username="admin", password="123456")
or
gridstore = factory.get_store(notification_member="40.76.81.227:10001", cluster_name="someCluster", username="admin", password="123456")

And you might need to change /etc/hosts on host "40.76.81.227".

(B) Use both Public IP and Private IP

[gs_node.json]

"cluster":{
"serviceAddress":"172.17.0.4",
"servicePort":10010
},
"sync":{
"serviceAddress":"172.17.0.4",
"servicePort":10020
},
"system":{
"serviceAddress":"172.17.0.4",
"servicePort":10040,
:
},
"transaction":{
"serviceAddress":"40.76.81.227",
"localServiceAddress":"172.17.0.4",
"servicePort":10001,
:
},
"sql":{
"serviceAddress":"40.76.81.227",
"localServiceAddress":"172.17.0.4",
"servicePort":20001,
:
},

[gs_cluster.json]

"notificationMember": [
{
"cluster": {"address":"172.17.0.4", "port":10010},
"sync": {"address":"172.17.0.4", "port":10020},
"system": {"address":"172.17.0.4", "port":10040},
"transaction": {"address":"40.76.81.227", "port":10001},
"sql": {"address":"40.76.81.227", "port":20001},
"transactionLocal": {"address":"172.17.0.4", "port":10001},
"sqlLocal": {"address":"172.17.0.4", "port":20001}
},

[Sample for Python Client]

gridstore = factory.get_store(host="40.76.81.227", port=10001, cluster_name="someCluster", username="admin", password="123456")
or
gridstore = factory.get_store(notification_member="40.76.81.227:10001", cluster_name="someCluster", username="admin", password="123456")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants