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

Aliasing a now-serve deployment to custom domain #27

Closed
jonscottclark opened this issue Sep 12, 2016 · 11 comments
Closed

Aliasing a now-serve deployment to custom domain #27

jonscottclark opened this issue Sep 12, 2016 · 11 comments

Comments

@jonscottclark
Copy link

Hopefully I just have a bad dependency somewhere.

Note that the domain I'm trying this with is a .bm (Bermuda) domain name, not sure if that matters but it's definitely not common.

Deployment ID and domain truncated and replaced, respectively, for privacy.

$ now alias wKUr5n example.bm --debug

> [debug] Checking for updates.
> [debug] Up to date (0.25.0).
> [debug] /list: 703.425ms
> [debug] matched deployment wKUr5n by uid wKUr5n
> example.bm is a custom domain.
> Verifying the DNS settings for example.bm (see https://zeit.world for help)
> [debug] #1 GET /whois-ns: 287.395ms
> [debug] Retrying: Error: Whois error (500): An unexpected internal error occurred
    at Alias._callee11$ (/usr/local/lib/node_modules/now/build/lib/index.js:900:27)
    at tryCatch (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:88:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:341:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:121:21)
    at step (/usr/local/lib/node_modules/now/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/now/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at run (/usr/local/lib/node_modules/now/node_modules/core-js/library/modules/es6.promise.js:108:47)
    at /usr/local/lib/node_modules/now/node_modules/core-js/library/modules/es6.promise.js:119:28
    at flush (/usr/local/lib/node_modules/now/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at nextTickCallbackWith0Args (node.js:433:9)
> [debug] #2 GET /whois-ns: 84.056ms
> [debug] Retrying: Error: Whois error (500): An unexpected internal error occurred
    at Alias._callee11$ (/usr/local/lib/node_modules/now/build/lib/index.js:900:27)
    at tryCatch (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:88:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:341:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/now/node_modules/babel-runtime/regenerator/runtime.js:121:21)
    at step (/usr/local/lib/node_modules/now/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/now/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at run (/usr/local/lib/node_modules/now/node_modules/core-js/library/modules/es6.promise.js:108:47)
    at /usr/local/lib/node_modules/now/node_modules/core-js/library/modules/es6.promise.js:119:28
    at flush (/usr/local/lib/node_modules/now/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at nextTickCallbackWith0Args (node.js:433:9)
> [debug] Retrying: FetchError: request to https://api.zeit.co/whois-ns-fallback?domain=example.bm failed, reason: socket hang up
    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/now/node_modules/node-fetch/index.js:127:11)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:265:9)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Stream.onStreamError (/usr/local/lib/node_modules/now/node_modules/spdy/lib/spdy/handle.js:89:18)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at /usr/local/lib/node_modules/now/node_modules/spdy-transport/lib/spdy-transport/connection.js:752:12
@jonscottclark
Copy link
Author

jonscottclark commented Sep 12, 2016

I should also mention that I told the domain administrator to set their name servers to two of the zeit.world locations and he's confirmed that he's done that. Haven't seen for my own eyes, though.

@leo
Copy link
Contributor

leo commented Sep 12, 2016

@jonscottclark I don't think that's the reason for this error, but like mentioned here, you should use at least 4 name servers.

@jonscottclark
Copy link
Author

Ok, I've followed up with the administrator to add 2 more.

@jonscottclark
Copy link
Author

jonscottclark commented Sep 12, 2016

I tried a number of whois lookup websites and some said the TLD wasn't supported, others responded with empty information. Took about 6 or 7 tried before I found one that worked.

% NOTE: The registry for this domain name does not publish ownership
%       records (whois records) in the standard format.  This data
%       represents the most likely status of the domain based on 
%       information provided by the Internet's domain name servers (DNS).

domain: [redacted].bm
status: taken
nameserver: london.zeit.world
nameserver: newark.zeit.world

% For more information, please visit http://www.bermudanic.bm

This is what I got from http://whois.domaintools.com/

@leo
Copy link
Contributor

leo commented Sep 12, 2016

@jonscottclark btw: nslookup leo.im

@jonscottclark
Copy link
Author

@leo

Non-authoritative answer:
*** Can't find [redacted].bm: No answer

@jonscottclark
Copy link
Author

Could there potentially be a --force option if we can verify by some other means that the nameservers are legitimate?

@leo
Copy link
Contributor

leo commented Sep 12, 2016

@jonscottclark That's interesting! If nslookup doesn't work, the name servers probably aren't set up properly. I'm not sure but it might also be related to now checking the name servers from your local device. Maybe your device doesn't yet know that there are new name servers behind the domain...

@jonscottclark
Copy link
Author

@leo I tried clearing my DNS cache and it still failed.

I'll try with a .com domain and let you know if I run into the same issue.

@leo leo added patch labels Sep 14, 2016
@OlliV
Copy link
Contributor

OlliV commented Sep 19, 2016

What's the status?

@jonscottclark
Copy link
Author

It was discovered that the NIC responsible was/is having issues — though I wasn't told specifically what the issues were.

For what it's worth, the only site that seems to be able to return WHOIS information for .bm domains at time of writing is http://whois.domaintools.com/ — others returned no data, or threw an error.

I suppose the issue really is just how to handle 500 errors — and the fact that after running the command above and receiving those errors, that when running now alias ls, it says > 1 alias found but doesn't list it.

matheuss added a commit that referenced this issue Apr 26, 2017
* Added `logs` sub command

* add missing dependencies

* use utils/output/logo

* logs: fix wrong reference

* logs: fix buffer time

* sort build logs (#19)

* logs: use lib/logs

* lib/logs: fix

* logs: resolve url to id

* logs: default to follow

* logs: don't resolve URL to id

* logs: revert to default unfollow

* logs: add since option and until option

* logs: fix default number of logs

* fix logs auth

* logs: listen ready event

* logs: new endpoint

* log: remove v query param

* logs: default to not include access logs

* fix styles of now-logs

* logs: remove relative time
matheuss added a commit that referenced this issue May 1, 2017
* Feature/teams (#25)

* Add the skeleton of `now teams`

* Add support for "complex" command aliases

This adds the ability to set, for example, `now switch` as an alias for `now teams switch`.
Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`.

* `now switch` => `now teams switch`

* Extract `rightPad`

* Extract `eraseLines`

* Extract `✓`

* Text input: add `valid` option

* Text input: add `forceLowerCase` option

* Add preliminary `now teams add`

* Make the linter happy

* Extract `> NOTE: ...`

* Add missing labels

* Fix typos

* Add missing parameters

* Change the section label after inviting all specified team mates

* Call the API after each email submission

* Show the elapsed time after each `inviteUser` api call

* Handle user aborts

* We don't need `args` for `now teams add`

* Add missing `await`

* Extract regex

* `process.exit()` => `exit(1)`

* `prompt-bool` is an `input` util, not an `output` one

* Add the ability to delete a key from the config file

* Add `fatal-error`

* Add `now teams invite`

* This shouldn't be black

* Save the username in `~/.now.json` upon login

* Save the token and userId instead of token and email

* Fix typo

* Save more info about the user to `~/.now.json` upon login

* `~/.now.json`: Persist the current time when login in

* Add `user` helper

* `user.userId` => `user.id`

* Tweak code organization

* Add caching system to `.now.json`

* Automatically switch to a team after its creation

* Introduce the concept of `inactive` teams

* Use bold for `payment method`

* Remove duplicated code

* Add line breaks

* Auto complete with the first match

* Remove placeholder stuff

* Add the user's email to the list of suggestions

* FIx bad merge

* Add `now switch`

* Make `now teams invite` more reliable and faster

* Shut up XO

* Improve autocompletion

* Fix TypeError

* Make stuff pretty

* Not sure how this got overwritten

* Feature/domains (#26)

* Add the skeleton of `now teams`

* Add support for "complex" command aliases

This adds the ability to set, for example, `now switch` as an alias for `now teams switch`.
Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`.

* `now switch` => `now teams switch`

* Extract `rightPad`

* Extract `eraseLines`

* Extract `✓`

* Text input: add `valid` option

* Text input: add `forceLowerCase` option

* Add preliminary `now teams add`

* Make the linter happy

* Extract `> NOTE: ...`

* Add missing labels

* Fix typos

* Add missing parameters

* Change the section label after inviting all specified team mates

* Call the API after each email submission

* Show the elapsed time after each `inviteUser` api call

* Handle user aborts

* We don't need `args` for `now teams add`

* Add missing `await`

* Extract regex

* `process.exit()` => `exit(1)`

* `prompt-bool` is an `input` util, not an `output` one

* Add the ability to delete a key from the config file

* Add `fatal-error`

* Add `now teams invite`

* This shouldn't be black

* Save the username in `~/.now.json` upon login

* Save the token and userId instead of token and email

* Fix typo

* Save more info about the user to `~/.now.json` upon login

* `~/.now.json`: Persist the current time when login in

* Add `user` helper

* `user.userId` => `user.id`

* Tweak code organization

* Add caching system to `.now.json`

* Automatically switch to a team after its creation

* Introduce the concept of `inactive` teams

* Use bold for `payment method`

* Remove duplicated code

* Add line breaks

* Auto complete with the first match

* Remove placeholder stuff

* Add the user's email to the list of suggestions

* FIx bad merge

* Add `now switch`

* Make `now teams invite` more reliable and faster

* Shut up XO

* Improve autocompletion

* Fix TypeError

* Make stuff pretty

* Not sure how this got overwritten

* `prompt-bool` is an `input` util, not an `output` one

* Make stuff pretty

* Not sure how this got overwritten

* Add domains.status, price and buy

* Add `now domains buy`

* Add the ability to buy a domain when running `now alias`

* Logs (#27)

* Added `logs` sub command

* add missing dependencies

* use utils/output/logo

* logs: fix wrong reference

* logs: fix buffer time

* sort build logs (#19)

* logs: use lib/logs

* lib/logs: fix

* logs: resolve url to id

* logs: default to follow

* logs: don't resolve URL to id

* logs: revert to default unfollow

* logs: add since option and until option

* logs: fix default number of logs

* fix logs auth

* logs: listen ready event

* logs: new endpoint

* log: remove v query param

* logs: default to not include access logs

* fix styles of now-logs

* logs: remove relative time

* Fix bad merge conflict

* Add `now scale` (#28)

* Inital drafts fro `now-scale`

* More final draft

* sketch new `now ls` format

* Add sketch for `now ls --all`

* Placeholder for `now scale ls`

* "Prettify" and improve scale command

Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi>

* Adopt to now-list api changes

* Improve now-list --all colors

Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi>

* Add now scale ls

Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi>

* Prettify

* Show auto correctly

* Add partial match scale for now alias

* Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes

* Replace spinners with help text

* Make the list :nice:

* Make now-list great again

* Final touches

* Allow --all only when app is defined

* Add progress tracking to scale

* Correctly use --all for > 0 deployments found [1s] and improve scale info ux

* Show --all info if we are hiding stuff

* Fixes

* Refactor scale info and unfreeze

* Fixes

* Proper progress bar

* Fix bad merge

* Fix auth for now-scale

* logs: fix reading config

* Fix reference

* Small ux tweaks

* Improve now alias ux

* Fix a ton of lint errors

* Fix scaling up and alias ux

* Fix lint errors + prettify

* Make `bin/now-scale.js` available via `now scale`

* Fix errornous syntax for domains list

* And use correct header for domains list

* Update now-scale help to match new spec

* `await` for `cfg.read()` on `cfg.remove()`

* Update scale command

* Cleanu
p

* Fetch the teams from the api on teams.ls()

Plus prettier shit

* Run prettier hooks manually

* Make `now switch` perfect

* Rm unused variables

* Lint

* Ruin ux but lint

* Consume `POST /teams`

* Consume `PATCH /teams/:id`

* Fix/teams support (#29)

* Add teams support for lib/index.js

* Consume `POST /teams/:id/members`

* Make `now teams create` and `now teams invite` perfect

* Add a way to not send `?teamId` if necessary

* Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands

* Display the username only if it's available

* Consume the preoduction endpoits for domain purchase

* Fix typo

* Fix grammar

* Fix grammar

* Remove useless require

* Display the user name/team slug on creation/list commands

* Remove use of old, now undefined variable

* Show domains in bold on `now domains ls`

* `user.userId` => `user.uid`

* Remove console.log

* Show a better messsage upon unexpected `domains.buy()` error

* typo

* Consume new `/plan` API and fix plan check

* Update `now upgrade` – consume new APIs and expose new plans

* Fix `now ugprade` info message

* `now cc`: consume new APIs and fix error messages

* Add team/user context to `now alias` when buying a domain

* Fix wording on `now domains buy`

* Add stamp to domain purchase

* Improve scale ux

* Remove ToS prompt upon login

* Fix `prompt-bool` trailing issues

* Remove useless `require`

* Allow `now switch <username>`

* Make `now help` better

* This shouldn't be here

* Make `now switch` incredible

* Remove old stuff from ~/.now.json

* Add comments

* `now team` => `now teams`

* 5.0.0

* Fix linter

* Fix DNS

* Parse subdomain

* FIx lint

* drop IDs for certs

* Make now ls look nice also when noTTY

* Make now list look nice when colors are not supported

* Mane certs ls look nice when we have no colers

* Now ls --all can also take uniq url as a parameter

* Improve now ls --all

* Now ls -all takes alias as an argument
TooTallNate pushed a commit that referenced this issue Aug 23, 2019
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