We have a problem with the URLs returned by the Jenkins search functionality.
Our Jenkins URL is, say, https://example.com/jenkins
Jenkins sits behind a reverse proxy (HAProxy). We've configured HAProxy as follows:
frontend buildserver
bind *:443 ssl crt /etc/ssl/certs/example.com.pem
http-request set-header X-Forwarded-Proto https
http-request set-header X-Forwarded-Host example.com
http-request set-header X-Forwarded-Port 443
acl PATH_JENKINS path_beg -i /jenkins
use_backend jenkins-http if PATH_JENKINS
backend jenkins-http
server jenkins 127.0.0.1:8080
and in /etc/default/jenkins we have:
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --prefix=/jenkins"
In the GUI configuration we have Jenkins URL set to:
https://example.com/jenkins/
Everything appears to work and I can navigate all links in Jenkins with the exception of any search results generated using the search box on the top panel. These search results link to the job/view/etc URL without the "/jenkins/" prefix and therefore don't work.
We have recently upgraded Jenkins and I'm told the search results previously worked.
Has anybody else seen this issue?
Ubuntu, Jenkins 2.289.2
UPDATE: I downgraded to our previous version 2.263.4 but the problem still persists. Inspecting the HTML shows the generated hrefs are relative and unusual, eg:
myjob
I can get it working by editing like this:
myjob
I've also noticed the below search text help appear after a search. I don't see that on other instances of Jenkins I have access to. Is this enabled by configuration / plugin perhaps?
POSSIBLE SOLUTION: so the image above is the nested-view plugin. Issues have been reported with this, eg:
https://issues.jenkins.io/browse/JENKINS-65924
I rolled back the plugin from 1.20 to 1.17 and now have the more familiar search functionality back and working. phew.
Looks like the issue is solved with 1.26 and I haven't had to create a ~/.nestedViewsSearch file.
https://phabricator.wikimedia.org/T294424#8028735
Had the same issue. Downgraded nested-view to 1.19 from 1.21 and search issue went away.
nested-view v1.24 (diff) allows restoring default search behavior by creating a file named ~/.nestedViewsSearch on the Jenkins controller.
This takes effect immediately; it is not necessary to restart the controller.
Related
I am trying to reproduce this git repository with a few tutorial-based lecture notes. This website is basically docker container with npm and yarn technology. It works fine within my network say 10.35.34.35:8000. But, if I use reverse proxy and give it in public say www.abc.xyz.com/tutorial, it is not working. The error is due to an incorrect path that is not recognized by the docker to send the request back.
When the index.html <base href="/"> is changed to <base href="tutorial/"> it is reaching the index.html page properly, but the tutorial elements are not mapped back again.
I get the following error:
https://abc.xyz.com/tutorial/src/tutorial.html 404 (Not Found)
I have tried many possibilities to rectify this error, by changing each elements' absolute path, but none worked efficiently. Could someone suggest an efficient solution to resolve this?
To Reproduce, please follow the following instructions
Download docker in machine
Download the following code from github: https://github.com/canonical-web-and-design/tutorials.ubuntu.com
Run the command ./run serve inside the downloaded folder
Reverse proxy on apache config as follows
ProxyPass /tutorials http://10.35.34.35:8000
ProxyPassReverse /tutorials https://10.35.34.35:8000
Restart apache
I am working on the example from the SymmetricDS tutorial. I am using the configuration files corp-000.properties and store-001.properties found in the samples directory of the download zip. I have placed them in the engine directory and edited them so that corp-000 is using a Postgresql DB as master-000 and store-001 is using an MySQL DB as slave-001, both on separate machine.
Here are the config from corp-000.properties:
engine.name=master-000
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://127.0.0.1/master?stringtype=unspecified
I've also enable the firewall (8080/tcp and 5432/tcp) and changed port from 31415 to 8080: However when the same error still came out and the url returns this result:
This site can’t be reached
<Master-node-IP> refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
What should I do to solve thise problem?
Add to corp configuration
auto.registration=true
Can’t hurt to add
auto.reload=true
Solution by #swm is
The solution is need to set bind ip in symmetricDS
Below are some example configs.
What is happening here is that the main or master cannot see the sync / registration urls and ports not the database.
Make sure the following are setup correctly.
MAIN
registration.url=
sync.url=ttp://<IP>:<PORT>/sync/<SDS_MAIN>
CHILD
registration.url=http://<IP>:<PORT>/sync/<SDS_MAIN>
sync.url=http://<IP>:<PORT>/sync/<SDS_CHILD>
FULL EXAMPLE CONFIGS BELOW
MAIN
engine.name=<SDS_MAIN>
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://<IP>:1433/<DB>;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880
db.user=***********
db.password=***********
registration.url=
sync.url=ttp://<IP>:<PORT>/sync/<SDS_MAIN>
group.id=<GID>
external.id=000
auto.registration=true
initial.load.create.first=true
sync.table.prefix=sym
#start.initial.load.extract.job=false
compression.level=-1
compression.strategy=0
CHILD
engine.name=<SDS_CHILD>
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://<IP>:1433/<DB>;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880
db.user=***********
db.password=***********
registration.url=http://<IP>:<PORT>/sync/<SDS_MAIN>
sync.url=http://<IP>:<PORT>/sync/<SDS_CHILD>
group.id=<GID>
external.id=100
auto.registration=true
initial.load.create.first=true
sync.table.prefix=sym
start.initial.load.extract.job=false
compression.level=-1
compression.strategy=0
Tried gerrit 2.15 and 2.16.6.
I'm trying to migrate an existing gerrit instance to another hardware.
There is an AOSP mirror with old changes and database.
I've moved everything to the new hardware and can see a list of changes and a list of projects, but I can't access any changes themselves. When I click to access some change, I receive 404 not found and a message "Server error: Not found: root-dir".
When I try to create a new project with the name "root-dir/project_path/project_name", I receive the same message.
Cgroups configurations are correct.
Reindexing doesn't help, neither does reinitializing.
Using ssh I can create a project and pull any change I want.
The only difference between configurations is that now we use nginx in front of a gerrit instance.
Why is this happening?
The issue was actually in an nginx configuration.
server {
...
location / {
proxy_pass http://[ipv6_address]:8443/;
...
}
}
The slash at the end caused the issue: should be proxy_pass http://[ipv6_address]:8443;
Issue 1999: creating project with a / will cause an error (404 not found)
Troubleshooting
I want to add openedx cms studio link (currently as http://ipaddress:18010) to somedomain/edx-studio
I have updated
httpd-vhosts.conf file
httpd-app.conf
edx_virtualhosts.conf
cms.env.json
nothing works. any help would be appreciated
The regular approach for this is to use a subdomain for studio. So your final setup looks like https://studio.yourdomain.com
If you are using ansible (recommended), the way to go is to set EDXAPP_CMS_NGINX_PORT: 80 on your server_vars.yml file and run ansible again.
If you are doing the changes manually (not recommended at all) you would have to change /edx/app/nginx/sites-available/cms to make it listen on port 80 instead of 18010. Normally the server_name is set to ~^((stage|prod)-)?studio.* which aleady works but you can change it there.
The manual change is not recomended since running ansible in the future will override you manual changes with whatever ansible has in its variables.
I am having some confusion over configuring Sonar plugin on Jenkins. I went to Manage Jenkins -> Configure System and added Sonar.I am confused about what to put in the Database URL in the Sonar section.
I put
jdbc:mysql://10.4.1.206/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
10.4.1.206 is the node I am connecting to.
However, the port is 3306.
Should I put
jdbc:mysql://10.4.1.206:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true or just leave it like before?
Also, since I am using MySQL, do I need to put com.mysql.jdbc.Driver in the Driver section? It says to leave it blank if I am using embedded default driver.
Please forgive me; this is my first time tampering with both Jenkins and Sonar.
In case you have configured your Sonar to use MySQL, you need to provide both the URL and the driver. The default, embedded database for Sonar is Derby - below you will find a sample of a default sonar configuration:
# Comment the 3 following lines to deactivate the default embedded database
sonar.jdbc.url: jdbc:derby://localhost:1527/sonar;create=true
sonar.jdbc.driverClassName: org.apache.derby.jdbc.ClientDriver
sonar.jdbc.validationQuery: values(1)
So, if you have configured your Sonar to use MySQL, and I can only assume that you had, let's analyze the configuration itself:
The driver that you need to explicitly declare is com.mysql.jdbc.Driver.
Yours URL string looks good to me. According to the MySQL Connect specification:
The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:
jdbc:mysql://[host][,failoverhost...][:port]/[database] »
[?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers.
jdbc:mysql://[host:port],[host:port].../[database] »
[?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
In my current setup the connection is as follows:
jdbc:mysql://localhost:3306/radical_sonar?useUnicode=true&characterEncoding=utf8
I tend to use the port number explicitly in order to avoid confusion rather than anything else - we do have a test MariaDB install running on a different port...
In Manage Jenkins > Configure System, your Sonar-Settings should be as follows:
Database URL should be:
jdbc:mysql://10.4.1.206:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
Driver should be:
com.mysql.jdbc.Driver
If you need more information, you might also want to have a look at your "sonarqube/conf/sonar.properties" File and the following documentation link
http://docs.codehaus.org/display/SONAR/Configuring+SonarQube+Jenkins+Plugin
Good Luck with your configuration!