Virtual-environments: Unable to unmarshal

Created on 9 Jul 2020  路  2Comments  路  Source: actions/virtual-environments

Describe the bug
Looks like the dns resolver used by github-actions is unable to look up certain addresses - googling looks like this is caused by srv type addresses.

Attempting to run mongodump with a command such as: mongodump --uri "mongodb+srv://user:[email protected]/dbname"

results in:

2020-07-09T10:21:18.498+0000    error parsing command line options: error parsing uri: lookup mydb-prod-8aaaa.gcp.mongodb.net on 127.0.0.53:53: cannot unmarshal DNS message
2020-07-09T10:21:18.498+0000    try 'mongodump --help' for more information

Area for Triage:

  • Containers
  • Databases
  • Servers
  • Bug

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • [ ] macOS 10.15
  • [ ] Ubuntu 16.04 LTS
  • [X] Ubuntu 18.04 LTS
  • [ ] Ubuntu 20.04 LTS
  • [ ] Windows Server 2016 R2
  • [ ] Windows Server 2019

Expected behavior
I would expect the address to be resolved as it is locally / on CircleCI from where I am migrating the job

Actual behavior
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.

  1. Attempt to resolve a srv url (such as those used by MongoDB Atlas)
  2. Note that you get a DNS error
Ubuntu bug

Most helpful comment

Hello, @antony
Could you please check output?
dig SRV _mongodb._tcp.mydb-prod-8aaaa.gcp.mongodb.net

Should be looks like:

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> SRV _mongodb._tcp.cluster0-jdtjt.mongodb.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54532
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 13, ADDITIONAL: 13

;; QUESTION SECTION:
;_mongodb._tcp.cluster0-jdtjt.mongodb.net. IN SRV

;; ANSWER SECTION:
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-02-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-00-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-01-jdtjt.mongodb.net.

Update pipeline to use external resolver the first step:

- name: Set dns
  run: |
      sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

All 2 comments

Hello, @antony
Could you please check output?
dig SRV _mongodb._tcp.mydb-prod-8aaaa.gcp.mongodb.net

Should be looks like:

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> SRV _mongodb._tcp.cluster0-jdtjt.mongodb.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54532
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 13, ADDITIONAL: 13

;; QUESTION SECTION:
;_mongodb._tcp.cluster0-jdtjt.mongodb.net. IN SRV

;; ANSWER SECTION:
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-02-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-00-jdtjt.mongodb.net.
_mongodb._tcp.cluster0-jdtjt.mongodb.net. 3443 IN SRV 0 0 27017 cluster0-shard-00-01-jdtjt.mongodb.net.

Update pipeline to use external resolver the first step:

- name: Set dns
  run: |
      sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

This bug is not related to an image - https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1886128.
Feel free to open the thread if you have any concerns.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MSP-Greg picture MSP-Greg  路  3Comments

damccorm picture damccorm  路  3Comments

matthewfeickert picture matthewfeickert  路  3Comments

frankieroberto picture frankieroberto  路  4Comments

ydnar picture ydnar  路  3Comments