Unable to create spring boot initialzr project (A org.springframework.web.client.HttpClientErrorException exception has occurred) - windows

I have been following this guide but is unable to create a springboot project:
https://jaxenter.com/playing-with-spring-boot-docker-in-netbeans-ide-127672.html
I get the following error when I'm trying to create a springboot project:
Caused: org.springframework.web.client.HttpClientErrorException: 400 Bad Request; nested exception is
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:590)
at com.github.alexfalappa.nbspringboot.projects.initializr.InitializrService.getMetadata(InitializrService.java:68)
at com.github.alexfalappa.nbspringboot.projects.initializr.InitializrProjectWizardPanel1.getInitializrMetadata(InitializrProjectWizardPanel1.java:122)
[catch] at com.github.alexfalappa.nbspringboot.projects.initializr.InitializrProjectPanelVisual1.construct(InitializrProjectPanelVisual1.java:332)
at org.openide.util.AsyncInitSupport.run(AsyncInitSupport.java:168)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
I'm using the following tools:
Docker toolbox for windows
, NetBeans IDE Build 201701260001
, Oracle VM VirtualBox 5.1.4 (latest version)
, nb-springboot-1.4
Docker seems to run smootly without any problem so I don't think the problem lies there.
On the other hand, netbeans docker services container and images are empty but I'm able to connect to the service.
Docker quickstart terminal:
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Hung\.docker\machine\cache\boot2docker.iso to C:\Users\Hung\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Docker Toolbox\docker-machine.exe env default
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.102
For help getting started, check out the docs at https://docs.docker.com
Start interactive shell
Hung#DESKTOP-7MFR98J MINGW64 ~
$
Update: I was not able to solve the problem, but was able to create spring boot project from http://start.spring.io.

Related

Has anyone also had this status error 255 when running podman?

Is anyone else having this problem when running podman?
I used normally and now when running
podman machine start
this error appears:
Print
I tried to change the podman configuration and increase the resources but I didn't authorize it;
I'm not sure what's going on but here's what I did:
➜ ~ podman system connection list
Name URI Identity Default
podman-machine-default ssh://core#localhost:51014/run/user/501/podman/podman.sock /Users/xxxxx/.ssh/podman-machine-default true
podman-machine-default-root ssh://root#localhost:51014/run/podman/podman.sock /Users/xxxxx/.ssh/podman-machine-default false
➜ ~ podman machine rm podman-machine-default
The following files will be deleted:
/Users/xxxxx/.ssh/podman-machine-default
/Users/xxxxx/.ssh/podman-machine-default.pub
/Users/xxxxx/.config/containers/podman/machine/qemu/podman-machine-default.ign
/Users/xxxxx/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-36.20220918.2.2-qemu.x86_64.qcow2
/Users/xxxxx/.local/share/containers/podman/machine/podman-machine-default/podman.sock
/Users/xxxxx/.config/containers/podman/machine/qemu/podman-machine-default.json
Are you sure you want to continue? [y/N] y
➜ ~ podman system connection list
Name URI Identity Default
At this point I switched to the Activity Monitor and killed the qemu service. Then I ran the following:
➜ ~ podman machine init
Downloading VM image: fedora-coreos-37.20230122.2.0-qemu.x86_64.qcow2.xz: done
Extracting compressed file
Image resized.
Machine init complete
To start your machine run:
podman machine start
➜ ~ podman system connection list
Name URI Identity Default
podman-machine-default ssh://core#localhost:51014/run/user/501/podman/podman.sock /Users/xxxxx/.ssh/podman-machine-default true
podman-machine-default-root ssh://root#localhost:51014/run/podman/podman.sock /Users/xxxxx/.ssh/podman-machine-default false
➜ ~ docker machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Mounting volume... /Users/xxxxx:/Users/xxxxx
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
Hope this helps.

No Ip Address Connecting Docker Toolbox - Mac OX High Sierra

I want to download the Docker Toolbox on my 2017 Macbook Pro with High Sierra. I went to the Docker Toolbox website and downloaded it. I then ran the docker quick install terminal from the installer and then it started running and getting docker and the vm machine on my Macbook Pro. I then notices that it was throwing an error and not giving me an ip address to access the webpage. There was an error with connecting to a vm:
Starting "default"...
(default) Check network to re-create if needed...
(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regenerating TLS certificates
Waiting for SSH to be available...
Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
Error checking TLS connection: Host is not running
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
Error getting IP address: Host is not running
docker is configured to use the default machine with IP
For help getting started, check out the docs at https://docs.docker.com
I tried to run
docker run hello-world
to test it and got another error.
omars-mbp:~ omarjandali$ docker run -d hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
Does anyone know what is going on or what I need to do to get docker to run on my Macbook Pro 2017.

Docker-machine cannot connect to default machine (Windows)

I have problem with using docker-machine after windows update on my Windows 8.1 Enterprise.
I'm using Docker Toolbox 1.12.5. I can run docker with no problem, but after windows update docker-machine cannot connect to default machine.
I can see in VirtualBox that default machine is running, but when I tried to run
docker-machine env default
it gave me "Error checking TLS connection: Host is not running".
When I run
docker-machine ls
I get:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
I found some suggestions to restart default machine so I ran
docker-machine restart default
but it always gives me following error:
Restarting "default"...
Starting "default"...
(default) Check network to re-create if needed...
Error setting up host only network on machine start: C:\Program Files\Oracle\Vir
tualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM --nic
promisc2 deny --hostonlyadapter2 VirtualBox Host-Only Ethernet Adapter --cableco
nnected2 on failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended in
fo not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at lin
e 507 of file VBoxManageModifyVM.cpp
I tried solutions suggested on :
https://www.bountysource.com/issues/29373416-vboxmanage-exe-error-context-lockmachine-a-session-locktype_write-at-line-493-of-file-vboxmanagemodifyvm-cpp
and https://github.com/docker/toolbox/issues/360 without success.
I would really appreciate any suggestions.
Can you try restarting your system and then check?
Docker has released Community and Enterprise edition for docker. I would recommend you to upgrade to community edition and recreate your default machine using below command. They claim to have fixed some bugs in these editions.
docker-machine create --driver virtualbox default
you can add more parameters to above command if you want.

Error setting up docker on Windows

I am trying to set up docker machine on Windows and this problem has annoyed me for a few days.
I downloaded and installed DockerToolbox-1.9.1a on my Windows, so it came with Virtual Box version 5.0.10. After that I ran this command to create my virtual machine:
docker-machine create --driver virtualbox --engine-insecure-registry docker.pre-prod.ss.local:5000 --virtualbox-hostonly-cidr 192.168.99.100/24 mymachine
Here is what I got:
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available... Detecting
operating system of created instance... Detecting the provisioner...
Provisioning created instance... Copying certs to the local machine
directory... Copying certs to the remote machine... Setting Docker
configuration on the remote daemon... WARNING >>> This machine has
been allocated an IP address, but Docker Machine could not reach it
successfully.
SSH for the machine should still work, but connecting to exposed
ports, such as the Docker daemon port (usually :2376), may not
work properly.
You may need to add the route manually, or use another related
workaround
This could be due to a VPN, proxy, or host file configuration issue.
You also might want to clear any VirtualBox host only interfaces you
are not using
The machine was created successfully. So I ran the docker-machine env command:
docker-machine env --shell=powershell mymachine| Invoke-Expression
and I got:
Error running connection boilerplate: Error checking and/or
regenerating the certs: There was icates for host
"192.168.99.100:2376": dial tcp 192.168.99.100:2376: connectex: No
connection target machine actively refused it. You can attempt to
regenerate them using 'docker-machine regenerate-certs name'. Be
advised that this will trigger a Docker daemon restart which will stop
running containers.
Running docker version returned
Client: Version: 1.9.1 API version: 1.21 Go version:
go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC
2015 OS/Arch: windows/amd64 An error occurred trying to connect:
Get http://localhost:2375/v1.21/version: dial tcp connection could be
made because the target machine actively refused it.
Can someone help to point out the direction to fix this issue? It is really troublesome to set up docker on Windows. Thank you very much.
I use docker 1.9.1 on Windows (7, 8 and even 10), but without docker registry, and without using --virtualbox-hostonly-cidr.
If you are to use that last option, check "Set a specific address ip when i create a docker container", where I mention issue 1709, which uses cidr in .1, not .100 (but getting a .100 ip address as a result):
docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.99.1/24" m99
If there's no other machine with the same cidr (Classless Inter-Domain Routing), the machine should always get the .100 IP upon start.

docker-machine fails to start host

I've recently installed docker toolbox (OS X) on my computer and although I have it working on my other laptop fine, it doesn't seem to work properly on this one. After installing using docker toolbox and launching via the docker command line tool (as per the docker docs). I get a host is not running error for some reason?
Machine default already exists in VirtualBox.
Starting machine default... exit status 1 Started machines may have new IP addresses. You may need to re-run the docker-machine env command. Setting environment variables for machine default...
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
host is not running docker is configured to use the default machine with IP For help getting started, check out the docs at https://docs.docker.com
default is not running. Please start this with docker-machine start default
Trying docker-machine start default also fails to start the host:
bash-3.2$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Stopped
bash-3.2$ docker-machine start default
exit status 1
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
bash-3.2$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Stopped
This seems to be an issue compatibility with Virtual Box 5.0.
Try the solutions mentioned here in this Github issue.
Docker not installing correctly

Resources