Jenkins remote api error 404 - linux

I am trying to update remote jenkins config.xml file but i am having issue, I am sure username and password are correct and path of file also correct because same thing is working in other server but with newer version of jenkin 1.514. I have having issue with 1.501 version, Even i have disabled cross-site request forgery (CSRF) any idea how to make it work if there is any work around?
wget --auth-no-challenge --http-user=spatel --http-password=secret --post-file=config.xml --no-check-certificate http://jenkin.example.com/jenkin/jobs/Sched_M_Builds2Test/config.xml
--2013-05-23 15:54:22-- http://jenkin.example.com/jenkin/jobs/Sched_M_Builds2Test/config.xml
Resolving hudson.outcome.com... 10.101.100.60
Connecting to hudson.outcome.com|10.101.100.60|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-05-23 15:54:22 ERROR 404: Not Found.

You are probably talking about software called Jenkins - http://jenkins-ci.org/ but your link points at jenkin.
404 means not found so please make sure that you have right URL.

Related

Problems downloading packages using "ptxdist get"

I'm trying to compile Linux for an embedded system. I'm using ptxdist command to build the system.
My colleague told me to use ptxdist get so we can get all dependencies downloaded before we start compiling.
We also sit behind a proxy and my /etc/environment is configured with the http/https/ftp proxy (same IP and port for all), as well as apt (meaning that wget works fine without extra parameters)
PROBLEM:
Running ptxdist get will download some of the packages, others it will just not download and the following error appears (example for 2 packages):
Here is an example when it worked fine:
---------------------------
target: cmake-3.13.4.tar.gz
---------------------------
--2019-07-23 20:54:28-- https://cmake.org/files/v3.13/cmake-3.13.4.tar.gz
Connecting to <PROXY IP HERE>:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 8617881 (8.2M) [application/x-gzip]
Saving to: '/home/xxxxxxx/xxxxxxx/xxxxxxx/src/cmake-3.13.4.tar.gz.RSjrC7k7mC'
/home/xxxxxxx/x 100%[===================>] 8.22M 2.00MB/s in 4.7s
2019-07-23 20:54:34 (1.75 MB/s) - '/home/xxxxxxx/xxxxxxx/xxxxxxx/src/cmake-3.13.4.tar.gz.RSjrC7k7mC' saved [8617881/8617881]
And here an example when it failed:
-----------------------
target: lzo-2.08.tar.gz
-----------------------
--2019-07-23 20:55:13-- http://www.oberhumer.com/opensource/lzo/download/lzo-2.08.tar.gz
Connecting to <PROXY IP HERE>:8080... connected.
Proxy request sent, awaiting response... 502 Proxy Error ( The specified network name is no longer available. )
2019-07-23 20:55:13 ERROR 502: Proxy Error ( The specified network name is no longer available. ).
--2019-07-23 20:55:13-- http://www.pengutronix.de/software/ptxdist/temporary-src/lzo-2.08.tar.gz
Connecting to <PROXY IP HERE>:8080... connected.
Proxy request sent, awaiting response... 502 Proxy Error ( The specified network name is no longer available. )
2019-07-23 20:55:13 ERROR 502: Proxy Error ( The specified network name is no longer available. ).
make: *** [/home/xxxxxxxx/xxxxxxx/xxxxxxx/src/lzo-2.08.tar.gz] Error 1
Could not download package
URL: http://www.oberhumer.com/opensource/lzo/download/lzo-2.08.tar.gz
/usr/local/lib/ptxdist-2019.03.1/rules/post/ptxd_make_world_get.make:17: recipe for target '/home/xxxxxxx/xxxxxxx/xxxxxxx/src/lzo-2.08.tar.gz' failed
Even if I repeat ptxdist get, it stops at the same exact package that fails.
BUT:
If I just use
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.08.tar.gz
it downloads the file just fine, same happens to ANY other package that fails, using the URL that shows up above.
When I run ptxdist get then it moves on to other downloads as it sees the file already there, and then hangs on the next download that failes.
ALSO TRIED:
I also tried to run ptxdist setup and configure the proxy there. Nothing changes in the terminal, so no luck...
ALSO TRIED:
I also wrote a script that takes package names using ptxdist print PACKAGES, then gets the URL using ptxdist package-info <PKG> then downloads the file via wget <URL>, this solved most part of the errors while running ptxdist get as wget works fine, but it seems that there are many other packages that are needed and not listed with ptxdist print PACKAGES...
Any idea what is wrong and what can I do?
Since I'm supposed to automate this task, there is no way manual interaction (for using wget on failing packages) is an option...

How to download Bing Static Map in Linux

I'm trying to download the static map using Bing Maps API. It works when I load the URL from Chrome, but when I tried to curl to wget from Linux, I got Auth Failed error.
The URL are identical but for some reason Bing is blocking calls from Linux?
Here's the commands I tried:
wget -O map.png http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/...
curl -O map.png http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/...
Error:
Resolving dev.virtualearth.net (dev.virtualearth.net)... 131.253.14.8
Connecting to dev.virtualearth.net (dev.virtualearth.net)|131.253.14.8|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
--2016-10-24 15:42:30-- http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/.../12?mapSize=340,500
Reusing existing connection to dev.virtualearth.net:80.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
I'm not sure if it has anything to do with Key Type, I've tried several from Public Website to Dev/Test but still didn't work.
The url needs to be wrapped (because of & symbol in query string that needs to be escaped) with quotes:
wget 'http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/...'
Examples
Via wget:
wget -O map.jpg 'http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/Bellevue%20Washington?mapLayer=TrafficFlow&key=<key>'
Via curl:
curl -o map.jpg 'http://dev.virtualearth.net/REST/V1/Imagery/Map/Road/Bellevue%20Washington?mapLayer=TrafficFlow&key=<key>'
Have been verified under Ubuntu 16.04

http 401.1 error while performing a GIT clone from a Linux server

I'm running TFS 2013 with a GIT team project. When I perform a git clonefrom one of the local Windows servers I don't have any issues:
-bash-4.1$ git clone "http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Main"
Initialized empty Git repository in /home/tfsadm/Mainframe/.git/
but when I perform a git clone from Linux, I get the following error:
error: The requested URL returned error: 401 while accessing http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Mainframe/info/refs fatal: HTTP request failed
Error: The requested URL returned error: 401 while accessing https://github.com/Joey-myproject/repo.git/info/refs fatal: HTTP request failed
is an often reoccuring error.
One of the reasons of this happening is because the client is not authorized to access to that resource.
A general solution is to check for the following:
Do you have a stable git version?
Is the remote correct configured?
If 2FA is enabled, if so provide an access token.
Double check your permissions(username/password in configs) perhaps also try to use the format ' https://username#mydomain.org/project.git''
Try ssh instead of https
I am not sure, but have you already seen this link Can't clone a github repo on Linux via HTTPS?
It can give some extra information.

Linux - Installed Nagios but getting Forbidden 403 error

I have installed nagios successfully on fedora 17. but when I am trying to connect to nagios like http://mylocalhost.com/nagios. It asks for username and password. After putting these information I am found out forbidden 403 error with message , You dont have permission to access /nagios/ on this server.
I am bit confused how to resolve this issue. I read some post. they were saying to create empty index.html inside http root directory. i tried but same error is there.
http://www.unixmen.com/nagios-http-warning-http11-403-forbidden-solved/
If I am not wrong http root directory is /var/www/html?
oops ... sorry it was problem with my httpd service which was running actually but not accessible for publicly.
simply I flushed out iptables. then Checked out httpd service whether it is running properly or not.
Now its working great.
I think you create file index.html in /var/www/html.
After you can restart service nagios and httpd

How to query websphere node status from Linux CLI

Is there a way to verify Websphere Node status from Linux CLI using one of IBM shell scripts?
I've been using this way to get this information from CLI since i did not find a script that does this for me, but i get an 500 error since i did not login yet to DMGR (After login this will result with an answer:
wget "http://ap0tv01tap01ndsw0.ap0tv.tas.att.net:9060/ibm/console/status?text=true&type=node&node=ap0tv01tap02mlsw0"
--2013-07-04 18:00:07-- http://ap0tv01tap01ndsw0.ap0tv.tas.att.net:9060/ibm/console/status?text=true&type=node&node=ap0tv01tap02mlsw0
Resolving ap0tv01tap01ndsw0.ap0tv.tas.att.net... 172.20.31.12
Connecting to ap0tv01tap01ndsw0.ap0tv.tas.att.net|172.20.31.12|:9060... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2013-07-04 18:00:07 ERROR 500: Internal Server Error.
Alternative solution for me could be triggering what Web login triggers to operation system and do it from CLI.
Thanks!
You may use serverStatus command to query status of node agent. You may use both nodeagent as server name as an argument or use -all flag. If security is enabled in your cell don't forget to specify username and password as mentioned in the documentation.

Resources