SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi,
I have installed the SmartConnector on my EBO Server for Bueno Analytics to accesss, the SmartConnector is working and accessing the database from the local network. When we try a remote connection we get the web page display with "Can't read from server. It may not have the appropriate access-control-origin settings." error.
Using Chorme this error is shown in the developer tool console "Access to XMLHttpRequest at 'http://192.168.2.9:8083/swagger/docs/v1' from origin 'http://165.228.3.48:8083' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
I am using EBO 2.0.3.45 on a Windows 2016 Server, SmartConnector 2.4.17, the ADSL & Windows firewalls are off. Have I missed something in the setup of the software or do I have to add Access-Control-Allow-Origin to one of the files installed.
Regards,
Dale
Link copied. Please paste this link to share this article on your social media post.
Hi Dale,
If you try and set where the IP is 192.168.2.9:8083 to 165.228.3.48:8083 does it work?
Also, even though the swagger page isn't loading correctly, the simple fact you can access the page shows that in general the Framework is setup correctly. The real test would be to point Bueno Analytics at this endpoint to make sure it is working.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Hi Dale,
The issue you came across is unfortunetly a likely bug on our side. I am gonna guess that you have it setup so that your endpoint address is configured as 'http://+:8083', and that you are connecting to this webpage from a different machine than where Smart Connector is installed. The bug if in this scenario, we are trying to authenticate using 127.0.0.1 as the IP address of the server, which of course in this case is not correct at all, and it should be using 165.228.3.48. Hence the error you are seeing.
The workaround for this would be set the endpoint address as http://165.228.3.48 (assuming this is not a DMZ address) or you can log into this swagger page from the machine where Smart Connector is installed. In the mean time, I am have been looking into a fix, and it is of course a bit more complicated then I would have liked.. So I am not sure when this will be available.
The above said, it is only Swagger that is the issue and not the REST endpoint itself. If you were to use another REST client (either code based, or something like Postman) to send requests. It would work as expected.
Best Regards,
-Jeff
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.