Running HHVM's "hh_server" tool inside Docker container fails - docker

Running HHVM's hh_server tool in Docker fails with following error:
Fatal error: exception Not_found.
Same tool works fine in the host with same OS (Ubuntu 14.04) and HTTP server (nginx).
Any idea how this might occur?

I had the exact same problem on a Debian image. After talking to a guy at hhvm's IRC channel I got it working by setting the USER environment variable to a username. Apparently hh_server don't work if USER is empty

Related

I can't initialize docker on Windows 10

I installed docker version 20.10.11 on my Windows 10 home with build 19042, the installation was successful, but when running docker, the daemon was not started, so I manually installed wsl2 using this tutorial.
https://nlearn.microsoft.com/en-us/windows/wsl/install
Now when executing any docker command via cli, it shows this message
"Server:
ERROR: error during connect: In the default daemon configuration on Windows, the docker
client must be run with elevated privileges to connect.: Get
"http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/info": open //./pipe/docker_engine: The
system cannot find the specified file.
errors pretty printing info"
I've followed all the tutorials from this link
Docker cannot start on Windows, none of them worked.
When I open the Docker Desktop dashboard, it shows the message docker starting engineer, or something like that, it keeps initializing, but it never finishes initializing.
Virtualization is turned on, when I open processes I notice that docker.service is running and a process called Vmmem, when I look at all the services even the ones that are not running. There's only one, which is the Docker Desktop referring to the docker
Ps: I don't know other programs may be interfering with it, I have an oracle 18cxe database running on my machine, I don't know it's interfering with a network connection or something.
I would like to know how I can get an accurate log, to know what the problem really is, how do I trace this error?

Pycharm attach to process inside a container causes accept timeout

I am using pycharm professional 2021.3.1 and ubuntu 18.04
I can attach to any process running directly on the host
However if the process is running inside a container (no matter what host privileges' I gave it)
I cannot attach. I get the following error
"Connection to python debugger failed Accept timeout'
I Tried on another computer and got the same results
Is this a known issue? Are there any work arounds? Except for using remote debugger (which requires adding extra code to the production code)
I found a way, it is not documented (as far as I can tell) but since it is for debugging only I will continue with it
Pycharm Professional set the IDE like you would for remote debug server
https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#remote-debug-config
In the docker file of the containers that you wish to debug always install:
gdb
pydevd-pycharm
After the container and the process is up go into the container and run
"python3 /usr/local/pydevd_attach_to_process/attach_pydevd.py --port port_set_in_pycharm --pid pid_of_process_to_debug_in_container_id --host ip_of_the_host_running_the_pycharm"
the following is the same command pycharm uses when you do attach to process
now you can put breakpoints and debug normally
Advantage of this solution in contrast to remote debug defined in the pycharm documentation is that we do not have to add code to the production code

"/remote_debugger/vsdbg: not found" and "Failed to launch debug adapter" with docker-compose

I'm getting this error whenever I try to run my project (with docker-compose) and cannot find any solution. I'm really hoping I've just been doing something dumb, so here goes...
I created a simple ASP.NET Core Web App (to test this out as I was having a problem on my "real" project.)
.Net Core 3.1
Visual Studio 16.11.3
Docker Desktop ver 4.0.1 (Docker Engine: 20.10.8)
Scenarios below were tried on both WSL2 and Hyper-V.
Docker itself is running fine, I can use containers no problem.
When I create the project with Docker support, I can run it fine (it creates the container, I can debug, etc)
If I add a docker-compose setup, however, I get the following error popup when I try run my project (from VS)
The only thing I can see in the output window (debug) is this:
The program '' has exited with code -1 (0xffffffff).
To be clear, the build was successful, the container is running in docker, etc.
After much effort, I found a way to get more information by running the following in the VS Command window:
DebugAdapterHost.Logging /On /OutputWindow
I now can see some more detail (in Output - Debug Adapter Host Log) but don't know how to solve it.
The most relevant message (afaik) is
1> ERROR: Debug adapter error output: /bin/sh: 1: /remote_debugger/vsdbg: not found
but here is the full output:
So I'm pretty stumped. I've uninstalled and reinstalled docker countless times, tried every imaginable setting, ensured everything is running with admin privileges, and so on.
In case it helps, here is my debug output from the same run (note how it says vsdbg is found)
Does anybody know what else I can try, or how to get more insight into this?

How to deploy to GlassFish4 instance in Docker through IntelliJ?

I'm currently trying to use IntelliJ to deploy to a local GlassFish instance running in Docker on my Windows 10 box.
I'm following the instructions here on deployment, using the remote server setup.
However, when calling the run command, I get the following error from IntelliJ:
Artifact my-project:war: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: File not found : /opt/glassfish4/glassfish/domains/my-domain/config/C:[PATH_TO_MY_TARGET_DIR]\my-project.war
It seems like it's trying to pass too much of the path when uploading.
Interestingly, I tried this same setup (different IP addy) deploying to a GlassFish instance running in Docker in a local Ubuntu VM, and it has no problem.
Anyone gone down this road?
I have the same problem and contacted JetBrains.
It seems to be a bug in IntelliJ wich will be hopefully fixed quite soon. Here is the link for reference https://youtrack.jetbrains.com/issue/IDEA-180292.

unable to run OpenFOAM docker image

I'm trying to use the OpenFOAM docker image. I installed everything correctly and when I try to run OpenFOAM_Start I get the error:
Started machines may have new IP addresses. You may need to re-run the docker-machine env command.
Error response from daemon: No such container: of_1712
Error: failed to start containers: of_1712
Error: No such container: of_1712
Stopping "default"...
Machine "default" was stopped.
Then I ran docker-machine env command and I got the error:
Error checking TLS connection: Host is not running
I would appreciate if you could help me know what is the problem and how I can solve it.
P.S. Hopefully this is not off-topic. Please let me know if I should ask this question in a different stackexchange.
I found the solution but I'm still not sure what the error above mean. As indicated in the OpenFOAM installation guide, right after installation of the docker image you should run the:
"OF_Create_Env"
shortcut on the Desktop. A shell will open and close automatically,
completing setup of the user working environment. This step is mandatory
only on the first occasion of OpenFOAM for Windows installation.
Then you can run OpenFOAM_Start again and it just works.

Resources