yum install hit HTTP 403 error? - http

Issue description:
Install package on CentOS7 with below command:
yum install <package_name>
error:
# yum install httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
Trying other mirror.
To address this issue, please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue, please create a bug on https://bugs.centos.org/
Other info
>* I can be sure I did not have a proxy setting in /etc/yum.conf.
>* The firewall is closed.
>* I already try yum clean all
Something may relate
I have added the following two to config in /etc/yum.conf
timeout=9999
minrate=0
I added them because sometimes I will hit too slow or timeout error. If I remove this two from config, the error will be replaced by
# yum install httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
The error message did give a link. But that link can only be read by RedHat support accounts. I tried googling this, but the result either none related or can not solve my problem. Stack overflow also had one post about this. But it is also not helping.
Can anyone give some advice?

I solved this issue. This is because some external, third party firewall of my lab is blocking me.
Although the root cause is not very meaningful, but the way to trouble shoot should worth mention to reference.
Trouble shooting
It said 403 for some url. So I will access that url from my compute with below command.
curl -i <url>
The output contains http header. It is 403. Then I copy the html body to some text file. Use a web Broswer to open it. I found some information like:
your orgainization firewall block you
So... it is a network problem of my lab

Related

Set up rstudio-server on macOS

I want to set up rstudio-server on an iMac with support for multiple users and remote login. I followed the steps in the INSTALL tutorial: I built the source, set up the configuration files and the launchd daemon. At first, it works fine, but after some time, I get these warnings/errors when I plot:
2022-06-09 08:02:29.438 rsession[3050:139329] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-06-09 08:02:29.438 rsession[3050:139329] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-06-09 08:02:29.438 rsession[3050:139329] XType: unable to make a connection to the font daemon!
2022-06-09 08:02:29.438 rsession[3050:139329] XType: XTFontStaticRegistry is enabled as fontd is not available.
Then I can't plot any more unless I restart R and re-run my code. Do you know what could be the issue? I could not get any help when opening an issue on the rstudio-server github since MacOS is not officially supported.
I was also looking at running rstudio-server via docker, but I couldn't find a good way to map the user namespace from macOS to the container.
Any help or suggestion would be greatly appreciated!
EDIT: It seems I was able to solve the issue by launching the fontd daemon with:
sudo launchctl load -w /System/Library/LaunchAgents/com.apple.fontd.useragent.plist
This seems like an issue with the MacOS font daemon, not with RStudio itself.
Someone reported a similar issue on PhantomJS. Rebooting resolved it for them.
This answer reported the same error for a different build, and they were able to resolve it by installing the correct "Apple Worldwide Developer Relations Certification Authority" in Keychain:
The one I had had an expiration date of February 2023. I deleted that one and went here, downloaded the one called "Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)", then retried the build and it worked.

install.keras() in RStudio fails with http connection error

I've been trying to install and run keras in RStudio (Windows) in vain.
i installed keras package using normal package "keras"
(didn't use github)
I've installed latest python (3.6) and Anaconda.
then i use
> library(keras)
> install.keras()
and i get this error:
Creating r-tensorflow conda environment for TensorFlow installation...
Fetching package metadata ... CondaHTTPError: HTTP 000 CONNECTION
FAILED for url
https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2
Elapsed: -
An HTTP error occurred when trying to retrieve this URL. HTTP errors
are often intermittent, and a simple retry will get you on your way.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io',
port=443): Max retries exceeded with url:
/pkgs/main/win-64/repodata.json.bz2 (Caused by
ConnectTimeoutError(, 'Connection to repo.continuum.io timed out.
(connect timeout=9.15)'))",),)
Error: Error 1 occurred creating conda environment r-tensorflow In
addition: Warning message: running command
'"C:\PROGRA~3\ANACON~1\Scripts\conda.exe" "create" "--yes" "--name"
"r-tensorflow" "python=3.6"' had status 1
I've looked up everywhere on the web and can't figure out how to install keras and tensorflow properly. Using latest version of R (3.4.2)
Every method fails somewhere.
just to add to misery, i've also tried:
> devtools::install_github("rstudio/keras")
and i get this error:
Installation failed: Timeout was reached: Connection timed out after
10015 milliseconds
I am not behind any authenticated proxies. So, after multiple failure, i just downloaded the zip file from github and manually installed it using the zip file.
i also tried install.packages("keras") and that didn't give me any error either.
when i call the library i don't get any errors (as shown above)
UPDATE: I was able to install and use the package very easily on another computer that doesn't have python/anaconda installed on it already.
UPDATE 2: my proxy does not need authentication and there is no https_proxy either.
OK,, FINALLY found a solution.
Turns out RStudio uses a lot of default proxy settings, so i needed to change all that and set up my own proxy settings.
First step:
Rstudio --> Tools --> Global Options --> packages --> uncheck both "Use secure download method for HTTP" and "Use Internet Explorer librayr/proxy for HTTP"
Second step, in RStudio type:
> file.edit('./.Renviron')
Either an empty file or some file with already existing proxy settings will open. (Mine was empty). Then I included the following two:
http_proxy=http://myusename:password#proxy.server.com:port/
https_proxy=http://myusename:password#proxy.server.com:port/
(a few notes: I didn't have a https_proxy setting but I still needed to use the http_proxy details for my https_proxy setting. This was one of the culprits for my issue. Also, I needed to include the username:password even though my proxy doesn't need secure authentication. Same thing goes with the port. Port number had to be included, otherwise it wouldn't work.
Step 3:
Saved the new changes in .Renviron file and restarted RStudio.
I checked my proxy settings in RStudio after restart by typing:
> Sys.getenv("http_proxy")
> Sys.getenv("https_proxy")
The first few times i did this i realised that the proxy settings were not being changed in RStudio because i was editing the wrong .Renviron file. So, it's best to use file.edit('~/.Renviron') in step 2 to make sure it's the right file.
After all this, when i ran install.keras(), it installed successfully, including installing Tensorflow. Again, initially i had skipped step 1 so keras started being installed but it failed at installing tensorflow.
It was only going through all the steps that i was able to install both keras and tensorflow successfully over a proxy. Hope this helps.
Uninstalling Anaconda3 and installing Anaconda2 (i.e. Python 2.7) did the trick for me: https://www.anaconda.com/download/

After upgrade attempting to get artifact results in "Could not process download request: Binary provider has no content for"

I recently upgraded our artifactory repository from 2.6.5 to the current version 5.4.6.
However, something seems to have gone wrong in the process. There are some artifacts that throw a HTTP 500 error when attempting to access them. Here is an example using wget:
wget http://xyz.server.com:8081/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.12/build-info-extractor-gradle-2.0.12.pom
--2017-09-12 12:17:13--
http://xyz.server.com:8081/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.12/build-info-extractor-gradle-2.0.12.pom
Resolving xyz.server.com (xyz.server.com)... 10.125.1.28
Connecting to xyz.server.com (xyz.server.com)|10.125.1.28|:8081... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-09-12 12:17:13 ERROR 500: Internal Server Error.
I verified this by going to the artifactory site, browsing to the object in question, and trying to download it. The result was the following:
{
"errors" : [ {
"status" : 500,
"message" : "Could not process download request: Binary provider has no content for 'e52a9a9a58d6829b7b13dd841af4b027c88bb028'"
} ]
}
The problem seems to be in the final step of the upgrade process, upgrading from 3.9.5 to 5.4.6. The wget command above works on 3.9.5, but not on the 5.4.6 instance.
I found a reference to a "Zap Cache" function in older documentation and thought it might fix things, but I don't seem to be able to find that function in the current site.
Is anyone able to point me to: a way to fix this issue, or what I need to do/look for in the upgrade process in order to prevent it from occurring?
As a further data point, we're using an Oracle database for the full file store, if that matters in any way (using the tag: <chain template="full-db"> in binarystore.xml)
Thanks in advance....

how to use Sense (or any other suggested tool) to help beginners with ELK

I have tried few approaches:
1)
-I downloaded Sense from https://github.com/bleskes/sense, unzipped and pasted it in kibana-5.3.0-amd64/usr/share/kibana/plugins
-I started kibana and then I got "[warning] Plugin "Sense" was disabled because it expected Kibana version "2.0.0-snapshot", and found "5.3.0"
demetrio#nodejs ~/Servers/DBs/elasticsearch-5.3.0/bin $ cd /home/demetrio/Servers/DBs/kibana-5.3.0-amd64/usr/share/kibana/bin
demetrio#nodejs ~/Servers/DBs/kibana-5.3.0-amd64/usr/share/kibana/bin $ ./kibana
undefined accessed the autoload lists which are no longer available via the Plugin API.Use the `ui/autoload/*` modules instead.
undefined accessed the autoload lists which are no longer available via the Plugin API.Use the `ui/autoload/*` modules instead.
log [20:25:48.403] [warning] Plugin "Sense" was disabled because it expected Kibana version "2.0.0-snapshot", and found "5.3.0".
log [20:25:49.123] [info][status][plugin:kibana#5.3.0] Status changed from uninitialized to green - Ready
log [20:25:49.279] [info][status][plugin:elasticsearch#5.3.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [20:25:49.326] [info][status][plugin:console#5.3.0] Status changed from uninitialized to green - Ready
log [20:25:49.842] [info][status][plugin:timelion#5.3.0] Status changed from uninitialized to green - Ready
log [20:25:49.873] [info][listening] Server running at http://localhost:5601
log [20:25:49.875] [info][status][ui settings] Status changed from uninitialized to yellow - Elasticsearch plugin is yellow
log [20:25:50.041] [info][status][plugin:elasticsearch#5.3.0] Status changed from yellow to green - Kibana index ready
log [20:25:50.043] [info][status][ui settings] Status changed from yellow to green - Ready
2)
I tried installed, as suggested in https://github.com/bleskes/sense by following
demetrio#nodejs ~/Servers/DBs/kibana-5.3.0-amd64/usr/share/kibana/bin $ ./kibana plugin --install elastic/sense
ERROR unknown command plugin
3)
I tried to install
demetrio#nodejs ~/Servers/DBs/kibana-5.3.0-amd64/usr/share/kibana/bin $ ./kibana-plugin install elastic/sense
Attempting to transfer from elastic/sense
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/elastic/sense/elastic/sense-5.3.0.zip
Error: Client request error: connect ETIMEDOUT 107.21.249.70:443
Plugin installation was unsuccessful due to error "Client request error: connect ETIMEDOUT 107.21.249.70:443"
P.S. I checked my Debian proxy configuration and it is correct. Should I add my proxy configs in some specific Kibana file?
4)
I tried installed it from Google Chrome Store but it seems that such plugin is no mode maintained after version 2 and ELK is currently in 5.3
5)
I installed X-Pack (https://www.elastic.co/downloads/x-pack) but, as far as I noted until now, the only significant different was an user creation for each of ELK. I was locking for some thing like described here https://github.com/bleskes/sense
Handy API suggestions
Format validation
Scope collapsing
Auto formatting
Submit multiple requests at once
Copy and Paste cURL commands
To sum up, I am locking for some tool that could make a bit easier for a dummy like to make queries and interact with ELK. I saw few pictures that drove to conclusion that Sense is a good tool for that but I couldn't make it work.
Sense is now included in Kibana. Start Kibana (default port 5601) and look at DevTools. X-Pack is actually an expansion for monitoring, alerting and security purposes. kibana console doc
So for you it would be best to start exploring elasticsearch by using kibana devtools.

Fail to Run Openvswitch 2.5.0

I've removed the openvswitch version I had, and I downlaoded version (2.5.0) following the same steps in this link (https://github.com/mininet/mininet/wiki/Installing-new-version-of-Open-vSwitch) and instead of (OpenVSwitch 1.10) I used (OpenVSwitch 2.5.0). The installation went smoothly without error, but when I try to run mininent and got the following error. I've tried some suggestions I found online but none of them works.
ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
ovs-vsctl exited with code 1
*** Error connecting to ovs-db with ovs-vsctl
Make sure that Open vSwitch is installed, that ovsdb-server is running, and that
"ovs-vsctl show" works correctly.
You may wish to try "service openvswitch-switch start".
Could you please advise me what to do ?
Cheers,
Tom
We need 2 processes for that.
ovsdb-server
ovs-vswitchd
These 2 will be started with following command.
/usr/local/share/openvswitch/scripts/ovs-ctl start
In my case, /usr/local/share/openvswitch/scripts is the default location for ovs-ctl scriot,
Hope that helps.

Resources