Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Connection refused even though port is open and a service is listening - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Connection refused even though port is open and a service is listening

2»

Comments

  • edited January 2021

    @jokjok said:

    @awooooool said:
    Can you curl xx.xx.xx.xx:9000 in your storage KVM? HostSolutions gave public IP for storage KVMs so NAT shouldn't be an issue.

    [xxx@centos ~]# curl xx.xx.xxx.xxx:9000
    <?xml version="1.0" encoding="UTF-8"?>
    <Error><Code>AccessDenied</Code><Message>Access Denied<Resource>/</Resource>
    <RequestId>165DAAF091A78E83</RequestId><HostId>25eca351-4ec9-48f9-9776-a01427eae071</HostId></Error>

    If I'm not mistaken, this is already Minio showing the "Access Denied" error. Access denied means it doesn't know your credentials but it did accept the connection.

    How did you run minio? Is this via systemd? In your netstat, it seems it's bound to your public IP (xxx.xxx.xxx.xxx:9000). I don't have it installed on my servers at the moment so I couldn't check, but maybe it'll be a better option to force it to listen to all public interfaces instead (0.0.0.0:9000).

    LET's Cloudflare setup is somehow blocking me from posting the following command:

    Try this: https://pastebin.com/Eh2aLCBF

    Thanked by 1jokjok
  • I'm at loss. I'm still under the impression that there's some misconfiguration with his minio server. I've never tried it tho.

    What's the curl in your website? @jokjok

    Thanked by 1jokjok
  • jokjokjokjok Member
    edited January 2021

    @definitelyliam said:
    If I'm not mistaken, this is already Minio showing the "Access Denied" error. Access denied means it doesn't know your credentials but it did accept the connection.

    It is possible ofc. Maybe some filepermissions are missing, maybe wrong path, I dont know. I can access it via the browser without a problem, but maybe there is something overwriting someting which blocks the access.

    How did you run minio? Is this via systemd? In your netstat, it seems it's bound to your public IP (xxx.xxx.xxx.xxx:9000). I don't have it installed on my servers at the moment so I couldn't check, but maybe it'll be a better option to force it to listen to all public interfaces instead (0.0.0.0:9000).

    First I did this:
    wget https://dl.min.io/server/minio/release/linux-amd64/minio
    chmod +x minio
    ./minio server /data
    And it started. But I had no access via the browser. After trying out, I found out I didn't open the port. So I did, and then I had browser access.

    Then, I deleted /data and created /storage folder. And then I created a systemd service:
    https://github.com/minio/minio-service/tree/master/linux-systemd

    My minio file:
    https://pastebin.com/cWF3gzgJ

    The download minio.service file:
    https://pastebin.com/x8quQJEP

    Maybe there is a typo or wrong entered thing? Or I forgot to give permissions to the files?

    LET's Cloudflare setup is somehow blocking me from posting the following command:

    Try this: https://pastebin.com/Eh2aLCBF

    It says:
    ERROR Unable to start the server: Specified port is already in use
    > Please ensure no other program uses the same address/port

    @awooooool said:
    I'm at loss. I'm still under the impression that there's some misconfiguration with his minio server. I've never tried it tho.

    What's the curl in your website? @jokjok

    It could be just that I managed to fuk up the minio installation. Much likely. Maybe I should make a fresh CentOS install on the server and start new?

    If I curl my main website's IP with my main server, I get html content displayed.

    There is one question nobody answered yet. If I enter the storage IP in my browser, it errors out and says network timeout. Shouldn't I be able to access it via the browser and it shows me sth. at least? Maybe 404 or maybe denied, maybe folder structure, anything?

    The whole problem might be because the main IP is not reachable (yet I can access it via SSH and SFTP).

  • edited January 2021

    @jokjok said: My minio file:

    https://pastebin.com/cWF3gzgJ

    On the MINIO_OPTS line, change your IP (presumably the one you replaced with xxx.) to 0.0.0.0. It should read:

    MINIO_OPTS="--address 0.0.0.0:9000"
    

    If that doesn't work, try removing the IP altogether:

    MINIO_OPTS="--address :9000"
    

    Remember to restart the service every time you edit the environment file (systemctl restart minio.service).

    Again, not entirely sure since it's been a while since I've used minio on production, but sometimes IP bindings, even if it's bound to the server's public IP, doesn't work. This way, it'll force minio to listen to any address.

    I reached this conclusion because when you curl your public IP from within the server it shows you the Access Denied page, so I'm assuming it has something to do with IP binding.

    It may work, it may not. Worth a try.

    Thanked by 1jokjok
  • The second one made it to listen to all now. But I still get access denied.

    [xxx@centos ~]# netstat -plnt
    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:22 0.0.0.0:* LISTEN 1177/sshd
    tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1150/master
    tcp6 0 0 :::9000 :::* LISTEN 9186/minio
    tcp6 0 0 :::22 :::* LISTEN 1177/sshd
    tcp6 0 0 ::1:25 :::* LISTEN 1150/master

    Curl with port
    [xxx@centos ~]# curl xx.xx.xxx.xxx:9000
    <?xml version="1.0" encoding="UTF-8"?>
    <Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Resource>/</Resource><RequestId>165DCD32770E25D5</RequestId><HostId>25eca351-4ec9-48f9-9776-a01427eae071</HostId></Error>[root@centos ~]#

    Curl without port only main IP
    [xxx@centos ~]# curl xx.xxxxx.xxx
    curl: (7) Failed connect to xx.xx.xxx.xxx:80; Connection refused

    I really believe the whole server denies the access. Not just that port.

  • DPDP Administrator, The Domain Guy

    Just create a ticket with support in parallel, to get their feedback.

    Thanked by 1jokjok
  • Hm. Well I'm all out of ideas.

    Guess only your host can help you out now. Sorry. This is an intriguing issue though.

    Thanked by 1jokjok
  • who is your server provider?

    Thanked by 1jokjok
  • jokjokjokjok Member
    edited January 2021

    It is HostSolutions.
    I will create a ticket now. I didn't do it earlier because I thought I am the problem but it is time to ask them. I will update you guys when I have more information.

    I thank everyone who tried to help, much appreciated.

  • They say they can't help me as they don't block any port. So whatever the problem is, it is "inside" the KVM.

    Okay, I think I will do a fresh OS install.

    What is the least problematic one?
    Debian?
    Ubuntu?
    Centos 7 or 8?

  • DPDP Administrator, The Domain Guy

    @jokjok said:
    They say they can't help me as they don't block any port. So whatever the problem is, it is "inside" the KVM.

    Okay, I think I will do a fresh OS install.

    What is the least problematic one?
    Debian?
    Ubuntu?
    Centos 7 or 8?

    You have them in order, but 1st and 2nd can take each others place most of the time :)

    Thanked by 1jokjok
  • Are you able to browse your minio web interface?

    http://xx.xx.xxx.xxx:9000

    Thanked by 1jokjok
  • @thedp said:
    You have them in order, but 1st and 2nd can take each others place most of the time :)

    Nice coincidence :D. So either one is okay and has no firewall issues like CentOS?
    What is more similar to CentOS when it comes to shell commands, as the last 3 days I learned so many commands? :D.

    @cazrz said:
    Are you able to browse your minio web interface?

    http://xx.xx.xxx.xxx:9000

    Yes, see: https://imgur.com/mnYuqnn

    I think it is a server setup issue. Maybe I had to do vhost domain things? I don't know, really. I am gonna do a fresh install and start from 0.

Sign In or Register to comment.