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

MeTube Webpage not working on Portainer #337

Closed
vishalkrv opened this issue Nov 5, 2023 · 5 comments
Closed

MeTube Webpage not working on Portainer #337

vishalkrv opened this issue Nov 5, 2023 · 5 comments

Comments

@vishalkrv
Copy link

Running the application on Portainer and the container is up without any error however the web page is not coming up.

Docker Compose

version: "3"
services:
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
      - 'YTDL_OPTIONS={"add-metadata":true}'
    volumes:
      - /mnt/passport/youtube:/downloads
    ports:
      - 9995:8081
    restart: unless-stopped

Log

Setting umask to 022

Creating download directory (/downloads), state directory (/downloads/.metube), and temp dir (/downloads)

Changing ownership of download and state directories to 1000:1000

Running MeTube as user 1000:1000

INFO:main:Listening on 0.0.0.0:8081

DEBUG:asyncio:Using selector: EpollSelector

INFO:ytdl:waiting for item to download

I ran the ping command from within the container and below is the error

/app # ping www.google.com
ping: bad address 'www.google.com'
/app # 
@PikuZheng
Copy link
Contributor

??? mine works fine
image

@PikuZheng
Copy link
Contributor

PikuZheng commented Nov 5, 2023

Log

Setting umask to 022

Creating download directory (/downloads), state directory (/downloads/.metube), and temp dir (/downloads)

Changing ownership of download and state directories to 1000:1000

Running MeTube as user 1000:1000

INFO:main:Listening on 0.0.0.0:8081

DEBUG:asyncio:Using selector: EpollSelector

INFO:ytdl:waiting for item to download

it looks works fine. use http://yourPortainerIP:9995/

I ran the ping command from within the container and below is the error

/app # ping www.google.com
ping: bad address 'www.google.com'
/app # 

it looks like some issue of network. please go to networks in portainer and check which network is using for metube

@gnattu
Copy link

gnattu commented Nov 6, 2023

I'm concerned that this issue may be affected by the notoriously bad DNS compatibility problem present in all musl-based distros and Docker images, including Metube. The DNS compatibility is so problematic that it leads to issues from time to time. For example alpinelinux/docker-alpine#155 and kubernetes/kubernetes#112135. The bottom line is, if musl doesn't cooperate well with your DNS server's behavior, it can result in DNS resolution errors.

One common cause, even in simple setups, is that musl queries both A and AAAA records at the same time, and the failure of the AAAA query would even fail the A query. If the DNS server rejects the AAAA resolution because it doesn't support AAAA records and returns a DNS_RCODE_REFUSED, musl will fail the resolution immediately, even if the DNS server later returns an A record. What about when the server does not respond to AAAA at all? Musl will wait for the AAAA response until it times out, and the worst part is that the timed-out AAAA query will fail the A query as well.

Similar problems can also occur when there are multiple upstream DNS servers, and the address is not resolvable in all of them. This issue is even documented by Alpine Linux. Such behavior is caused by the flawed design of musl, and there is little you can do about it. Alpine Linux recommends setting up a local DNS caching server using Dnsmasq and using that as the DNS for your musl-based systems if you are experiencing DNS compatibility issues. A faster way to check if it is indeed the DNS issue is to manually set the DNS to 8.8.8.8 for the container. As far as I know, Google's DNS works fine with musl.

@PikuZheng
Copy link
Contributor

I've been using alpine for a long time and never had this problem.
DNS server returns SOA for AAA query when no AAA record exists, instead of server reject. if it's not, try to change to a pretty dns server

@vishalkrv
Copy link
Author

Log

Setting umask to 022

Creating download directory (/downloads), state directory (/downloads/.metube), and temp dir (/downloads)

Changing ownership of download and state directories to 1000:1000

Running MeTube as user 1000:1000

INFO:main:Listening on 0.0.0.0:8081

DEBUG:asyncio:Using selector: EpollSelector

INFO:ytdl:waiting for item to download

it looks works fine. use http://yourPortainerIP:9995/

I ran the ping command from within the container and below is the error

/app # ping www.google.com
ping: bad address 'www.google.com'
/app # 

it looks like some issue of network. please go to networks in portainer and check which network is using for metube

Thanks. It was mistake of my own, I had setup as a stack so portainer created a separate host which didn't have access. I deleted and created a simple container and it worked.

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