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

Error while installing from dockerfile #378

Open
catabram opened this issue Oct 19, 2023 · 11 comments
Open

Error while installing from dockerfile #378

catabram opened this issue Oct 19, 2023 · 11 comments

Comments

@catabram
Copy link

catabram commented Oct 19, 2023

Hi!

I'm getting an error while installing mercury from docker file from https://github.com/mljar/mercury.git
using instruction https://runmercury.com/docs/docker-compose/, could you pls help?

Step 8/17 : RUN mamba install --yes python=3.8 --file mercury/requirements.txt -c conda-forge
 ---> Running in 5b4b3355f24a                        
Traceback (most recent call last):                   
  File "/opt/conda/bin/mamba", line 7, in <module>   
    from mamba.mamba import main                     
  File "/opt/conda/lib/python3.11/site-packages/mamba/mamba.py", line 44, in <module>
    import libmambapy as api                         
  File "/opt/conda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
    raise e                                          
  File "/opt/conda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                
ImportError: /opt/conda/lib/python3.11/site-packages/libmambapy/../../../libmamba.so.2: undefined symbol: solver_ruleinfo2str, version SOLV_1.0
ERROR: Service 'mercury' failed to build: The command '/bin/sh -c mamba install --yes python=3.8 --file mercury/requirements.txt -c conda-forge' returned a non-zero code: 1

System: CentOS 7

@pplonski
Copy link
Contributor

Hi @catabram,

Did you manage to solve the issue? Do you have more logs?

@catabram
Copy link
Author

Hi Piotr!

No, haven't managed yet, but found some relevant info in mamba: https://mamba.readthedocs.io/en/latest/user_guide/troubleshooting.html#libmamba-so-2-undefined-symbol. It seems some conflicts with default mamba & conda-forge, tried recepy from here, as well python 3.8 not working now.
Tried with python 3.10, got this
image
and errors in network:
image

@pplonski
Copy link
Contributor

Thanks for response @catabram, looks like server is working because you have screenshot with API viewer. It is a good sign. Have you customised nginx configuration? Are you able to attach your nginx config? Because it looks like frontend is not displayed, which might be caused by improper nginx config.

@catabram
Copy link
Author

@pplonski Hi! There's nginx config (I have external one insead of included in docker):

server {
  listen  80;
  server_name mercury.----host----;
  return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name mercury.----host----;
    server_tokens off;

    ssl_certificate /etc/nginx/ssl/mercury.----host----/fullchain.pem;
    ssl_certificate_key /etc/nginx/ssl/mercury.----host----/privkey.pem;
    ssl_trusted_certificate /etc/nginx/ssl/mercury.----host----/chain.pem;

    client_max_body_size 20M;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }

    location /api {
        try_files $uri @proxy_api;
    }
    location /admin {
        try_files $uri @proxy_api;
    }

    location @proxy_api {
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Url-Scheme $scheme; 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass   http://----host----:9010;
    }

    location /ws {
        try_files $uri @proxy_ws;
    }

    location @proxy_ws {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_redirect off;
        proxy_pass   http://----host----:9010;
    }

    location /django_static/ {
        autoindex on;
        alias /var/lib/docker/volumes/mercury_static_volume/_data/;
    }
    
    location /media/ {
        autoindex on;
        alias /var/lib/docker/volumes/mercury_media_volume/_data/;
    }
}

@pplonski
Copy link
Contributor

Thanks for nginx config. In the screenshot you are using port 9010, in ngnix you are not setting this port ... Is it working without port number?

@boryakbrk
Copy link

boryakbrk commented Oct 30, 2023

@pplonski Hi! The container with mercury listens to port 9010 which is proxied to port 9000 inside the container. In our environment, port 9000 is already occupied, and we use an external nginx balancer.

I believe there have been changes in the python dependencies that can no longer be installed on python version 3.8. For the same reason, mercury is not working properly.

@pplonski
Copy link
Contributor

You might be right, I have reports from that docker is not working with 3.8 #385

@pplonski
Copy link
Contributor

I've updated the Dockerfile, please check #385.

@boryakbrk
Copy link

I've updated the Dockerfile, please check #385.

I applied these fixes initially, we still see the broken mercury interface. There are no errors in the container logs.

@pplonski
Copy link
Contributor

Please double check your nginx configuration. Have you changed the port number in docker entrypoint script https://github.com/mljar/mercury/blob/main/docker/mercury/entrypoint.sh (line 37).

@catabram
Copy link
Author

Hi,
port set to 9010 at this line

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

No branches or pull requests

3 participants