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

Sandstorm is not updated yet. Newest Snap and Docker v3.x are released. #2533

Closed
xet7 opened this issue Jul 8, 2019 · 17 comments

Comments

@xet7
Copy link
Member

commented Jul 8, 2019

Moved to here from wekan/wekan-dev#12 (comment)

From @JerryMWeeks

Just tried on Windows 10 using PowerShell in admin mode, it fails at this:

  • cd /home/wekan/app
  • gosu wekan:wekan mkdir -p ./public/api
    mkdir: cannot create directory './public/api': Permission denied
  • cd /home/wekan/app
  • gosu wekan:wekan /home/wekan/.meteor/meteor add standard-minifier-js
    error: exec: "/home/wekan/.meteor/meteor": stat /home/wekan/.meteor/meteor: no such file or directory
    ERROR: Service 'wekan' failed to build: The command '/bin/sh -c set -o xtrace && useradd --user-group --system --home-dir /home/wekan wekan && apt-get update -y && apt-get install -y --no-install-recommends ${BUILD_DEPS} && pip3 install -U pip setuptools wheel && … etc etc.

Reply from @xet7

I don't know about wekan-dev, but anyway Wekan master branch builds are broken:

These changes are related to upgrading Wekan from Meteor 1.6.x to Meteor 1.8.1. Previously when meteor-1.8 branch existed, Docker build of meteor-1.8 branch did work, but Snap did not. After moving branches, building Docker does not work.

Currently:

  • master branch has Meteor 1.8.1 based Wekan
  • devel branch has old Meteor 1.6.x based Wekan
  • I have deleted old other branches

When I get master branch working with Snap+Docker+Sandstorm, I will delete old devel branch.

Anyway, currently builds are broken. It's possible to use newest Wekan with .tar.gz bundle from https://releases.wekan.team or in any CPU architecture as mentioned at https://github.com/wekan/wekan/wiki/Raspberry-Pi . Also using rebuild-wekan.sh scripts options 1 and 2 still works for me, when I build it on Ubuntu 19.04.

All these changes are related to upgrading Wekan dependencies to newest versions, where possible.

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 8, 2019

On Ubuntu 19.04, when using rebuild-wekan.sh option 2, I'm also getting file permission errors like

Unhandled rejection Error: EACCES: permission denied, mkdir '/home/wekan/.npm/_cacache'

Usually Wekan still works.

On Puppy Linux Bionic 64bit, when I install meteor from www.meteor.com as root, clone wekan repo and run as root, without using rebuild-wekan.sh:

meteor --port 4000 --allow-superuser

Then it mostly works, but because rebuild-wekan.sh has not been used it still have unicode filename bug:
https://github.com/wekan/wekan/blob/master/Dockerfile#L235

@JerryMWeeks

This comment has been minimized.

Copy link

commented Jul 8, 2019

Not sure if this needs a new issue or comes under the same issue, running command prompt in admin mode, Windows 10, Node etc already well established:
Run: rebuild-wekan.bat
Takes a while, tries to reinstall Node - which seems to work, then hits Meteor and fails:

"Building Wekan."
'meteor' is not recognized as an internal or external command,
operable program or batch file.
'meteor' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
'meteor' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
module.js:550
throw err;
^

Error: Cannot find module 'C:\repos\wekan\main.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

A fair way back in the output:
Meteor has been installed!

To get started fast:

$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor

Or see the docs at:

https://docs.meteor.com
Full output attached:

rebuild-wekan.bat-output.txt

<small update: Looks like a bit of hardcoding somewhere, the bat file creates more or less a copy of the GitHub wekan - but in a new folder: c:\repos (not something I would normally call good practice!) >

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2019

NOTE: Newest Wekan Snap is released, it uses Meteor 1.6.x dependencies.

@JerryMWeeks

That .bat file is not fixed yet for Windows. I do really recommend native Linux install when building Wekan, see #2557

@justinr1234

I uploaded broken debug snap builds to https://releases.wekan.team/debug/

Build 21 and newer - current boot.js error is the problem

snapcraft.yaml at https://github.com/wekan/wekan

Newest Wekan does build, it has MongoDB 4.x, Meteor 1.8.1, etc, but starting Wekan stops to boot.js javascript file line described below.

  • Is from MongoDB 4.0.10 tgz lecacy build, that does not have curl, SSL etc.
  • Build 21 keeps restarting.
  • /var/log/syslog shows apparmor errors, because apparmor or snap prevents accessing TCP ports, maybe because of snap strict confinement
  • only way to get MongoDB started is to sudo snap stop wekan.wekan and sudo snap set mongodb-bind-ip='' so that TCP is disabled and Wekan node uses MongoDB unix .sock file for communicating. Then it's possible to login to mongodb with mongo --port 27019
  • Wekan snap shows errors about migrations. This is maybe because when upgrading to newest MongoDB 4.0.10, mongodump backup needs to be restored without indexes with mongorestore --drop --port 27019 --noIndexRestore:
2019-07-20T23:01:12Z wekan.wekan[29699]:     at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
2019-07-20T23:01:12Z wekan.wekan[29699]:     at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
2019-07-20T23:01:12Z wekan.wekan[29699]:     at new Collection (packages/mongo/collection.js:97:40)
2019-07-20T23:01:12Z wekan.wekan[29699]:     at packages/idmontie_migrations.js:38:15
2019-07-20T23:01:12Z wekan.wekan[29699]:     at packages/idmontie_migrations.js:255:4
2019-07-20T23:01:12Z wekan.wekan[29699]:     at packages/idmontie_migrations.js:263:3
2019-07-20T23:01:12Z wekan.wekan[29699]:     at /snap/wekan/x2/programs/server/boot.js:419:36
2019-07-20T23:01:12Z wekan.wekan[29699]:     at Array.forEach (<anonymous>)
2019-07-20T23:01:12Z systemd[1]: snap.wekan.wekan.service: Main process exited, code=exited, status=1/FAILURE
2019-07-20T23:01:12Z systemd[1]: snap.wekan.wekan.service: Failed with result 'exit-code'.
  • Wekan also complains about boot.js these lines:
    That error line is show at this log:
root@wekan:/var/log# snap logs wekan.wekan
2019-07-20T23:02:57Z wekan.wekan[6543]:     at /snap/wekan/x2/programs/server/boot.js:419:36
2019-07-20T23:02:57Z wekan.wekan[6543]:     at Array.forEach (<anonymous>)
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Main process exited, code=exited, status=1/FAILURE
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Failed with result 'exit-code'.
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Service RestartSec=100ms expired, scheduling restart.
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Scheduled restart job, restart counter is at 6.
2019-07-20T23:02:57Z systemd[1]: Stopped Service for snap application wekan.wekan.
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Start request repeated too quickly.
2019-07-20T23:02:57Z systemd[1]: snap.wekan.wekan.service: Failed with result 'exit-code'.
2019-07-20T23:02:57Z systemd[1]: Failed to start Service for snap application wekan.wekan.
  • On above boot.js code lines are these:
      // Allows us to use code-coverage if the debugger is not enabled
      Profile(fileInfo.path, func).apply(global, args);
@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2019

@justinr1234

Those broken debug builds can be tested with:

sudo snap install --dangerous filename.snap

xet7 added a commit that referenced this issue Jul 24, 2019

Now Docker works, fixed docker-compose.yml.
Thanks to xet7 !

Related #2533

@xet7 xet7 changed the title Wekan Docker and Snap builds are broken Wekan Snap and Sandstorm builds are broken (Docker is already fixed on master branch) Jul 24, 2019

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Wekan v3.00 Docker build at master branch now works. I will add other platforms when I get those working. Next I will add meteor bundle, it does not need any fixes, just building it.

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Newest Wekan v3.00 for Docker at master branch has newest Meteor 1.8.1 and MongoDB 4.0.10, it requires mongodump of previous database and restore with added option --noIndexRestore, see https://github.com/wekan/wekan/wiki/Backup . That is because of major change of MongoDB from v3.2.x to v4.0.10. Also please use newest docker-compose.yml from https://github.com/wekan/wekan master branch.

Devel branch is old with Meteor 1.6.x and MongoDB 3.2.x and it is not developed anymore, and it does not have latest features.

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Summary of upcoming Wekan Platforms upgrades:

@sfahrenholz

This comment has been minimized.

Copy link

commented Jul 26, 2019

Hello,

is there any news for the snap implementation?

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 26, 2019

@xet7

This comment has been minimized.

Copy link
Member Author

commented Jul 26, 2019

@sfahrenholz

It did take a lot of work to get Snap to current state so that Snap build works, and MongoDB 4.x does start. So only thing remaining to fix is that Wekan error, that's probably because of indexes.

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 4, 2019

I don't know how to fix these errors in Snap: #2533 (comment)
Newest Wekan snap does build, but gives those errors, so it does not start Wekan.

I would also like help with building Wekan for other CPUs like Raspberry Pi etc as described at wekan/wekan-snap#46 (comment)

Current Wekan 2.x Snap version is old, and does seem to crash. If someone could help in debugging snap, it would be nice.

docker-compose.yml is at master branch at https://github.com/wekan/wekan .

It's possible to switch to Docker version with first doing backup:
https://github.com/wekan/wekan/wiki/Backup
with command:

mongodump --port 27019

And then restoring to Docker with:

docker stop wekan-app
docker cp dump wekan-db:/data/
docker exec -it wekan-db bash
cd /data/
mongorestore --drop --noIndexRestore
rm -rf dump
exit
docker start wekan-app

There are also other Wekan platforms:
https://github.com/wekan/wekan/wiki/Platforms

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 4, 2019

Related old snap crash wekan/wekan-snap#98

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 4, 2019

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 4, 2019

I also added ask for help to Snapcraft Wekan page:
https://snapcraft.io/wekan

@xet7 xet7 changed the title Wekan Snap and Sandstorm builds are broken (Docker is already fixed on master branch) Newest Wekan Snap package does not build. Docker builds OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest Wekan Snap package does not build. Docker builds OK. Sandstorm is not updated yet. Newest Wekan Snap package does not build. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest Wekan Snap package does not build. Docker works OK. Sandstorm is not updated yet. Newest not released Wekan Snap package does start Wekan, gives error. Old current released Snap has bugs. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest not released Wekan Snap package does start Wekan, gives error. Old current released Snap has bugs. Docker works OK. Sandstorm is not updated yet. Newest not released Wekan Snap package does start Wekan, gives error.Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest not released Wekan Snap package does start Wekan, gives error.Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Newest not released Wekan Snap package does start Wekan, gives error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest not released Wekan Snap package does start Wekan, gives error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Newest not released Wekan Snap package does start Wekan, gives boot.js error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest not released Wekan Snap package does start Wekan, gives boot.js error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Newest not released Wekan Snap package does not start Wekan, gives boot.js error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Aug 4, 2019

@xet7 xet7 changed the title Newest not released Wekan Snap package does not start Wekan, gives boot.js error. Current released Snap is old. Docker works OK. Sandstorm is not updated yet. Sandstorm is not updated yet. Snap and Docker are v3.x are released. Aug 6, 2019

@xet7 xet7 changed the title Sandstorm is not updated yet. Snap and Docker are v3.x are released. Sandstorm is not updated yet. Newest Snap and Docker v3.x are released. Aug 6, 2019

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2019

Experimental Sandstorm package v3.14 has been published, @ocdtrekkie can test it. Univention package updating will be looked sometime at end of this month.

@xet7 xet7 closed this Aug 11, 2019

@kairosdojo

This comment has been minimized.

Copy link

commented Aug 12, 2019

Hi!

I do not see any bundle file for arm64 at the moment in https://releases.wekan.team/ .

The only possible installation way on arm64 seems to be via the .img file (which frankly it seems to me a bit cumbersome and insecure). Am I correct?

@xet7

This comment has been minimized.

Copy link
Member Author

commented Aug 12, 2019

@kairosdojo

Yes there is bundle wekan-3.15.zip . I added more info to:
https://github.com/wekan/wekan/wiki/Platforms#testing-bundle-for-raspi-3-arm64-windows-and-any-nodemongo-cpu-architectures

You don't need .img file.

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