neo4j-devtools / neo4j-desktop

The Neo4j Graph Platform, on your desktop OS.
19 stars 1 forks source link

Database fails to start or create in Windows10 Neo4j Desktop #40

Closed MiroslawLekowski closed 5 years ago

MiroslawLekowski commented 5 years ago

Hey!

I have a problem with running my existing DB or creating a new one in Neo4j Desktop. Issue occurred to me for the first time on 24.11.2018. I'm getting these error messages:

Database failed to start: DB [database-44d4fb4d-395d-4706-98cd-2f0dabf4944e] 'v3.4.10' exited with status 'KILLED'. Check the logs
Database failed to create: Error: Could not change password

It seems that something changed recently (maybe with some Win10 or other programs updates?) because everything worked a few days ago (it surely did on 18.11.2018) and I can't work on Neo4j DBs for three days now.

Once the problem started to occur, I tried to upgrade my DB's Neo4j Distribution from 3.4.8 to 3.4.10, update Neo4j Desktop to 1.1.12 (from 1.1.10, I think), reinstall Neo4j Desktop, restore system (Win10) to the state from 16-Nov-18 (however Restore Operation failed and there were no changes), change Database Password in Project > Graph > Administration, run Neo4j Desktop as administration - nothing worked out. I also tried to look for the solution in the internet, however couldn't find anything that would help.

I'm providing Neo4j Desktop logs starting from [2018-11-18 12:33:39] up to now. Can reproduce isolated logs from running and creating DBs etc., but you can find single session inside the attached log (e.g. starting from [2018-11-26 21:27:29.159] timestamp: running app, trying to start existing DB, trying to create a new DB, exiting the app): log.log

I would be glad to find some help as this issue blocks me from working on my diploma app :neutral_face:

Environment

Program Version
Operating system Windows 10
Neo4j Desktop 1.1.10, 1.1.12
Neo4j Distribution 3.4.8, 3.4.10 Enterprise
Java 8 Update 191 (64-bit)

Note

I'm not if it might be relevant, but I temporarily switched to old Neo4j Community Edition 3.2.6 that I have still installed on my PC. Fortunately it allows me to work on my diploma app (although the used database is a bit outdated and doesn't support everything).

M.

jexp commented 5 years ago

@Metaur ^^

Metaur commented 5 years ago

hmm, the logs say that the Neo4j Admin script has exited with 3221225477 code. @MiroslawLekowski Could you please try running ./neo4j-admin.bat set-initial-password <your password here> manually?

MiroslawLekowski commented 5 years ago

Hey! I've tried to do it on the particular DB via cmd as can be seen in the attached screenshot: 2018-11-28 21-50

I ran the command with both opened and closed Neo4j Desktop as I wasn't sure whether it worked. One time it looked like the process looped somewhere or waited for the right input, another similarly but after pressing some key it allowed me to continue to enter next command, yet another time it lasted a few seconds only. However I still cannot start the DB through the Neo4j Desktop.

@Metaur, I just saw that there is a 1.1.13 version available. Should I download it, hoping to solve the problem or should I waited for you to investigate?

Metaur commented 5 years ago

The new version won't solve your issue @MiroslawLekowski ... Sorry about that.

Thanks for trying the proposed command. It seems that the issue here is not in Desktop, but in the scripts neo4j provides... The Normal set-initial-password should be Successfully changed a password for neo4j.

Metaur commented 5 years ago

@MiroslawLekowski Would you like if I construct a more specific command for you to try in the command line, to check if Desktop is capable of running neo4j database on your machine?

MiroslawLekowski commented 5 years ago

@Metaur Yes, please. Let's try it.

I will just add that the thought regarding the problem with the Desktop itself came to me from the fact that I couldn't create a new DB as well.

Metaur commented 5 years ago

@MiroslawLekowski please navigate to your unzipped graph folder (can be found in .Neo4jDesktop folder by default). inside there execute this command in cmd

java -cp "C:\Users\<username>\.Neo4jDesktop\neo4jDatabases\<db-id>\installation-<version>\lib\*" -server "-Dfile.encoding=UTF-8" org.neo4j.commandline.admin.AdminTool set-initial-password <password>

all the parts of the command wrapped in < and > - replace with your system-specific data

MiroslawLekowski commented 5 years ago

@Metaur Before I run the command in cmd I'd like to make sure. By unzipped graph folder you've meant this one?

C:\Users\<username>\.Neo4jDesktop\neo4jDatabases\<db-id>\installation-<version>\data\databases\graph.db\*

You've wrote that it can be found in .Neo4jDesktop folder by default, and the path I provided above technically is in that folder, but the mention of it kinda confused me and I started to worry that maybe I'm referencing to the wrong directory. (This may seems like a silly question, but once I thought this doubt, it's a bit hard for me to get over it).

There's another thing that puzzled me. Does provided command mean that in the ...\lib\* directory java program Executable (Jar) File will be executed with the provided attributes? If so, the puzzling thing is that I don't see the file named 'java' in this directory.

Metaur commented 5 years ago

@MiroslawLekowski sorry for any confusion I made :( the proposed command includes the example of a path, where a Neo4j instance could live in (by default if you haven't changed that in Desktop). As I see in the screenshot from your message above, you should be using that particular path (C:\Users\Swirex\.Neo4jDesktop\neo4jDatabases\database-44d4fb4d-395d-4706-98cd-2f0dabf4944e\installation-3.4.10\). So run the provided command from there.

Java should be installed on your machine, as you have mentioned its version in the first message. No java files should be present in Neo4j instance folders, because that's the executable available globally on your system.

MiroslawLekowski commented 5 years ago

@Metaur I've ran the command in the directory provided in your last comment. Got Changed password for user 'neo4j' in return. After that I tried to start the DB - with no success. (Didn't expect to have the problem solved yet but still wanted to try :-)).

Metaur commented 5 years ago

@MiroslawLekowski alright. so I'm glad the command works. Now we know that is a problem with your cmd or powershell. If you are desperate to use Desktop, I'd suggest hiding a powershell executable from your system. Just run where powershell in cmd and it should print out the path where powershell executable is held. You could just rename that somehow, Desktop then would switch to alternative ways of running scripts.

If that is too extreme for you, I'd suggest investigating this issue further. Have you tried to create graph of an older version (3.2.x)?

MiroslawLekowski commented 5 years ago

@Metaur Renaming powershell sounds like a pretty extreme thing to me. I guess that it's not a change that would be needed only for a moment and could be restored after attempt? I don't know how many things may use powershell.

I was using Neo4j Community Edition for quite some time, accessing DB via web browser. I wouldn't say Neo4j Desktop is needed, although using Neo4j Bloom or easy managing plugins looked useful (haven't used them yet, though).

After your suggestion I tried to create (in Neo4j Desktop still) graph of 3.2.6 version and got distribution download error: neo4j graph v 3 2 6

Then I tried to another one of v. 3.2.13 and once again got:

Database failed to create: Error: Could not change password

What do you suggest to do next? Rename powershell for a moment (shouldn't be a problem to switch the name only for a test?; leaving it, however, doesn't sound too good to me) or look for some other solutions?

(I'd like to add that I'm really thankfull for you trying to help me with this. I hope we will find something to address the issue that occurred unexpectedly).

Metaur commented 5 years ago

@MiroslawLekowski well, the issue totally looks like the cmd/powershell faulty setup of yours. Maybe that got broken after the Windows update, not sure. Might suggest looking into this.

Anyway, you could try renaming powershell executable for a test, just to be sure that this issue is related to that.

MiroslawLekowski commented 5 years ago

@Metaur I tried to rename the powershell executable but to no avail. It seems it's secured on Win10 :/ Only TrustedInstaller has rights to edit the file. I didn't find a way to do override this. Any other ideas? Maybe we can somehow force Neo4j not to use the powershell (a config entry or something like that)?

I can also look for some way to for example force update the powershell, if the problem might be related to its setup / configuration?

Metaur commented 5 years ago

@MiroslawLekowski Can't figure out what to suggest you further. I've registered a task for a development team to make a setting to avoid using powershell for running neo4j processes. Can't tell the estimates at the moment, as we have a planned scope for next release.

Meanwhile, you could look into how to update/reinstall/fix powershell on your machine. It's definitely the configuration of powershell, as you said everything worked fine some time ago.

Metaur commented 5 years ago

@MiroslawLekowski you could also try to run neo4j-admin.bat -v set-initial-password <your password here>, this command should print more verbose logs

JoeHuffman commented 5 years ago

I have the same problem on both Windows 10 and Windows 7. This is a blocking issue going forward for our team. We are using version 3.30 but would like to upgrade.

JoeHuffman commented 5 years ago

I can now create a new graph and use it.

As administrator I went into C:\Program Files (x86)\Java\jre1.8.0_201\bin. I created a new directory "server". I copied all the files in "client" into "server".

MiroslawLekowski commented 5 years ago

Hello, again! Just for your information... Issue still occurs to me but as I had no time to investigate it further, I temporarly sticked to Neo4j Community Edition 3.2.6 for my engineering project.

Recently I tried to run db via Neo4j Desktop again (don't remember the version, probably last I'd mentioned somewhere in the issue). Today I also reinstalled it with use of my old neo4j-desktop-offline-1.1.10-setup.exe installer I used long time ago (when the app was working), for all users - still to no avail.

I also wanted to try the newest version, 1.1.14, however Avast was blocking me because it found some FileRepMalware threat when I tried to run Neo4j Desktop.exe.

Maybe in two weeks I'll be able to investigate it more but for now probably I won't be helpful.

smkarber commented 5 years ago

I can now create a new graph and use it.

As administrator I went into C:\Program Files (x86)\Java\jre1.8.0_201\bin. I created a new directory "server". I copied all the files in "client" into "server".

This worked for me. Why is this a thing?

GuillaumeVGeo commented 5 years ago

Many many thanks this worked for me :

As administrator I went into C:\Program Files (x86)\Java\jre1.8.0_201\bin. I created a new directory "server". I copied all the files in "client" into "server"

Many things that did not work, now work :-)

Metaur commented 5 years ago

@GuillaumeVGeo @smkarber @JoeHuffman @MiroslawLekowski I'm here just to let you know, that we have released a new version (1.1.17) of Neo4j Desktop. This Version includes many fixes, especially the one with Java issue. Now Desktop uses its own bundled jdk to start the neo4j instance

silviaegt commented 3 years ago

@Metaur where can I find that version? I have Neo4j Desktop 1.4.5 in Microsoft Windows 10, I tried @JoeHuffman's solution but it didn't work :(

nglgzz commented 3 years ago

@silviaegt this thread is quite old, and lots of changes have happened in this area since 2019, so it's likely that neither the issue nor solution mentioned here are relevant to the problem you're seeing.

We recommend posting in the community forum to get help with these kinds of issues https://community.neo4j.com/c/neo4j-graph-platform/desktop/75

maitreymmt commented 3 years ago

I am using windows 7. Powershell version was old. I have updated powershell and tried again. It works. Thanks for solution.

mwarhead commented 1 year ago

I installed Neo4j Desktop 1.5.8 on Windows 10 Pro, "Movie DBMS" was created but couldn't start, after 8 hours of searching, I figure out that Powershell 5.1 didn't allow Neo4j server to run, so here what I did to run it successfully: 1- Install Java JDK. 2- Click ( Windows button + R ). 3- Write "gpedit.msc" and click Enter. 4- Goto "Administrative templates > Windows components > Windows PowerShell > Activate scripts execution". 5- At this property activate the script execution, I selected "Allow all scripts", it's not good for security, you can try other options. 6- Restart Neo4j Desktop.

These steps can help someone who has same issue.