Deploy error An unexpected error occurred: "ESOCKETTIMEDOUT". App Service Azure - reactjs

I have a big problem trying to deploy a react app to a azure app service with visual studio azure app service extension, im getting this error
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.0-alpha.27.tgz: ESOCKETTIMEDOUT".
Im using yarn and i read that increase the network timeout maybe solve this. But how i can do it?

I am using yarn and i read that increase the network timeout maybe
solve this. But how i can do it?
You can try running it in your terminal :
$ yarn install --network-timeout 1000000
And also try to clear the cache by running the below cmd
$ yarn cache clean
$ yarn // to install dependencies, no need for "yarn install"
Please refer the below links for more information:
.yarn is having troubles with the network connection | SO THREAD .
. React deployment keeps failing with ESOCKETTIMEDOUT | MS Q&A

Try to NOT run build on Azure. Do this by answering NO when you publish.
Have you already made the settings to build on Azure (answered yes) .. undo by deleting the following files
.vscode\settings.json
.deployment

Create the file .yarnrc, and write into file:
network-timeout 1000000
Save file & deploy your app with the file

Related

SFDX Authorize an Org failed to run

When running the VSC>SFDX command "SFDX: Authorize an Org", I am getting the error: "SFDX: Authorize an Org failed to run" (I am using VSC on a Mac).
VSC>Terminal>Output displays the following messages:
Starting SFDX: Authorize an Org
20:03:10.886 sfdx force:auth:web:login --setalias DEV --instanceurl https://test.salesforce.com --setdefaultusername
/Users/eduardo/.local/share/sfdx/client/bin/sfdx: line 16: /Users/eduardo/.local/share/sfdx/client/bin/../7.132.0-6621068/bin/sfdx: No such file or directory
20:03:10.912 sfdx force:auth:web:login --setalias DEV --instanceurl https://test.salesforce.com --setdefaultusername
ended with exit code 1
Any idea of how can I possibly resolve this issue?
Thank you very much.
Try to reinstall sfdx-cli i have similiar problem on mac and reinstall helps me try additionaly sfdx update. Sometimes there can be a problem with browser which is block and causes problems. Do you have same problem when you run a same command in terminal ?
BR

sudo npm run start Admin permissions error?

I am trying to run react application as sudo on port 443 but it is throwing permissions error as follows. I tried running the react script with root privileges too but get the same error.
Command used is
sudo npm run start
Error
? Admin permissions are required to run a server on a port below 1024. Probably:
/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/91.0.4472.114/Helpers/Google Chrome Helper.app/Contents/MacOS/Google Chrome Helper --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=1718379636,2199499938256335430,15968884667410910440,131072 --enable-features=BlockInsecurePrivateNetworkRequests,CookieSameSiteConsidersRedirectChain,CriticalClientHint,CrossOriginEmbedderPolicyCredentialless,CrossOriginIsolated,CrossOriginOpenerPolicyAccessReporting,CrossOriginOpenerPolicyReporting,DocumentPolicyNegotiation,EnableNewCanvas2DAPI,ExperimentalContentSecurityPolicyFeatures,FeaturePolicyForClientHints,LangClientHintHeader,OriginIsolationHeader,OriginPolicy,SchemefulSameSite,UserAgentClientHint --lang=en-US --service-sandbox-type=network --enable-experimental-web-platform-features --metrics-client-id=22a9279b-1648-45cf-a03c-0ce68df69ad5 --shared-files --seatbelt-client=27 (pid 887)
in /
Would you like to run the app on another port instead? (Y/n)
I checked port 443 and it is available to listen. I also wrote a script to listen on port 443 on localhost and it is able to bind on this port as a sudo user. No luck with the react app though.
I was able to run react app earlier in the same laptop but something changed and I don't know what. The error is anyway about permissions but I ruled out this possibility.
I feel it has something to do with Google Chrome Helper which react-scripts is trying to run without Admin Privilege.
Also, it could be some other package I installed which may have caused the issue.
I am at a loss here and am not sure how to debug it further. Googling the problem didn't help either. Any help to debug or fix the issue is greatly appreciated. Thanks in advance.
Mac OS Big Sur - version 11.4
npm version 7.18.1
I was able to get around this issue, by using this package.json command:
{
"scripts": {
"start-https": "sudo PORT=443 HTTPS=true react-scripts start"
}
}
I met the same issue, and solved by downgrading the node version from 16 to 14, don't know why but works.
The only way I found it to work (especially when you install node and npm using nvm) is to call react-scripts directly:
sudo node ./node_modules/.bin/react-scripts start
This assumes you are in the project / repository directory containing .node_modules. Nevertheless, it is different question whether its correct to npm start with sudo. I was just experimenting to run the dev server on port 80 and it was giving error
Admin permissions are required to run a server on a port below 1024.
And I was unable to fix it with various solutions specified on these links: 1, 2, 3, 4. From these links I mostly tried configuration related solutions as I did not wanted to reinstall node (without nvm).

An error occurred during installation: No such plugin: cloudbees-folder

An error occurred during installation: No such plugin: cloudbees-folder (While installing Jenkins suggested plugins getting the error on windows 10)
This work for me:
http://localhost:8080/restart
OR
service jenkins restart on my Ubuntu
For Windows users, restarting the Jenkins service will resolve the issue.
For that Open Task Manager (Ctrl+Sft+Esc) -> Services -> right-click on Jenkins service and choose the option restart
If you are using the Jenkin's image in Docker if you see this error just try to execute the below command:
http://localhost:8080/safeRestart
you will get a prompt do you need to restart don't click on yes just ignore then start creating your jobs by clicking on NEW, it's just a plugin
For the docker version
1-open the browser
2- write your_ip_address:your_docker_port/restart
Note: you must have the password generated by your Jenkins server
if you do have click here
As a comment suggested: always look for official images mentioned here jenkins.io/download.
I faced the same issue when using the docker image jenkins:2.60.3, it turned out that this image isn't an official one, the official images look like jenkins/jenkins:<something>, you can find them here: https://hub.docker.com/r/jenkins/jenkins
If you are behind a firewall (local or through a VPN), there's a good chance that it's failing to download files correctly.
Try installing from another location or disabling the VPN.
Or request your network admin to allow the connections.
When I initially started my server while on a VPN there were two connection failure stack traces.
I am running Jenkins on Ubuntu in AWS.
I had this initial problem after booting up the box.
Ran the following:
sudo service jenkins restart
All working for me now.
Check the Context Path in tomcat for Jenkins that you have given during deployment and then restart/safeRestart from that path.
For example: The Path in the below screenshot is "/jenkins", So the restart URL will be
http://localhost:8080/jenkins/restart OR
http://localhost:8080/jenkins/safeRestart
I just Unchecked all the plugins and clicked on the install button. After that, it successfully takes me to the inside.
Just restart the machine. It successfully worked for me.

Starting jetty fail in ubuntu 14

I install the solr-jetty package in a Ubuntu 14 container running in a cloud9 workspace.
To install the package I run the following command:
sudo apt-get install solr-jetty
The installation doesn't return any error.
Then I try to start solr with the following command:
sudo service jetty start
But I receive the following error:
* Starting Jetty servlet engine. jetty
* Jetty servlet engine started, reachable on http://host-solr-3694477:8983/. jetty
...fail!
In the log file of jetty I get the following message:
failed setting default capabilities.
set_caps(CAPS) failed for user 'jetty'
Service exit with a return value of 4
How can I resolve this issue?
To resolve the problem I had to change the user that run jetty from jetty to root.
This can be configured by editing the /etc/default/jetty file.
I think it is not the more correct solution because it can add security problems. If anyone have a better solution ...
Docker user here, same problem, but - this worked for me (and this is as unadvised as changing the user to 'root', suggested above):
https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
Set the following on your 'docker run' command when creating a container:
--privileged=true
I'm just using docker for development, so not overly concerned yet with the security implications of this.

Managed VM Deployment hangs on "Copying certificates for secure access..."

I'm running the following command to deploy my Managed VMs app (on Windows 10):
gcloud preview app deploy app.yaml --project=<PROJECT> --promote
The deployment starts bug hangs on the following line:
Copying certificates for secure access. You may be prompted to create an SSH keypair.
And after some time I get the error:
ERROR: (gcloud.preview.app.deploy) Unable to copy certificates.
I've already:
Made sure that there are SSH keys in ~\.ssh\google_compute_engine
Tried to run with --quiet - same results
Renamed ssh-term.exe to ssh.exe - same results
Run the command as an administrator.
Run the command with --verbosity debug, which prints the following line multiple times: DEBUG: File [f] does not exist locally.
Any help will be much appreciated!
Found the cause! It was the project's firewall that blocked SSH by default. Fixed that and it worked.
Glad you fixed it, I had the same problem and will use your fix. I did happen accros a work around. By using the Container Build API to perform the build.
enter the command
gcloud config set app/use_cloud_build true
Before you
gcloud preview app deploy
Cite: https://github.com/isusanin/google-cloud-sdk/issues/533

Resources