Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jhipster docker setup error - New state of 'nil' is invalid #5950

Closed
1 task
dharmjit opened this issue Jun 19, 2017 · 13 comments
Closed
1 task

jhipster docker setup error - New state of 'nil' is invalid #5950

dharmjit opened this issue Jun 19, 2017 · 13 comments

Comments

@dharmjit
Copy link

Overview of the issue

I am following the jshipster installtion guide at https://jhipster.github.io/installation/ and wants to install it on Docker. When going through first project setup, I am getting below error.

Running default command
Executing jhipster:app --npm
New state of 'nil' is invalid.

Motivation for or Use Case
NA

Reproduce the error
NA

Related issues
NA

Suggest a Fix
NA

JHipster Version(s)

JHipster configuration
/home/jhipster/app
`-- (empty)

cat: no such file or directory: .yo-rc.json

JHipster configuration, a .yo-rc.json file generated in the root folder
Entity configuration(s) entityName.json files generated in the .jhipster directory

ls: no such file or directory: .jhipster/*.json

Browsers and Operating System

openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

git version 2.7.4

node: v6.11.0

npm: 5.0.3

bower: 1.8.0

gulp:
[10:48:58] CLI version 1.3.0

yeoman: 2.0.0

yarn: 0.24.5-

Browsers and Operating System

Windows 7 and Docker version 17.04.0-ce

  • Checking this box is mandatory (this is just to show you read everything)
@jdubois
Copy link
Member

jdubois commented Jun 19, 2017

I'm guessing this is because you typed jhipster:app which is not an existing command :-)

I think you wanted to run jhipster app, or even better just jhipster

@jdubois jdubois closed this as completed Jun 19, 2017
@jdubois jdubois modified the milestone: 4.5.5 Jun 19, 2017
@dharmjit
Copy link
Author

Hi, I used both jhipster --npm and jhipster as mentioned on the installation page and got the above error.

@jdubois jdubois reopened this Jun 19, 2017
@jdubois jdubois modified the milestone: 4.5.5 Jun 19, 2017
@pascalgrimaud
Copy link
Member

I didn't manage to reproduce. It works fine for me (inside the 🐳 container):

jhipster@2d787d3ab7a3:~/app$ jhipster --npm
Running default command
Executing jhipster:app --npm

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

                            https://jhipster.github.io

Welcome to the JHipster Generator v4.5.5
Documentation for creating an application: https://jhipster.github.io/creating-an-app/
Application files will be generated in folder: /home/jhipster/app
? May JHipster anonymously report usage statistics to improve the tool over time? (Y/n)

@dharmjit : as you use Windows 7 and probably Docker Toolbox, I'm pretty sure there is an issue related to the use of Docker with Windows, probably on how you mount the volume

  • what is the command you used to launch your container
  • where is the mounted folder (be sure it's under C:\Users\yourname)
  • what terminal do you use?
    Try to give a maximum of information, so I can try to understand your issue

@jdubois
Copy link
Member

jdubois commented Jun 21, 2017

Closing as this is probably a user misconfiguration, and we don't have enough information to reproduce

@jdubois jdubois closed this as completed Jun 21, 2017
@jdubois jdubois modified the milestone: 4.5.6 Jun 23, 2017
@pcouas
Copy link

pcouas commented Jun 23, 2017

Bonsoir Julien

J'ai exactement le meme soucis
Windows10Pro
Dernierversion de dockerToolBox avec virtualbox 5.1.22
J'ai téléchargé le dernier github ce soir

Puis
docker build -t ijof2 .
docker run -v /c/zpoubelle/dockerFiles/jhipster/ess:/jhipster --name cjof2 -p 8080:8080 -p 9000:9000 -p 35729:35729 -p 4022:22 -p 3306:3306 -t -i ijof2 /bin/bash
lorsque je lance la commande "jhipster" , je me fais sortir du container.
Si tu as besoin que je fasse des tests, c'est possible , je t'ai envoyé un mail il y a deux jours sur ton gmail

Philippe

@jdubois
Copy link
Member

jdubois commented Jun 23, 2017

Please follow the guidelines and use the English language, so that everybody can understand.

@pascalgrimaud
Copy link
Member

plz @pcouas in english

See https://jhipster.github.io/installation/

Warning: If you are using Docker Machine on Mac or Windows, your Docker daemon has only limited access to your OS X or Windows file system. Docker Machine tries to auto-share your /Users (OS X) or C:\Users<username> (Windows) directory. So you have to create the project folder under these directory to avoid any volume mounting issues.

Can you try to put the correct volumes, under your Users folder ?

@jdubois
Copy link
Member

jdubois commented Jun 23, 2017

And yes I got your email @pcouas but that's against our #1 rule of help.
I get tons of emails (even phone calls!) from people seeking for help, I usually don't answer them, I never go around the project rules.

@pcouas
Copy link

pcouas commented Jun 25, 2017

Hi,
Sorry my english is not very well.
On same windows dockers
1 Last Jhipster dockerfiles downloaded yesterday "jhipster --npm" give me "new state of nil is invalid"
2 but, an old jdubois dockerfiles based on jhipster 2.22.0 is Ok on yo jhipster !!
3 i have make too a new installation only with https://jhipster.github.io/installation/ and it's bad !
4 an other test with

  • docker container run --name jhipster3 -v ~/jhipster:/home/jhipster/app -v ~/.m2:/home/jhipster/.m2 -p 8083:8080 -p 9003:9000 -p 3003:3001 -d -t jhipster/jhipster:v3.12.2
    => yo jhipster OK
  • docker container run --name jhipster4 -v ~/jhipster:/home/jhipster/app -v ~/.m2:/home/jhipster/.m2 -p 8083:8080 -p 9003:9000 -p 3003:3001 -d -t jhipster/jhipster:v4.0.0
    => yo jhipster First Y/n then nil on second

I have shared with succes an other directory from virtualbox
I think it's an Encoding problem ! But why in jhipster4 only ??
moby/moby#22345

Regards

@pcouas
Copy link

pcouas commented Jul 2, 2017

Hi
when i make an cd /home/jhipster/generator_jhipster i see my windows directory with dockerfiles ???
Regards

@geosava
Copy link

geosava commented Dec 5, 2017

Hello I am facing the same issue.

I was starting today to "play" with jhipster and to start running the generator on a docker image was a welcomed solution (I did not have to install all those stuff directly to my pc).

So I used the instructions from here: http://www.jhipster.tech/installation/
I am on

  1. windows 10 machine
  2. use Docker community edition Version 17.09.0-ce-win33 (13620) Channel: stable 8c56a3b (could not find toolbox anywhere. I am new in docker stuff too!!!)
  3. I have docker pulled jhipster/jhipster tags latest, v4.11.0 and v3.12.2.

I run the docker container with the command below from windows powershell:

docker container run --name jhipster -v c:/Users/user/jhipster:/home/jhipster/app -v c:/Users/user/.m2
:/home/jhipster/.m2 -p 8080:8080 -p 9000:9000 -p 3001:3001 -d -t jhipster/jhipster:{use its tag}

When running the container with jhipster latest or v4.11.0 when I try to run the jhipster app command in containers app folder I got the error:

New state of 'nil' is invalid.

when I use the v3.12.2 tag strangely I get that there is no command jhipster.
I saw pcouas post above that on v3.12.2 jhipster command works without error.

Everyone has any ideas??

Thanks

@pascalgrimaud
Copy link
Member

@geosava : it's related to your OS and the terminal you use. You can look at this ticket, there are some answers which will help you
moby/moby#22345

Sorry, I can't help more as I don't have Windows Machine

@geosava
Copy link

geosava commented Dec 5, 2017

OK I will check it.
Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants