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

Farnell/Element14 API Error #866

Open
PressurisedAngus opened this issue Feb 21, 2025 · 5 comments
Open

Farnell/Element14 API Error #866

PressurisedAngus opened this issue Feb 21, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@PressurisedAngus
Copy link

PressurisedAngus commented Feb 21, 2025

I've setup a partdb instance on a debian server using proxmox and started connecting to the part distributor APIs. Mouser, LCSC, and TME works fine, however Farnell is proving to be an issue. I have created an application API with farnell's partner program and loaded in the key into the .env.local using uk.farnell.com.

When requesting data from farnell through info providers form, I get a status 500 error and the output to the log is:
partdblog.txt

The request can be seen at [2025-02-21T10:12:29.055824+00:00].

PHP version: 8.2.26
Browser: Chrome V132.0.6834.197
OS: Debian 12
PartDB: V1.15.2

@PressurisedAngus PressurisedAngus added the bug Something isn't working label Feb 21, 2025
@jbtronics
Copy link
Member

I think the relevant issue here is "SSL certificate problem: unable to get local issuer certificate for"?
So it seems that the CA mouser uses to sign their TLS request, is not recognized as valid by your system.
So you should probably check tht your system CA storage is up to date.

Do you run Part-DB as server on Windows 10 22H2? Directly without docker?
Does your PHP has the curl extension available and usable. (Its not really a hard dependencies, but the non-curl methods to make http requests, are a bit odd sometimes...)

@PressurisedAngus
Copy link
Author

Apologies, i provided the incorrect information on the OS. It has been updated in the original post. Just to check, the Mouser API works fine, however the farnell API is the issue. The PHP on the server has the latest version of curl, V1.88.1-10+deb12u8.

@jbtronics
Copy link
Member

You should still check your certificate store, just because mouser certificates are accepted, this doesnt necesarilly mean, that farnell have to do to. They use different CAs for their certificates...

@PressurisedAngus
Copy link
Author

I ran update-ca-certificates which didn't find any that needed replaced. There aren't any in the list that obviously pertain to farnell. Is there a specific one i should check for?

@jbtronics
Copy link
Member

"SSL.com TLS RSA Root CA 2022" as root CA and maybe "Entrust OV TLS Issuing RSA CA 1" as intermediate certificates. These are the certs that signed the api.element14.com TLS cert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants