question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidArgumentError: Invalid port : 9000

See original GitHub issue

I am bit confused about minio s3 gateway. Do we required aws sdk when we are running the minio server with s3 gateway? My server started running and browsers is showing me the s3 buckets but I can’t connect to the server through my node app. It is stating that port 9000 is invalid. Is that anything relevent to aws sdk or something else needs to be done here?

I have gone through the document of minio but didn’t find anything for this.

The error is as as below:

InvalidArgumentError: Invalid port : 9000,
    at new Client (/var/www/html/learn-otter-api/node_modules/minio/dist/main/minio.js:97:13)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cramattcommented, Aug 25, 2021

For what its worth, I encountered this issue today by passing in a port from an env variable, which was a string instead of a number.

.env
MINIO_PORT=9000

.js
const minioClient = new Client({
  port: process.env.MINIO_PORT || 9000,
  ...
})

The problem is that process.env.MINIO_PORT in this case is a string, which is not a valid number. Here is how I fixed it @ashishdocforce .

.js
const minioClient = new Client({
  port: process.env.MINIO_PORT ? parseInt(process.env.MINIO_PORT, 10) : 9000,
  ...
})

@prakashsvmx it might be helpful to change the error message in this case, to say something like Invalid port, port is a string. Must be a number.

0reactions
prakashsvmxcommented, Mar 22, 2021

Please feel free to re-open with replication steps and possibly code example with configuration settings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS s3 gateway with minio - node.js - Stack Overflow
I would really grateful if someone can help me in this. The error log as as below: InvalidArgumentError: Invalid port : 9000, at...
Read more >
[distributed] Invalid port added to Peer list · Issue #3047 - GitHub
minio server ~/test Endpoint: http://10.0.0.13:9000 http://127.0.0.1:9000 ... [distributed] Invalid port added to Peer list #3047.
Read more >
Troubleshooting Network Interfaces | Cumulus Linux 4.2
“RTNETLINK answers: Invalid argument” Error when Adding a Port to a Bridge ... This error can occur when the bridge port does not...
Read more >
RTNETLINK error on loading XDP program to ConnectX-5
kernel 5.4, ubuntu 20, on a Mellanox ConnectX-5 100G dual-port NIC. At a high level, I'm seeing an RTNETLINK invalid argument error upon....
Read more >
JavaScript Quickstart Guide — MinIO Object Storage for Linux
The MinIO JavaScript Client SDK provides simple APIs to access any Amazon S3 compatible object storage server. This quickstart guide will show you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found