.Rmd not rendering in blogdown - r-markdown

Hello please I am trying to render a rmarkdown file on my website but I am geting this error,
blogdown:::serve_site()
Launching the server via the command:
C:/Users/Adejumo/AppData/Roaming/Hugo/0.88.1/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-lithium -D -F --navigateToChanged
Serving the directory . at http://localhost:4321
Launched the hugo server in the background (process ID: 6992). To stop it, call blogdown::stop_server() or restart the R session.
Rendering content/post/2020-12-01-r-rmarkdown/index.Rmd... Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Execution halted
Error: Failed to render content/post/2020-12-01-r-rmarkdown/index.Rmd

Related

Solana Anchor framework: Can't connect to localhost and therefor not deply to it

Anchor deploy
Deploying workspace: http://localhost:8899
Upgrade authority: /home/tomcatzy/.config/solana/id.json
Deploying program "basic-1"...
Program path: /home/tomcatzy/projects/anchor/examples/tutorial/basic-1/target/deploy/basic_1.so...
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying to connect: tcp connect error: Connection refused (os error 111)
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
It seems strange that after a succesful anchor build that i can't do a anchor deploy with the solana command lines ran above.
If by any means 'need' to run a - npm init - then where to do it ?
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
I tried the above and got generated a keypair: keyname_1-keypair.json. The build went succesful but the deploy not !
I'm wondering why not ?
Hopefully some can guide me what to get it succed...
In a separate window / terminal, you need to run solana-test-validator so that the tools can talk to your local network. The error you're seeing on deployment is due to an error on connecting to that network.
By following the Solana docs and doing this
sudo $(command -v solana-sys-tuner) --user $(whoami) > sys-tuner.log 2>&1 &
https://docs.solana.com/running-validator/validator-start#system-tuning
The test-ledger folder is done and a sys-tuner.log file is created but it's 0 bytes...
Then i run the solana-test-validator in a separate terminal and the other solana config commands in another termianl then i get the following results ->
You can deploy on-chain programs with the Solana tools.
To deploy a program, you will need the location of the program's shared object.
It will return when you run anchor build in the command line.
Run solana program deploy <PROGRAM_FILEPATH>.
Successful deployment will return the program id of your program.

Django hosting with Azure Web App Server Error 500

I followed this tutorial as well as 2 others trying to host my project using Azure. https://learn.microsoft.com/en-us/azure/app-service/containers/tutorial-python-postgresql-app?tabs=bash#clone-the-sample-app I managed to host the sample web app used in the tutorial, but could not host my own project
**I keep getting "Server Error 500". I've spent around 36 hours trying to fix the problem.**
I checked the application logs - nothing
I checked the kudu/scm logs - nothing
I looked under "App Service logs" and checked the ftp logs - nothing
I checked to see if all the files had been uploaded at this location "<>.scm.azurewebsites.net/wwwroot/" The staticfiles successfully uploaded.
I went to "Web SSH" and installed all the dependencies** "pip install -r requirements.txt"
then did "python manage.py runserver" AND NO ERRORS, but it did not want to connect to "127.0.0.1:8000" or "localhost:8000" ???
I spend around 6 hours searching for answers - tried everything - nothing worked
WEBSITES_PORT set to 8000 (tried different ports and removed this setting after no luck)
I changed DEBUG to False and True - didn't work
I did set all the necessary environment variables (eg, DB_HOST, DB_PASSWORD ...)
The App Service plan is F1 (free)
I went to all the pages on my web app and got server error 500 on all the pages except when logging into admin, after logging into admin I got the error again.
Possible Solutions I thought might work
I might be missing an important "Application setting" ???
One of the dependencies might be causing the problem - but I highly doubt it
I dont know pls help sir
This was about what the logs kept saying
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
2020-06-24T08:28:13.331Z INFO - Starting container for site
2020-06-24T08:28:13.331Z INFO - docker run -d -p 5480:8000 --name forexflowcom_0_136ed024 -e WEBSITE_SITE_NAME=forexflowcom -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=forexflowcom.azurewebsites.net -e WEBSITE_INSTANCE_ID=9072c805cf2bc663ced034398777a5d5f6115a51e64a73b6fc69b73f64c8660e -e HTTP_LOGGING_ENABLED=1 appsvc/python:3.7_20200101.1
2020-06-24T08:28:16.751Z INFO - Initiating warmup request to container forexflowcom_0_136ed024 for site forexflowcom
2020-06-24T08:28:28.970Z INFO - Container forexflowcom_0_136ed024 for site forexflowcom initialized successfully and is ready to serve requests.
2020-06-24T09:34:28.003Z INFO - Starting container for site
2020-06-24T09:34:28.010Z INFO - docker run -d -p 5757:8000 --name forexflowcom_1_86357e3d -e WEBSITE_SITE_NAME=forexflowcom -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=forexflowcom.azurewebsites.net -e WEBSITE_INSTANCE_ID=9072c805cf2bc663ced034398777a5d5f6115a51e64a73b6fc69b73f64c8660e -e HTTP_LOGGING_ENABLED=1 appsvc/python:3.7_20200101.1
2020-06-24T09:34:31.507Z INFO - Initiating warmup request to container forexflowcom_1_86357e3d for site forexflowcom
2020-06-24T09:34:49.002Z INFO - Container forexflowcom_1_86357e3d for site forexflowcom initialized successfully and is ready to serve requests.
2020-06-24T09:38:04.238Z INFO - Starting container for site
2020-06-24T09:38:04.240Z INFO - docker run -d -p 7958:8000 --name forexflowcom_2_79f5bea0 -e WEBSITE_SITE_NAME=forexflowcom -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=forexflowcom.azurewebsites.net -e WEBSITE_INSTANCE_ID=9072c805cf2bc663ced034398777a5d5f6115a51e64a73b6fc69b73f64c8660e -e HTTP_LOGGING_ENABLED=1 appsvc/python:3.7_20200101.1
2020-06-24T09:38:08.317Z INFO - Initiating warmup request to container forexflowcom_2_79f5bea0 for site forexflowcom
2020-06-24T09:38:23.838Z INFO - Waiting for response to warmup request for container forexflowcom_2_79f5bea0. Elapsed time = 15.5210597 sec
2020-06-24T09:38:41.054Z INFO - Container forexflowcom_2_79f5bea0 for site forexflowcom initialized successfully and is ready to serve requests.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
EDIT // EDIT // EDIT // EDIT // EDIT
I found The solution
in settings.py I had:
try:
from .local_settings import *
except ImportError:
print("No local file, your in production")
after removing this It worked

Can't connect to server running inside docker container (Docker for mac)

I have a docker container running on my system which i started using this command:
docker run -it -v ~/some/dir -p 8000:80 3cce3211b735 bash
Now docker ps lists this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
44de7549d38e 3cce3211b735 "bash" 14 minutes ago Up 14 minutes 22/tcp, 443/tcp, 8082/tcp, 0.0.0.0:8000->80/tcp hardcore_engelbart
Inside the container i run my django app using the command : python manage.py runserver 80
But i am not able to view the page using either of these:
1.localhost:8000
2.127.0.0.1:8000
I do understand that my 8000 port is mapped to 80 port on the container. But why am i not able to access it. I am using docker for mac not docker toolbox. Please help and comment if you need any more info.
Okay so i found the solution to my problem. The issue was not in the docker port mapping. The actual problem is this line :
python manage.py runserver 80
This runs the server on 127.0.0.1:80 . The localhost inside the docker container is not the localhost on your machine . So the solution is running the server using this command :
python manage.py runserver 0.0.0.0:80
I was able to access the webpage after this. If you run into the same problem where you are not able to connect to the django server running inside your docker container , you should try running the server on 0.0.0.0:port. You will be able to access it in your browser using localhost:port . Hope this helps someone.

Gunicorn OpenBSD internal error

with "gunicorn appname:application" shows worker running on 127.0.0.1.:8000 but when try to open at firefox or other browser shows me this error:
http://pastebin.com/s8g3WSBi

ERROR: Sonar server 'http://localhost:9000' can not be reached

when running the following command:
cmd /c C:\sonar-runner-2.4\bin\sonar-runner.bat
(sonar runner is installed on the build machine)
i get the following errors:
ERROR: Sonar server 'http://localhost:9000' can not be reached
ERROR: Error during Sonar runner execution
ERROR: java.net.ConnectException: Connection refused: connect
ERROR: Caused by: Connection refused: connect
what can cause these errors?
Hi dinesh,
this is my sonar-runner.properties file:
sonar.projectKey=NDM
sonar.projectName=NDM
sonar.projectVersion=1.0
sonar.visualstudio.solution=NDM.sln
#sonar.sourceEncoding=UTF-8
sonar.web.host:sonarqube
sonar.web.port=9000
# Enable the Visual Studio bootstrapper
sonar.visualstudio.enable=true
# Unit Test Results
sonar.cs.vstest.reportsPaths=TestResults/*.trx
# Required only when using SonarQube < 4.2
sonar.language=cs
sonar.sources=.
As you can see i set the sonar.web.host:sonarqube
sonar.web.port=9000 but when i run sonar-runner.bat i still get the
ERROR: Sonar server 'http://localhost:9000' can not be reached - why is it still looking for localhost:9000
and not sonarqube:9000 as i set?
i saw that in the log of sonar-runner.bat there the following line:
INFO: Work directory: D:\sTFS\26091\Sources\NDM\Source..sonar
while my solution is in D:\sTFS\26091\Sources\NDM\Source\
could this be the problem?
thanks,
Guy
If you use SonarScanner CLI with Docker, you may have this error because the SonarScanner container can not access to the Sonar UI container.
Note that you will have the same error with a simple curl from another container:
docker run --rm byrnedo/alpine-curl 127.0.0.1:9000
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused
The solution is to connect the SonarScanner container to the same docker network of your sonar instance, for instance with --network=host:
docker run --network=host -e SONAR_HOST_URL='http://127.0.0.1:9000' --user="$(id -u):$(id -g)" -v "$PWD:/usr/src" sonarsource/sonar-scanner-cli
(other parameters of this command comes from the SonarScanner CLI documentation)
I got the same issue, and I changed to IP and it working well
Go to System References --> Network --> Advanced --> Open TCP/IP tabs --> copy the IPv4 Address.
change that IP instead localhost
Hope this can help
You should configure the sonar-runner to use your existing SonarQube server. To do so, you need to update its conf/sonar-runner.properties file and specify the SonarQube server URL, username, password, and JDBC URL as well. See https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner for details.
If you don't yet have an up and running SonarQube server, then you can launch one locally (with the default configuration) - it will bind to http://localhost:9000 and work with the default sonar-runner configuration. See https://docs.sonarqube.org/latest/setup/get-started-2-minutes/ for details on how to get started with the SonarQube server.
For others who ran into this issue in a project that is not using a sonar-runners.property file, you may find (as I did) that you need to tweak your pom.xml file, adding a sonar.host.url property.
For example, I needed to add the following line under the 'properties' element:
<sonar.host.url>https://sonar.my-internal-company-domain.net</sonar.host.url>
Where the url points to our internal sonar deployment.
For me the issue was that the maven sonar plugin was using proxy servers defined in the maven settings.xml. I was trying to access the sonarque on another (not localhost alias) and so it was trying to use the proxy server to access it. Just added my alias to nonProxyHosts in settings.xml and it is working now. I did not face this issue in maven sonar plugin 3.2, only after i upgraded it.
<proxy>
<id>proxy_id</id>
<active>true</active>
<protocol>http</protocol>
<host>your-proxy-host/host>
<port>your-proxy-host</port>
<nonProxyHosts>localhost|127.0.*|other-non-proxy-hosts</nonProxyHosts>
</proxy>enter code here
The issue occurred with me in a different way a little a while ago,
I had a docker container running normally in the main network of my host machine accessible via the browser on the normal localhost:9000. But whenever the scanner wants to connect to the server it couldn't despite being on the same network of the host.
I made sure they are, because on the docker run command I mentioned --network=bridge
So the trick was that I pointed to the actual local ip of mine instead of just writing localhost
you can know the ip of your machine by typing ipconfig on windows or ifconfig on linux
so on the scan docker run command I have pointed to the server like that -Dsonar.host.url=http://192.168.1.2:9000 where 192.168.1.2 is my local host address
That was my final docker commands to run the Server:
docker run -d --name sonarqube \
--network=bridge \
-p 9000:9000 \
-e SONAR_JDBC_USERNAME=<db username> \
-e SONAR_JDBC_PASSWORD=<db password>\
-v sonarqube_data:/opt/sonarqube/data \
-v sonarqube_extensions:/opt/sonarqube/extensions \
-v sonarqube_logs:/opt/sonarqube/logs \
sonarqube:community
and that's for the Scanner:
docker run \
--network=bridge \
-v "<local path of the project to scan>:/usr/src" sonarsource/sonar-scanner-cli \
-Dsonar.projectKey=<project key> \
-Dsonar.sources=. \
-Dsonar.host.url=http://<local-ip>:9000 \
-Dsonar.login=<token>
In the config file there is a colon instead of an equal sign after the sonar.web.host.
Is:
sonar.web.host:sonarqube
Should be
sonar.web.host=sonarqube
In sonar.properties file in conf folder I had hardcoaded ip of my machine where sobarqube was installed in property sonar.web.host=10.9 235.22 I commented this and it started working for me.
Please check if postgres(or any other database service) is running properly.
When you allow the 9000 port to firewall on your desired operating System the following error "ERROR: Sonar server 'http://localhost:9000' can not be reached" will remove successfully.In ubuntu it is just like as by typing the following command in terminal "sudo ufw allow 9000/tcp" this error will removed from the Jenkins server by clicking on build now in jenkins.