Closed celldara closed 2 years ago
ran it again with strace and this is what I found.
write(1, "Since you entered an IP address,"..., 57Since you entered an IP address, SSL won't be available. ) = 57 write(1, "\33[?25l", 6) = 6 futex(0xc000044950, FUTEX_WAKE_PRIVATE, 1) = 1 ▁ socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2692430416, u64=140559792159312}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2692430416, u64=140559792159312}}], 128, 0, NULL, 18955940) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003cd324) = 0 close(7) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2692430416, u64=140559792159312}}) = 0 epoll_pwait(4, [{EPOLLOUT, {u32=2692430184, u64=140559792159080}}, {EPOLLOUT, {u32=2692430416, u64=140559792159312}}], 128, 0, NULL, 18955940) = 2 getsockopt(7, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 getpeername(7, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 getsockname(7, {sa_family=AF_INET, sin_port=htons(37888), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 setsockopt(7, SOL_TCP, TCP_KEEPINTVL, [30], 4) = 0 setsockopt(7, SOL_TCP, TCP_KEEPIDLE, [30], 4) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 read(7, 0xc00039b000, 4096) = -1 EAGAIN (Resource temporarily unavailable) The installation log is located at /tmp/gm-installer.log ERRO[0062] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer.
There is definitely an issue with the code because it is trying to open a socket to localhost (127.0.0.1) on port 8086. This isn't attempting to bind to port 80 on 0.0.0.0. It then attempts to connect to a different socket on port 37888 on localhost.
Thanks for your report.
Yes, we do check the port 127.0.0.1:8086, it is used for the metrics database. However, in your case it worked without issues. If there was a problem with the port 127.0.0.1:8086, you would have received this error:
Cannot bind to 127.0.0.1:8086; this address is used by a logs DB, make sure it's not used and re-run the installer.
I think, the problem in your case is that the installer must be run under the root user, and you ran it as an unprivileged user.
I ran it as root.
I ran it with sudo then I did sudo su - and tried to run it again. This is failing regardless of how it is run
[myhost gm-installer]$ sudo ./gm-installer install INFO[0000] OS Detected: RedHat / Red Hat Enterprise Linux / Linux / Ootpa / 8.5
Do you accept the License Agreement? [a] to accept; [r] to read agreement; or [n] to reject. Your choice: a GMD Package Repository URL (blank for default): GMD Admin User Login [admin]: GMD Admin Password: Repeat your entry: By what domain name or an IP address this service will be reached? (Note that an externally resolvable domain name is needed to use an external Certificate Authority, otherwise we will have to resort to self-signed certificates for SSL if encryption is required): Enter your domain name or IP of the server: 10.54.132.67 Since you entered an IP address, SSL won't be available. The installation log is located at /tmp/gm-installer.log ERRO[0050] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer. [myhost /gm-installer]$ sudo su - Last login: Fri Jan 14 12:41:23 EST 2022 on pts/0 [myhost ~]# whoami root [myhost ~]# cd /gminstaller/ [myhost gm-installer]# ./gm-installer install INFO[0000] OS Detected: RedHat / Red Hat Enterprise Linux / Linux / Ootpa / 8.5
Do you accept the License Agreement? [a] to accept; [r] to read agreement; or [n] to reject. Your choice: a GMD Package Repository URL (blank for default): GMD Admin User Login [admin]: GMD Admin Password: Repeat your entry: By what domain name or an IP address this service will be reached? (Note that an externally resolvable domain name is needed to use an external Certificate Authority, otherwise we will have to resort to self-signed certificates for SSL if encryption is required): Enter your domain name or IP of the server: 10.54.132.67 Since you entered an IP address, SSL won't be available. The installation log is located at /tmp/gm-installer.log ERRO[0011] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer. [myhost gm-installer]# netstat -an | grep -w LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN [myhost gm-installer]#
write(1, "Enter your domain name or IP of "..., 44Enter your domain name or IP of the server: ) = 44 read(0, 10.54.132.67 "10.54.132.67\n", 4096) = 13 futex(0xec7318, FUTEX_WAKE_PRIVATE, 1) = 1 write(1, "Since you entered an IP address,"..., 57Since you entered an IP address, SSL won't be available. ) = 57 write(1, "\33[?25l", 6) = 6 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 ▁ ) = 8 connect(8, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 getsockopt(8, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 getpeername(8, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 getsockname(8, {sa_family=AF_INET, sin_port=htons(42890), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0 setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 setsockopt(8, SOL_TCP, TCP_KEEPINTVL, [30], 4) = 0 setsockopt(8, SOL_TCP, TCP_KEEPIDLE, [30], 4) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 read(8, 0xc0003d6000, 4096) = -1 EAGAIN (Resource temporarily unavailable) write(8, "GET / HTTP/1.1\r\nHost: 127.0.0.1:"..., 95) = 95 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 futex(0xec77b0, FUTEX_WAIT_PRIVATE, 0, NULL) = 0 nanosleep({tv_sec=0, tv_nsec=3000}, NULL) = 0 epoll_pwait(4, [{EPOLLIN, {u32=15686592, u64=15686592}}, {EPOLLIN|EPOLLOUT|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 99, NULL, 1) = 2 read(5, "\0", 16) = 1 read(8, "", 4096) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 8, 0xc00006fb34) = 0 close(8) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 epoll_pwait(4, [], 128, 0, NULL, 120496546) = 0 epoll_pwait(4, [], 128, 1, NULL, 1) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 0, NULL, 120496550) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003d1324) = 0 close(7) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 0, NULL, 120496550) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003d1324) = 0 close(7) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 0, NULL, 120496550) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003d1324) = 0 close(7) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 0, NULL, 120496550) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003d1324) = 0 close(7) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2395062696, u64=140542314922408}}) = 0 epoll_pwait(4, [{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP, {u32=2395062696, u64=140542314922408}}], 128, 0, NULL, 120496550) = 1 getsockopt(7, SOL_SOCKET, SO_ERROR, [ECONNREFUSED], [4]) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003d1324) = 0 close(7) = 0 write(1, "\33[?25h", 6) = 6 write(1, "\10", ) = 1 write(1, "\10", ) = 1 write(1, "\177", ) = 1 write(1, "\177", ) = 1 ) = 4 write(1, "The installation log is located "..., 57The installation log is located at /tmp/gm-installer.log ) = 57 close(3) = 0 write(2, "\33[31mERRO\33[0m[0012] Cannot bind "..., 136ERRO[0012] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer. ) = 136 exit_group(1) = ? +++ exited with 1 +++
ran it again and got different result write(1, "Enter your domain name or IP of "..., 44Enter your domain name or IP of the server: ) = 44 read(0, 10.54.132.67 "10.54.132.67\n", 4096) = 13 futex(0xec7318, FUTEX_WAKE_PRIVATE, 1) = 1 write(1, "Since you entered an IP address,"..., 57Since you entered an IP address, SSL won't be available. ) = 57 write(1, "\33[?25l", 6) = 6 futex(0xc000044950, FUTEX_WAKE_PRIVATE, 1) = 1 ▁ --- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=44394, si_uid=0} --- rt_sigreturn({mask=[]}) = 0 --- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=44394, si_uid=0} --- rt_sigreturn({mask=[]}) = 0 --- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=44394, si_uid=0} --- rt_sigreturn({mask=[]}) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 8 connect(8, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) epoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2590480616, u64=139812365900008}}) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 getsockopt(8, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 getpeername(8, {sa_family=AF_INET, sin_port=htons(8086), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 getsockname(8, {sa_family=AF_INET, sin_port=htons(42954), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0 setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 setsockopt(8, SOL_TCP, TCP_KEEPINTVL, [30], 4) = 0 setsockopt(8, SOL_TCP, TCP_KEEPIDLE, [30], 4) = 0 futex(0xc000044550, FUTEX_WAKE_PRIVATE, 1) = 1 read(8, "HTTP/1.1 200 OK\r\nDate: Tue, 18 J"..., 4096) = 148 futex(0xc000044950, FUTEX_WAKE_PRIVATE, 1) = 1 read(8, 0xc000351000, 4096) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({tv_sec=0, tv_nsec=3000}, NULL) = 0 futex(0xec77b0, FUTEX_WAIT_PRIVATE, 0, NULL) = 0 epoll_pwait(4, [], 128, 0, NULL, 120572960) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_TCP) = 7 close(7) = 0 The installation log is located at /tmp/gm-installer.log ERRO[0009] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer. ) = ? +++ exited with 1 +++ [myhost gm-installer]#
Can you please download and run this tool and post the output here: portcheck.zip
P.S. You can check the source for this tool here.
[root@myserver ~]# ./portcheck 2022/01/20 15:29:37 Expected response: pong (5577006791947779410) 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8086 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8086 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8086 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8086 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8086 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused :8086: available=false 2022/01/20 15:29:37 Expected response: pong (6129484611666145821) 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:80 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:80 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:80 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:80 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:80 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused :80: available=false 2022/01/20 15:29:37 Expected response: pong (3916589616287113937) 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8000 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8000 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8000 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8000 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8000 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused :8000: available=false 2022/01/20 15:29:37 Expected response: pong (605394647632969758) 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8080 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8080 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8080 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8080 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/20 15:29:37 Reading from URL: http://127.0.0.1:8080 2022/01/20 15:29:37 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused :8080: available=false [root@myserver ~]# whoami root [root@myserver ~]# netstat -an | grep -w LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN [root@myserver ~]# nc -lk 80 & [1] 49387 [root@myserver ~]# netstat -an | grep -w LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN [root@myserver ~]#
I'm afraid there is still something wrong with your system setup (or let me say, something that prevents the installer from opening the ports and reading from them). I've just created a fresh RedHat installation in Amazon EC2, and here is the output of the tool (all ports are available):
[root@ip-172-31-42-239 ec2-user]# ./portcheck
2022/01/21 14:40:29 Expected response: pong (5577006791947779410)
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8086
2022/01/21 14:40:29 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8086
2022/01/21 14:40:29 Got: pong (5577006791947779410)
:8086: available=true
2022/01/21 14:40:29 Expected response: pong (4037200794235010051)
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:80
2022/01/21 14:40:29 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:80
2022/01/21 14:40:29 Got: pong (4037200794235010051)
:80: available=true
2022/01/21 14:40:29 Expected response: pong (605394647632969758)
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8000
2022/01/21 14:40:29 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8000
2022/01/21 14:40:29 Got: pong (605394647632969758)
:8000: available=true
2022/01/21 14:40:29 Expected response: pong (2775422040480279449)
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8080
2022/01/21 14:40:29 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused
2022/01/21 14:40:29 Reading from URL: http://127.0.0.1:8080
2022/01/21 14:40:29 Got: pong (2775422040480279449)
:8080: available=true
What we can do is providing an option that will allow skipping port check, but in this case we won't be able to guarantee that the Galera Manager deployment will work properly.
Not sure why I can open port 80 with netcat with no issues, but your software can't. This is a simple baseline install with SELinux set to permissive, no firewalld running.
I can install apache or nginx and it opens port 80 with no issue. [root@myserver ~]# systemctl stop httpd [root@myserver ~]# curl -s -I http://localhost [root@myserver ~]# nc -vz localhost 80 Ncat: Version 7.70 ( https://nmap.org/ncat ) Ncat: Connection to 127.0.0.1 failed: Connection refused. Ncat: Trying next address... libnsock nsock_make_socket(): Socket trouble: Address family not supported by protocol Ncat: Address family not supported by protocol. [root@myserver ~]# systemctl start httpd [root@myserver ~]# nc -vz localhost 80 Ncat: Version 7.70 ( https://nmap.org/ncat ) Ncat: Connected to 127.0.0.1:80. Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds. [root@myserver ~]# curl -s -I http://localhost HTTP/1.1 403 Forbidden Date: Fri, 21 Jan 2022 14:58:49 GMT Server: Apache/2.4.37 (Red Hat Enterprise Linux) Last-Modified: Mon, 12 Jul 2021 19:36:32 GMT ETag: "133f-5c6f23d09f000" Accept-Ranges: bytes Content-Length: 4927 Content-Type: text/html; charset=UTF-8
Interesting enough, I ran portcheck several times, and OCCASSIONALY, it will open a port and be successful
Thank you for the update. It probably, it can depend on a system. We will improve the port check procedure to be more robust. I will keep you posted.
Can you please try this version of the installer: gm-installer.tar.gz.
well, since this server doesn't have external connection for yum repositories (we use locally replicated repositories), it hangs at Updating YUM repositories
Errors during downloading metadata for repository 'galera-manager':
[root@myserver pc]# cat http-servers.go package main
import ( "fmt" "net/http" )
func hello(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "hello\n")
}
func headers(w http.ResponseWriter, req *http.Request) {
for name, headers := range req.Header {
for _, h := range headers {
fmt.Fprintf(w, "%v: %v\n", name, h)
}
}
}
func main() {
http.HandleFunc("/hello", hello)
http.HandleFunc("/headers", headers)
http.ListenAndServe(":8090", nil)
} [root@myserver pc]# go run http-servers.go & [2] 6683 [root@myserver pc]# curl localhost:8090/hello hello [2]+ Done go run http-servers.go [root@myserver pc]# go run portcheck.go 2022/01/21 12:15:54 Expected response: pong (5577006791947779410) 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8086 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8086 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8086 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8086 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8086 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8086 Get "http://127.0.0.1:8086": dial tcp 127.0.0.1:8086: connect: connection refused :8086: available=false 2022/01/21 12:15:54 Expected response: pong (6129484611666145821) 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:80 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:80 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:80 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:80 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:80 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:80 Get "http://127.0.0.1:80": dial tcp 127.0.0.1:80: connect: connection refused :80: available=false 2022/01/21 12:15:54 Expected response: pong (3916589616287113937) 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8000 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8000 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8000 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8000 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8000 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8000 Get "http://127.0.0.1:8000": dial tcp 127.0.0.1:8000: connect: connection refused :8000: available=false 2022/01/21 12:15:54 Expected response: pong (605394647632969758) 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8080 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8080 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8080 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8080 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused 2022/01/21 12:15:54 Reading from URL: http://127.0.0.1:8080 2022/01/21 12:15:54 Error reading from URL: http://127.0.0.1:8080 Get "http://127.0.0.1:8080": dial tcp 127.0.0.1:8080: connect: connection refused :8080: available=false
Not sure why my go code works for opening port and yours doesn't
I modified your portcheck code here.
go func() {
log.Println("We got to this function")
err := srv.ListenAndServe()
log.Println("Opening srv.ListenAndServe()")
mu.Lock()
servErr = err
mu.Unlock()
}()
The first log.Println prints, the second one doesn't.
Something is failing in srv.ListenAndServe() and it is not being caught and blowing right out of the loop.
well, since this server doesn't have external connection for yum repositories (we use locally replicated repositories), it hangs at Updating YUM repositories
Errors during downloading metadata for repository 'galera-manager':
- Curl error (28): Timeout was reached for https://repo.galera-manager.com/nexus/repository/galera-manager-release/repodata/repomd.xml [Connection timed out after 30000 milliseconds] Error: Failed to download metadata for repo 'galera-manager': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
There is a way to provide a custom repository in the installer (when it asks GMD Package Repository URL (blank for default):
), but you need to clone our repository and make it available from your server.
we can clone your repository
gm-installer cannot bind to port 80. Installing servers with no access to internet.
This is a fresh install of RHEL 8, no apache, no nginx, no firewalld, selinux set to permissive, nothing listening on any port except SSH.
[myacct ~]$ sudo netstat -an | grep -w LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN [myacct ~]$ getenforce Permissive [myacct ~]$ ./gm-installer version gm-installer version 1.6.0 (linux/amd64) [myacct ~]$ uname -a Linux mygm.ad.local 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 8 13:30:15 EST 2021 x86_64 x86_64 x86_64 GNU/Linux [myacct ~]$ cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa)
... Since you entered an IP address, SSL won't be available. The installation log is located at /tmp/gm-installer.log ERRO[0047] Cannot bind to 0.0.0.0:80; this address is used by a web server, make sure it's not used and re-run the installer.
[myacct ~]$ ls -l /tmp/gm-installer.log -rw-------. 1 root root 0 Jan 11 12:01 /tmp/gm-installer.log
empty log