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

First Site Upgrade bug: 'ascii' codec can't decode byte 0xc3 in position 4869: ordinal not in range(128) #128

Closed
geoffreycrofte opened this issue Aug 28, 2019 · 16 comments

Comments

@geoffreycrofte
Copy link

commented Aug 28, 2019

Hello there,

After the installation of WO on my server following the instructions on EE migration page:
https://docs.wordops.net/guides/migration-from-easyengine/
I tried to update one of my website using the command:

sudo wo site update flexbox.ninja --php73

The result was instantly:

'ascii' codec can't decode byte 0xc3 in position 4869: ordinal not in range(128)

Thanks a lot for the help :)

System Information

  • Debian GNU/Linux 8.11 (jessie)
  • wo info : Nginx is not installed (hum, my website are running, so I guess it's installed)
  • nginx -V : command not found: nginx
  • WordOps v3.9.8.4
  • wp cli info --allow-root
    OS: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64
    Shell: /usr/bin/zsh
    PHP binary: /usr/bin/php7.0
    PHP version: 7.0.32-1~dotdeb+8.1
    php.ini used: /etc/php/7.0/cli/php.ini
    WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
    WP-CLI vendor dir: phar://wp-cli.phar/vendor
    WP_CLI phar path: /
    WP-CLI packages dir:
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 2.3.0
  • https://transfer.sh/2oQQS/wordops.tar.gz
@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Aug 28, 2019

Oh. I rebooted the server, and now everything's down :/
Investigating…

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Aug 28, 2019

Seems like WO didn't copy the right configuration files

Aug 28 20:41:42 vps297549.ovh.net systemd[1]: Starting A high performance web server and a reverse proxy server...
Aug 28 20:41:42 vps297549.ovh.net nginx[937]: nginx: [emerg] open() "/etc/nginx/common/locations-wo.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/compta.crofte.fr:22
Aug 28 20:41:42 vps297549.ovh.net systemd[1]: nginx.service: control process exited, code=exited status=1
Aug 28 20:41:42 vps297549.ovh.net systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 28 20:41:42 vps297549.ovh.net systemd[1]: Unit nginx.service entered failed state.
Aug 28 20:41:43 vps297549.ovh.net nginx[937]: nginx: configuration file /etc/nginx/nginx.conf test failed

ls -l into common folder:

-rw-r--r-- 1 root root  208 Jul  9  2016 acl.conf
-rw-r--r-- 1 root root 1717 Jul  9  2016 locations-php7.conf
-rw-r--r-- 1 root root 1716 Oct 14  2016 locations.conf
-rw-r--r-- 1 root root  236 Jul  9  2016 php.conf
-rw-r--r-- 1 root root  237 Jul  9  2016 php7.conf
-rw-r--r-- 1 root root 1686 Jul  9  2016 redis-php7.conf
-rw-r--r-- 1 root root 1195 Jul  9  2016 w3tc-php7.conf
-rw-r--r-- 1 root root 1194 Jul  9  2016 w3tc.conf
-rw-r--r-- 1 root root 1244 Jul  9  2016 wpcommon-php7.conf
-rw-r--r-- 1 root root 1243 Jul  9  2016 wpcommon.conf
-rw-r--r-- 1 root root 1305 Jul  9  2016 wpfc-php7.conf
-rw-r--r-- 1 root root 1304 Jul  9  2016 wpfc.conf
-rw-r--r-- 1 root root 1227 Jul  9  2016 wpsc-php7.conf
-rw-r--r-- 1 root root 1226 Jul  9  2016 wpsc.conf
-rw-r--r-- 1 root root  358 Jul  9  2016 wpsubdir.conf

Where can I find the conf files so I can copy them?

Edit: I confirm, I had to edit all the sites-enabled/domain.tld conf files replacing locations-wo.conf by old locations.conf references.
How can I get all the new configuration files? I'm a bit lost I was thinking WO was supposed to install/copy those files on my server.

EDIT 2: BTW the first issue remains. Should I open 2 different issues?

Thanks

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

Hello @geoffreycrofte,
to apply new nginx configuration, you can try to use wo stack upgrade --nginx --force
About the first issue, I'm going to investigate on this.

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

Hello @geoffreycrofte,
I have just published a new release, which include several fixes, can you try to update WordOps to the last release with wo update before running again wo stack upgrade --nginx --force ?
Let me know if the issue still exist

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Aug 31, 2019

Hello @VirtuBox :)
Thanks for the update and help.
I have done the wo update but the wo stack upgrade --nginx --force return Nginx Stable is not already installed

I don't totally get it because Nginx is currently running. Is that another version/instance of Nginx? Maybe the one installed by the previous EE?

Thank you so much for your time :) :)

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Sep 1, 2019

Hello @geoffreycrofte,

Please, can you give me the output of the following commands :

dpkg --list | grep nginx

netstat -tulpn | grep 80
@tdtgit

This comment has been minimized.

Copy link

commented Sep 1, 2019

Same issue like you after migrating from WO. Try the command export LANG='en_US.UTF-8'. That's help on my side

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Sep 1, 2019

I have found the cause of the issue, encoding wasn't specified when reading public_suffix list to check if the site is a domain or a subdomain. A fix will be available asap.

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

WordOps v3.9.8.8 include a fix for this issue.
@geoffreycrofte Let me know if the issue still exist after update WordOps.

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Sep 2, 2019

Hello :)

Yes. So, the first one gave me:

ii  libnginx-mod-http-auth-pam     1.14.1-1~dotdeb+8.1              amd64        PAM authentication module for Nginx
ii  libnginx-mod-http-geoip        1.14.1-1~dotdeb+8.1              amd64        GeoIP HTTP module for Nginx
ii  libnginx-mod-http-image-filter 1.14.1-1~dotdeb+8.1              amd64        HTTP image filter module for Nginx
ii  libnginx-mod-http-xslt-filter  1.14.1-1~dotdeb+8.1              amd64        XSLT Transformation module for Nginx
ii  libnginx-mod-mail              1.14.1-1~dotdeb+8.1              amd64        Mail module for Nginx
ii  libnginx-mod-stream            1.14.1-1~dotdeb+8.1              amd64        Stream module for Nginx
ii  nginx                          1.14.1-1~dotdeb+8.1              all          small, powerful, scalable web/proxy server
ii  nginx-common                   1.14.1-1~dotdeb+8.1              all          small, powerful, scalable web/proxy server - common files
rc  nginx-ee                       1.10.0-2                         all          small, powerful, scalable web/proxy server - ee files
ii  nginx-full                     1.14.1-1~dotdeb+8.1              amd64        nginx web/proxy server (standard version)

And the second one gave me:

tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      680/master      
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      680/master      
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      680/master      
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      680/master      
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2392/nginx -g daemo
tcp6       0      0 :::465                  :::*                    LISTEN      680/master      
tcp6       0      0 :::25                   :::*                    LISTEN      680/master      
tcp6       0      0 :::587                  :::*                    LISTEN      680/master      
tcp6       0      0 :::80                   :::*                    LISTEN      2392/nginx -g daemo
udp6       0      0 fe80::f816:3eff:fe9:123 :::*                                399/ntpd 

Thanks for the time you're giving to me :)

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Sep 2, 2019

Oh sorry my page wasn't refreshed. I just saw your last comments.
Will try, I come back soon.

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Sep 2, 2019

The initial issue with the command sudo wo site update flexbox.ninja --php73 is fixed 👍

Now I get:

Adding repository for PHP, please wait...
Updating apt-cache, please wait...
Installing packages, please wait...

Oops Something went wrong!!
Check the WordOps log for more details `tail /var/log/wo/wordops.log` and please try again...

And /var/log/wo/wordops.log logs:

Errors were encountered while processing:
 /var/cache/apt/archives/php-igbinary_3.0.1+2.0.8-2+0~20190814.12+debian8~1.gbpaafd11_amd64.deb
 /var/cache/apt/archives/php-imagick_3.4.4-1+0~20190814.12+debian8~1.gbpc5da26_amd64.deb
 /var/cache/apt/archives/php-msgpack_2.0.3+0.5.7-2+0~20190814.11+debian8~1.gbpb26058_amd64.deb
 /var/cache/apt/archives/php-memcached_3.1.3+2.2.0-2+0~20190814.14+debian8~1.gbp5d60d1_amd64.deb
 /var/cache/apt/archives/php-redis_5.0.2+4.3.0-2+0~20190814.15+debian8~1.gbp070358_amd64.deb
 /var/cache/apt/archives/php-xdebug_2.7.2+2.5.5-1+0~20190814.12+debian8~1.gbp4a96d9_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
2019-09-02 21:11:51,924 (INFO) wo : Oops Something went wrong!!
2019-09-02 21:11:51,925 (ERROR) wo : Check the WordOps log for more details `tail /var/log/wo/wordops.log` and please try again...

Am I a desperate case? :D

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

Ok, so the issue is you have two Nginx version installed at the same time, one from EasyEngine, and one from DotDeb repository. So you have to remove the nginx package first.

sudo apt-get autoremove nginx*

Then try to reinstall nginx with WordOps :

sudo wo stack install --nginx
@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Sep 2, 2019

That explains a lot :)

Thanks for the great support!!

Now I just need to know why /etc/nginx/common/php73.conf or php72.conf lead to a 502 Bad Gateway where /etc/nginx/common/php7.conf is ok and I should be ok.

@VirtuBox

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

If the stack configuration failed previously, php7.2-fpm or php7.3-fpm were probably not setup properly. You can use wo stack upgrade --php --php73 to fix this issue.
If it doesn't work, purge the stacks with wo stack purge --php --php73 and then reinstall them with wo stack install --php --php73

@VirtuBox VirtuBox removed the bug label Sep 2, 2019

@geoffreycrofte

This comment has been minimized.

Copy link
Author

commented Sep 3, 2019

Look, it worked like a charm :) (the first command)

I really thank you for all your time and the great support!
How can I help in return? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.