Cannot access changes and create projects - gerrit

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

Related

SymmetricDS Sample - client node refused to connect to server node

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

The requested page cannot be accessed because the related configuration data for the page is invalid. (with a "catch"...)

Another user in my organization put a folder with source code on a central server. I copied the source code to my local machine and when I try to run the application in VS on my local machine I get the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070005
Config Error Cannot read configuration file due to insufficient permissions
Config File \\?\UNC\...\users\username\My Web Sites\Website1\web.config
The issue is with the file location of the problematic .config file:
\\?\UNC...\users\username\My Web Sites\Website1\web.config
This location does not exist on my local machine. I have confirmed with the other user that it does exist on his machine - so it appears that the application is referencing a file location that simply does not exist. My suspicion is that there is some kind of folder/cache that needs to be cleared out, but I don't know what to do in this situation. Any ideas?
Ended up actually finding a duplicate question with an answer regarding deleting an applicationhost.config file and then recreating it in VS:
HTTP error 500.19 - Cannot read configuration file

Grails create-app unable to find valid certification path to requested target

I have setup grails 3.2.1. on windows JAVA_HOME and GRAILS_HOME is also set. verified by running grails -version and worked as expected.
But when issue command to create app, it always throw following error
"Error occurred running Grails CLI: unable to find valid certification path to requested target (Use --stacktrace to see the full trace)".
I tried it by disconnecting the internet and come to know its trying to connect to https://repo.grails.org
It seems that some certificates must be in JAVA_HOME/jre/lib/security/cacerts. with this thought I downloaded the SSL certificates from https://repo.grails.org by accessing the URL in browser.
same certificates imported in the JAVA_HOME/jre/lib/security/cacerts but still no change.
I could not find even a single related post over the internet.
when creating Grails app in Netbeans 8, I get the same error.
I don't know if I need any other valid certificate or there is any other problem.
Many thanks in advance for any help on this.
Use the "HTTP version" repository
Add the following configuration in USER_HOME/.grails/settings.groovy:
grails {
profiles {
repositories {
myRepo {
url = "http://repo.grails.org/grails/core/"
}
}
}
}
This problem is due to proxy server. i traced the network log. https://repo.grails.org resolves to proxy ip, I guess, because when i access the ip over htps in browser it presents me a certificate which really not in my keystore, when i add the same in my keystore an "host name mismatch error" is thrown instead of "unable to find valid certification path to requested target".
i tried to run this at my home pc and it worked though there are other issues but good to go with next step to work on Grails.
Thanks

localhost refused to connect Error in visual studio

I have copied my solution file from another system and tried to run it on my machine:
For this, I have gone to the project folder and deleted the previous solution file and copied the new one.
Now, it started giving me error. connection refused etc. So, I got one solution from here: How to solve ERR_CONNECTION_REFUSED when trying to connect to localhost running IISExpress - Error 502 (Cannot debug from Visual Studio)?
According to it, I changed the port number from 1049 to 1052. It loaded and one of the pages gets loaded.
But when I entered the desired login credentials then it redirected to the older port again, like this:
http://localhost:1049/Home/SearchFlight
and the error is:
This site can’t be reached
localhost refused to connect.
Search Google for localhost 1049 Home Search Flight
ERR_CONNECTION_REFUSED
Now, I don't know what to do from here. I have changed the port number to 1052 but still its pointing to 1049. What should i do now?
I had a similar issue. Try this and it should work
Go to your project folder and open the .vs folder (keep your check hidden item-box checked as this folder may be hidden sometimes)
In the .vs folder open the config folder
See that applicationhost.config file there? Delete that thing. (Do not worry it will regenerate automatically once you recompile the project.)
Usually on local machine we are getting errors like This site can't be reached localhost refused to connect because we have self signed certificate configuration broken for local IIS Express. Sometimes it happens when you change URLs in launchSettings.json or never configured self signed certificates on this machine at all.
To fix self-signed certificate on the local machine you need to: 
Delete .vs folder (requires to close Visual Studio 2017)
Run these commands in cmd As Administrator:
cd "C:\Program Files (x86)\IIS Express"
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:12345/ -UseSelfSigned
Make sure you run VS2017 As Administrator and check if the issue addressed
Note: https://localhost:12345/ is what is in your launchSettings.json for HTTPS
Changing port number has resolved the issue
Just Delete the (obj)Object folder in project folder then Run the application then It will work fine.
Steps:
Right Click on the project folder then select "Open folder in file Explorer".
Then Find the Obj folder and Delete that.
Run the Application.
Unfortunately, none of these answers worked for me. This answer finally did for Chrome only. Unfortunately, you have to do it each time:
Open this in your browser: chrome://net-internals/#hsts
Go to Delete domain security policies
Enter "localhost"
Restart browser
Google Chrome redirecting localhost to https
I had the same problem. Deleting .vs folder (including all contents, folder might be hidden) worked for me.
I solved a similar problem by listing bound IP addresses in a cmd window running as admin:
netsh http show iplisten
Then, one by one, blowing them all away:
netsh http delete iplisten ipaddress=127.0.0.200
netsh http delete iplisten ipaddress=127.0.0.2
...
In my case, I need to update "publishAllPorts" = false in .Net 5 MVC project's launchSettings.json.
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": false
}
I ran my Visual Studio as "Run as administrator" and this solved my problem.
Go to control panel > Programs and feature > IISExpress > Repair
If found it was because I had been messing about with netsh http add commands to get IIS Express visible remotely.
The symptoms were:
the site would fail to connect in a browser
the site would fail to start (right click IIS Express in the Taskbar and it was missing)
if I ran Visual Studio as admin it would start in IIS Express and be visible in the browser
The solution was to list all bound sites:
netsh http show urlacl
then delete the one I had recently added:
netsh http delete urlacl url=http://*:54321/
In addition I had removed localhost from the hidden solution folder file .vs\config\application.config for the site:
<bindings>
<binding protocol="http" bindingInformation="*:54321:" />
</bindings>
so had to put that back:
<bindings>
<binding protocol="http" bindingInformation="*:54321:localhost" />
</bindings>
This happened to me in VS2017 v 15.6.7 using .net core 2.0.
When the project first launched it created an SSL Cert for localhost and started fine. When I disabled SSL I kept getting this issue.
Apparently when you disable SSL the port numbers are changed and not all of the port numbers get changed to the new port. Make sure port numbers on Debug are all the same number.
I was having this issue and solved it by closing all open instances of Visual Studio.
Open cmd as administrator and run this command:
netsh http delete iplisten ipaddress=xxx.xxx.x.xxx
ipaddress is your private ip.
This worked for me.
I faced this annoying problem all the time in my Visual Studio MVC application especially when you start your work in the morning. Many solutions in this thread works sometimes; but there were many times none of this solves my issue.
At last I figured out only a combination of these steps works for me. Hope this helps somebody.
Close VS.
Delete .vs folder under your solution. Don't worry, it will be automatically created when you open the solution again.
Delete bin and obj folders.
Delete your cookies from the browser that you use to debug the application.
Delete the *.csproj.user file located in the project folder.
Open your startup project file (*.csproj) in Notepad++ or your favorite editor. Go towards the end of the file and delete below 3 lines that contains the local development port info. Don't worry it will be recreated on running the solution again.
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:60573/</IISUrl>
Open your solution again, clean, build and run it. You should be good to go. If this don't work, restart your machine after step 6.
For this to work for me, all I had to do was recreate the virtual directory. I had re-installed Windows and then pulled the project back out of Git. To do this, right-click on the solution project and choose Properties, then go to the Web tab and click the Create Virtual Directory beside the Project Url.
I hope this helps someone else too!
Bud
Project properties> Web > Create Virtual Directory worked for me
Right Click on Project >> Properties >>
Select Web Tab >> Under server Select "Use Visual development server"
so indirectly it will uncheck "Local IIS Server"
Hope so it may resolve this issue.
Change the port number and remove script debugging (if enabled) to resolve in localhost.
I've tried everything but nothing worked, but this did.
If you can debug on local IIS instead of Express, change the configurations as shown in the image below. Do not forget to click on "Create virtual directory"
rebooting the machine was the only thing that worked for me
I recently ran into this exact problem and tried most of the suggestions but it turns out my problem was something different.
Our application has a section that redirects you to HTTPS if you are on HTTP (yes, I know there are better ways but this is legacy). In addition, there is special handling of localhost when you are in dev mode which redirected you back to HTTP, though I don't know why.
I have a new requirement that requires testing in HTTPS.
On a normal web page, changing http:// to https:// and calling Redirect would work fine but in IISExpress you are using custom ports. So for example, if you are on https://localhost:44300 you can't just switch to http://localhost:44300 b/c that port only serves https, not http.
So, if you are having this problem and you've cleared the config files and it didn't help, check your code for redirects. you might have something using a hardcoded or partially hardcoded url or a url from a config file that you haven't updated to https.
Update:
I also suggest clearing all .suo and .user files and someone else suggested clearing the obj/ folder. I suggest doing this with VS closed and then restarting. I had a lot of trouble with values for ports being cached when i tried to setup https:// and change ports. I also suggest trying this suggestion to check that the SSL port is within the correct range, though I don't know if that is still a requirement https://stackoverflow.com/a/24957146
In my case, Visual Studio 2017 > Tools > Options
In Debugging menu in the side list find Edit and Continue
Uncheck the Enable Edit and Continue check box
This resolves my problem.
Same problem here but I think mine was due to installing the latest version of Visual Studio and having both 2015 and 2019 versions running the solution. I deleted the whole .vs folder and restarted Visual Studio and it worked.
I think the issue is that there are multiple configurations for each version of Visual Studio in the .vs folder and it seems to screw it up.
Sometimes https and http ports can be same because if two tags are given same ports
IISExpressSSLPort and DevelopmentServerPort
Make sure these two ports have different ports
then in IISUrl use your default port either HTTP or HTTPS
https://localhost:44365
For HTTPS Use IISExpressSSLPort
For HTTP Use DevelopmentServerPort
Then you may delete hidden .vs folder in solution folder
Try deleting cookies for your localhost
My problem turned out to be a property which called itself:
Once I fixed this, the misleading connection error message disappeared.
None of these solutions worked for me. I'm not 100%, but I think my issue might have been with running the same project on the same port from multiple branches. That used to be an issue for me on Local IIS --- I'm not sure if that's also an issue on IIS Express. What worked for me was following this solution:
https://stackoverflow.com/a/27033934/2133723
Which says to go to:
File -> Open -> Web Site...
and remove the relevant projects. After this, I was able to run the project without changing the port.
Prior to doing this, I had followed the other solutions posted on this question (which didn't help me), such as deleting the .vs folder, so I'm not sure if that would be a necessary step prior to removing the website from File -> Open -> Web Site....
Like Donny V. this happened to me in VS2017 using .net core 2.0.
When the project first launched, VS displayed a dialog, offering to create an SSL Cert for localhost - but I didn't want to use SSL, so I stopped running and went into Project Properties and disabled SSL (a checkbox that can be cleared). After doing that I kept getting the issue described.
After trying many things what actually resolved the issue for me was editing the launchSettings.json file located under [ProjectName]/Properties - it's accessible from Solution Explorer.
When the editing was complete, the contents looked like this (where 12345 is a Port Number, and where MyNETCoreApp is the name of the project).
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:12345/"
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "http://localhost:12345/",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyNETCoreApp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:12345/"
}
}
}
The edits I made were:
Updated the Port Numbers so they were all the same number
Removed a key:value of ssl:0 in one spot
Updated all https:// instances to be http://
I had to add https bindings in my local IIS

Cassandra fails to initialize with error "Cannot add table 'role_members' to non existing keyspace 'system_auth'"

I am running a Cassandra cluster in Docker containers using fleet for management. I am able to get the cluster up and running, but if I bring the units down with fleet and then back up again, the containers fail. The Cassandra logs has this entry on the second start.
Cannot add table 'role_members' to non existing keyspace 'system_auth'.
Fatal configuration error; unable to start server. See log for stacktrace.
INFO 20:59:34 InetAddress /172.17.8.102 is now DOWN
ERROR 20:59:34 Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Cannot add table 'role_members' to non existing keyspace 'system_auth'.
at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:284) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:275) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.StorageService.maybeAddTable(StorageService.java:1046) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.StorageService.doAuthSetup(StorageService.java:1034) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:967) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:698) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:581) ~[apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:291) [apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:481) [apache-cassandra-2.2.0.jar:2.2.0]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:588) [apache-cassandra-2.2.0.jar:2.2.0]
I can't find any information on this particular error, and I really have no idea why it's happening. The closest information I can find is that the system_auth table needs to be configured specially if you are not using the default AllowAllAuthenticator, but I am using this. I haven't changed it in the cassandra.yaml file.
Does anyone know why this might be happening?
Is it possible that you are using CassandraAuthorizer without using PasswordAuthenticator? I think that might not work and cause this particular error.
system_auth is not applicable to AllowAllAuthenticator, you need to use PasswordAuthenticator instead. If you configure cassandra.yaml in the following way:
authenticator: PasswordAuthenticator
authorizer: CassandraAuthorizer
And then restart cassandra, it should create the system_auth keyspace for you. If you don't want to set up authorization, you can always use AllowAllAuthorizer instead. More information can be found here.
This turned out to be a rather unique configuration issue I had. I was mapping /var/lib/cassandra on the host to /var/lib/cassandra inside my docker container. But I was also inadvertently mapping /var/lib/cassandra/data to an auto-generated Docker directory on the host. As such when I stopped and restarted the containers, the data directory would disappear and Cassandra would fail as it tried to recreate data from the commitlog directory.
I got the problem just following the Datastax "Initializing a multiple node cluster (single data center)" tutorial.
I solved the same problem deleting the whole content of /var/lib/cassandra and not only the content of /var/lib/cassandra/system/
Why?
I think Kris got the real problem source: when restarting, the C* service found the commitLog full and recovered by trying to reconstruct the commits found there, failing due to a different configuration and a different table structure...

Resources