greenfield-cmd icon indicating copy to clipboard operation
greenfield-cmd copied to clipboard

Failed to verify certificate x509

Open urataps opened this issue 1 year ago • 2 comments

Hi, I'm trying to follow the Basic File Management tutorial from greenfield docs, and I get the invalid x509 certificate whenever I try to put a file, I get a successful transaction but also the following error

My command:

gnfd-cmd object put --contentType "text/plain" ./key.txt gnfd://barabulabucket/barabula.txt

Result:

object barabula.txt created on chain
transaction hash:  C7469036C240CC741545C8A6F3375C31A4AA6245929AAC8F287344F401C33659
{"level":"error","time":"2024-08-13T11:27:23+03:00","message":"do API error, url: https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt?upload-progress=, err: Get \"https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt?upload-progress=\": tls: failed to verify certificate: x509: certificate is valid for *.epotter-qa.io, epotter-qa.io, not barabulabucket.gnfd-testnet-sp.epotter-qa.io"}
{"level":"error","time":"2024-08-13T11:27:24+03:00","message":"do API error, url: https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt, err: Put \"https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt\": tls: failed to verify certificate: x509: certificate is valid for *.epotter-qa.io, epotter-qa.io, not barabulabucket.gnfd-testnet-sp.epotter-qa.io"}
run command error: Put "https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt": tls: failed to verify certificate: x509: certificate is valid for *.epotter-qa.io, epotter-qa.io, not barabulabucket.gnfd-testnet-sp.epotter-qa.io

However the real problem is when I try to get this file like this

gnfd-cmd object get gnfd://barabulabucket/barabula.txt barabula.txt

Because I'm getting the same certificate error and no file is written after the command.

{"level":"error","time":"2024-08-13T11:28:31+03:00","message":"do API error, url: https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt, err: Get \"https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt\": tls: failed to verify certificate: x509: certificate is valid for *.epotter-qa.io, epotter-qa.io, not barabulabucket.gnfd-testnet-sp.epotter-qa.io"}
run command error: Get "https://barabulabucket.gnfd-testnet-sp.epotter-qa.io/barabula.txt": tls: failed to verify certificate: x509: certificate is valid for *.epotter-qa.io, epotter-qa.io, not barabulabucket.gnfd-testnet-sp.epotter-qa.io

I get however a hidden file called .barabula.txt.tmp but it's empty

Any idea why this happens and how to solve the issue?

I have Ubuntu 22, and gnfd v1.0.2 built from source at the tag at v1.6.0 with go 1.21.6.

urataps avatar Aug 13 '24 08:08 urataps

Note: switching the storage providers solved the issue, so there was a problem with that SP

urataps avatar Aug 13 '24 13:08 urataps

Thank you sharing the solution

STdevK avatar Aug 31 '24 15:08 STdevK