wckr / wocker

Create your WordPress development environment in 3 SECONDS!
https://wocker.dev/
MIT License
480 stars 42 forks source link

Why is "The requested URL returned error: 404 Not Found" displayed? #77

Closed echizenyayota closed 6 years ago

echizenyayota commented 6 years ago

Hi. If you know about the following two questions, please teach.


【Purpose of question】

Q1.

2

Why is the warning text displayed with yellow letters when making vagrant up?

Q2.

3

Why does an error appear in red letters when vagrant box update is given?

【Supplementary explanation】

1

In common with the two questions, the following message will be displayed.

The requested URL returned error: 404 Not Found

I confirmed my network environment, but there are no abnormalities. I restarted the PC and WiMAX and connected to another website, but you can browse the page as usual.

2

After starting vagrant, you can launch WordPress site by executing the following command.

$ vagrant ssh
wocker ~$ wocker start test

Thank you for your review.

ailispaw commented 6 years ago

Hi @echizenyayota ,

It is a bug in Vagrant. Please refer to "vagrant box update - Fails with 404 Not Found error · Issue #9442 · hashicorp/vagrant" https://github.com/hashicorp/vagrant/issues/9442 .

At this moment, you have to edit the file ~/.vagrant.d/boxes/ailispaw-VAGRANTSLASH-barge/metadata_url manually.

FROM:

https://atlas.hashicorp.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxx

TO:

https://vagrantcloud.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxx

Thank you.

echizenyayota commented 6 years ago

Hi,@ailispaw . Thank you for your comment!


Based on your advice and #9442, I corrected it with the following three steps. However, this time, a yellow note is displayed as "Illegal". Is there anything else I need to do?

Illegal characters found in URL
4

1. Vagrant update

version1.9.1 → version2.0.2
$ vagrant plugin update
Updating installed plugins...
Fetching: vagrant-hostsupdater-1.0.2.gem (100%)
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.15.1.gem (100%)
Updated 'vagrant-vbguest' to version '0.15.1'!

2. metadata_url modified

5
$ vi ~/.vagrant.d/boxes/ailispaw-VAGRANTSLASH-barge/metadata_url
# https://atlas.hashicorp.com/ailispaw/barge
https://vagrantcloud.com/ailispaw/barge?access_token=pMcxxxxxxxxxxxxxxxxxxxx

3. Vagrantfile added

$ vi Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# echizenya added
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') 

# A dummy plugin for Barge to set hostname and network correctly at the very first `vagrant up`
module VagrantPlugins
  module GuestLinux

Thank you for your review.

ailispaw commented 6 years ago

I meant that you had to replace just atlas.hashicorp.com with vagrantcloud.com. Please check the URL in metadata_url. I didn't do any step 1,2 and 3.

echizenyayota commented 6 years ago

@ailispaw Thank you for your comment.


I meant that you had to replace just atlas.hashicorp.com with vagrantcloud.com. Please check the URL in metadata_url.

Should I interpret the comment as follows?

1. ailispaw → echizenya modified

6
$ vi ~/.vagrant.d/boxes/ailispaw-VAGRANTSLASH-barge/metadata_url
https://vagrantcloud.com/echizenya/barge?access_token=pMcxxxxxxxxxxxxxxxxxxxx

2. "Vagrantfile added" delete

$ vi Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# echizenya added ← delete

# A dummy plugin for Barge to set hostname and network correctly at the very first `vagrant up`
module VagrantPlugins
  module GuestLinux

Thank you for your review.

ailispaw commented 6 years ago

Please refer to my first comment.

I guess that your ~/.vagrant.d/boxes/ailispaw-VAGRANTSLASH-barge/metadata_url looked like https://atlas.hashicorp.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxx.

After you replace the domain atlas.hashicorp.com with vagrantcloud.com, it should look like https://vagrantcloud.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxx.

echizenyayota commented 6 years ago

Thanks for frequent comments.

After you replace the domain atlas.hashicorp.com with vagrantcloud.com, it should look like https://vagrantcloud.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxx.

Should I interpret the comment as follows? I added "sed" command.

$ cd ~/.vagrant.d/boxes/ailispaw-VAGRANTSLASH-barge
$ cat metadata_url
https://atlas.hashicorp.com/ailispaw/barge
$ cp metadata_url metadata_url.org
$ sed -i -- 's/atlas.hashicorp/vagrantcloud/g' ~/.vagrant.d/boxes/*/metadata_url
$ ls
metadata_url-- metadata_url.org metadata_url
$ vi metadata_url
# "?access_token=pMcxxxxxxxxxxxxxxxxxxxx" added
https://vagrantcloud.com/ailispaw/barge?access_token=pMcxxxxxxxxxxxxxxxxxxxx

but, a yellow character "Illegal characters found in URL" is displayed...


Therefore I will write unclear points about this issue on my Japanese blog, post it on Facebook and I will give advice from my friends. Or I would like to ask someone to tell me in person.

What do you think?

ailispaw commented 6 years ago
$ cat metadata_url
https://atlas.hashicorp.com/ailispaw/barge

まず、これがおかしいですね。?access_token= 以降の文字列もあったはずです。 なので、?access_token=pMcxxxxxxxxxxxxxxxxxxxx を後から追加する必要はありません。

Illegal characters found in URL ということは、何か修正に失敗して変な文字コードが入ってしまったのかも知れません。

metadata_url.zip

念の為、私のものを添付します。これをそのまま使っても大丈夫だと思います。たぶん。

もちろんZIPを解凍した後ですけど。

echizenyayota commented 6 years ago

@ailispaw さん。 日本語によるコメントありがとうございます。またファイルの添付もありがとうございます! 1と2のいずれも試してみましたが、やはりIllegal characters found in URLが表示されてしまいます...


1.

なので、?access_token=pMcxxxxxxxxxxxxxxxxxxxx を後から追加する必要はありません。

https://vagrantcloud.com/ailispaw/barge のみaccess_tokenは使わずにvagrant up

2.

念の為、私のものを添付します。これをそのまま使っても大丈夫だと思います。たぶん。

https://vagrantcloud.com/ailispaw/barge?access_token=xxxxxxxxxxxxxxxxxxxxでaccess_tokenを使ってvagrant up


ひょっとしたら、私のPCでWocker以外のどこかで不具合が出ているのかもしれません。 Wockerに詳しい知人に連絡を取ってみて対面で確認してみようと思いますが、いかがでしょうか? せっかくたくさんのコメントをいただいたにも関わらず、解決させることができず誠に申し訳ありません。