Configuring a valid service endpoint - azure-devops

According to Configuring the Artifactory Service Endpoint, an artifactory instance as service endpoint need to be configured. One of the parameter is the server URL to the artifactory. What if the server URL is a local intranet, will the URL be considered valid ? I am having error with the URL I am providing (Local intranet). The error is:
"Failed to query service connection.....Error Message:'An error
occurred while sending the request'"

What if the server URL is a local intranet, will the URL be
considered valid ?
While the server URL you used here is a local internet, which means our azure image(Hosted agent) could not get communicate with it from public internet. That's why the error message told you failed to send request to server.
So, here the best way is you need configure one self agent in that local machine.
BUT, if Hosted agent is one preferred choice in pipeline execution. I'm afraid you have to configure your artifactory instance to make it accessible from the internet, just like the URL in the blog you shared above. Because our Hosted agent actually is Azure VM which hosted in cloud.

Related

Error: Error: Failed to deploy web package to App Service. Error: tunneling socket could not be established, statusCode=503

We are getting below error on Azure devops pipeline via Self hosted agent release when Azure web app is on Private network. No Error seen when the web app on azure is on Public.
Error: Error: Failed to deploy web package to App Service. Error: tunneling socket could not be established, statusCode=503
Made Azure web app to private and error comes. Moved to public no error seen.
Seems that the self-hosted agent cannot connect to the Azure app service. It seems to be a network issue.
The agent needs a way to connect to the App service directly. To ensure the connectivity is ok, we need to make sure the self-hosted agent is not blocked by NSG rules or App Service networking Access Restrictions. Just whitelist the agent machine in your rules.
The task using Kudu REST API to deploy the application. We need to check the following App Service networking Access Restrictions to allow deployment from a specific agent:
Make sure the REST site “xxx.scm.azurewebsites.net” have Allow All, i.e. no restriction.
Also, the option “Same restrictions as ***.azurewebsites.net” should be unchecked.
If you are using Private Endpoints for Azure Web App, you must create two records in your Azure DNS private zone or your custom DNS server. Kindly check DNS for more details.
Besides, when the proxy is set up, Web API calls and SCM hosts are bypassed by the user. The same has to be configured in the Azure pipelines agent explicitly. To bypass specific hosts, follow the steps here and restart the agent.
1.Allow access to Public removed.
2.Created Pvt endpoints within same Vnet and Subnet of Target VM
3.Created new file .proxybypass in self hosted agent folder C:\Username\Agent
4.Added below entries in .proxybypass to allow and communicate bypassing corporate proxy
https://MyWebappname.azurewebsites.net
http://MyWebappname.azurewebsites.net
enter code here

Failed to connect to proxy URL when deploying CloudFormation

I am attempting to deploy a CloudFormation template, but the Internet Gateway resource fails with an encoded error that decodes to:
Failed to connect to proxy URL: "http://127.0.0.1:10080"
What proxy am I missing that would prevent an Internet Gateway from being created?
It turns out the proxy error is misleading. The real issue is that the user deploying the CloudFormation template did not have the correct permissions.
I granted the user the AmazonVPCFullAccess policy, and the template was deployed correctly.

jenkins github webhook error

i'm trying to trigger builds on jenkins when ever a pull request is merged, and trying to add the webhook, which is throwing me the below error.
payload url: http://localhost:8080/job/hook-test/
error: "We couldn’t deliver this payload: Couldn't connect to server "
The URL for the webhook is localhost. GitHub is trying call the webhook on itself.
You need to deploy Jenkins in a publicly accesible URL. It won't work with a local Jenkins install in your PC.
localhost refers to the address of the current machine. When you type localhost in the browser and you access Jenkins, that works because you have Jenkins installed and running in your PC. Access localhost from a different machine and you won't be able to access Jenkins. When you tell github to send the webhook to localhost it will not try to send it to your machine, instead, it will send the webhook to the same machine in which github server is running, and that machine doesn't have Jenkins installed.
The problem here is localhost means something different for you and for github.
To solve this problem, you'll either need to install Jenkins in a public server accesible from internet (so that github can send the webhooks) or use some online service which provides hosted Jenkins servers.
You could also just get a domain and configure it to point to your PC. You would probably need to do some networking configuration but once it's done you (and github) will be able to access your jenkins via some-domain.example.io instead of localhost. Be careful, you would be making your (I asume personal) PC accesible from the internet, and that has security risks.
If you can afford it I recommend using a server in the cloud to run this.
Many cloud platforms even provide a quite long free trial period (I know Amazon and Google Cloud do).

Confugaration/steps needed when consuming external Restful service from Fiori front end server

I have deployed a custom UI5 app ( using external REST ful services--> service hosted in another Java stack system) in the front end server.
I used Ajax to call the service directly with the URL as shown below.
This app has run successfully when i use "proxy" in local host(eclipse).
-->Ajax Call code Snippet
So i replaced proxy with target url while deploying in front end. (http ://xxx.xxx:port)
When running from front end server i got cross origin error as shown below.
Error1:<http://xxx:port/xxx/ngservices/rest/query/ZQUE_WEBSERV_APPHISTORY/executeGet. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxx:port' is therefore not allowed access. The response had HTTP status code 401>
After enabling CORS plugin in chrome i got unauthorised error as shown below.
Error2:<http://xxx:port/xxx/ngservices/rest/query/ZQUE_WEBSERV_APPHISTORY/executeGet. Response for preflight has invalid HTTP status code 401>
I got the above errors initally while running from localhost.After that i used proxy and it got solved.
I just deployed the app in frontend server and ran it directly. I haven't done any other configurations.
Do i need to do any extra configurations for consuming these external services or kindly suggest any other suggestions.
Important info:
*Able to call external service from localhost(eclipse--> used proxy here) but not able to call service from frontend server.
*Front end architecture: Central hub deployement and connected to SRM,HR and CRM backends currently.
Regards
Phani Poorna
Both of these errors can be solved by creating and configuring a destination on your platform.
A destination is essentially a proxy: when you create it, you specify the backend URL, the authentication mechanism (Principal propagation/basic authentication etc). From your client, you just need to then connect to your destination to query the backend.
What do you mean by Fiori front end server? Are you referring to the Portal service hosted on HANA Cloud Platform?
If so, then you can create a destination by going to Connectivity - Destinations from your HCP account. From your Fiori application, you then need to connect your destination using the following URL pattern:
/destinations/<destination name>/<whatever you want to add to the URL the destination points to>
If you are using a different PaaS, I'm sure it will have some similar way of creating a proxy between your client and your backend. (Edit: I just saw you're using the Central hub deployment - I am not familiar with this system but it must have a very similar way of creating destinations).
Hope this helps, let me know if you have any questions.

using Windows Azure Connect local endpoint to send email from web role

I am trying to send email using one of our on-premises servers from one of my web roles hosted on azure. We've got a Windows Azure Connect endpoint installed on this on-premises server which has an SMTP server.
We've configured the web role so that it contains an activation code I acquired using the windows azure portal and the azure subscription we have. The web role has been deployed to azure with this configuration. Looking in the virtual network section of the portal I can see our on-premises server listed as well as the instance of said web role. I Created a group connecting the local endpoint to the web role instance.
The problem I'm having now is figuring out exactly what I have to do in order for the emails I send from the web role to be relayed through the smtp server on the on-premises server.
My first thought was to just specify the local endpoint name as it appears in our azure portal as the host to use when I create my SmtpClient object in code. Of course this didn't work as I received an SmtpException just saying Failure Sending Email.
So my question is once I've set everything up as described above, what do I need to do in ,my web role code and/or configuration in order to use the local endpoint as the smtp host for sending out my emails??
How about open your firewall for the SMTP on both your azure VM and local server.
As I know the azure VM firewall disabled the PING (ICMP) but doesn't know if it blocked all ports except those defined in your CSDEF file.