Giter Club home page Giter Club logo

sandstorm-io / sandstorm Goto Github PK

View Code? Open in Web Editor NEW
6.6K 217.0 701.0 19.69 MB

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.

Home Page: https://sandstorm.io

License: Other

Shell 3.01% JavaScript 44.79% C++ 26.66% C 0.80% Cap'n Proto 9.02% HTML 7.81% Makefile 0.51% Perl 1.15% Standard ML 0.06% Python 0.07% TypeScript 0.66% SCSS 4.60% Lex 0.11% Yacc 0.45% Assembly 0.30%
capnproto decentralized sandstorm seccomp self-hosted self-hosting

sandstorm's Introduction

Sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager. Sandstorm makes it easy to run your own server.

Use Sandstorm to install apps to create documents, spreadsheets, blogs, git repos, task lists, and more as easily as you'd install apps on your phone.

Sandstorm is open source and can be installed on any x86-64 Linux system.

Installing

See installation instructions in the Sandstorm documentation.

Using Sandstorm

See the overview in the Sandstorm documentation.

How It Works

See how it works and security practices in the Sandstorm documentation.

How to Package Apps

See the developer hub in the Sandstorm documentation.

Contribute

Want to help? Check out CONTRIBUTING.md. Also see our community page or get on our discussion group and let us know!

sandstorm's People

Contributors

abliss avatar amluto avatar audreyt avatar caasi avatar curbengh avatar dwrensha avatar elimisteve avatar eyedarts avatar garrison avatar jamborjan avatar jparyani avatar kentonv avatar mitar avatar mnutt avatar neynah avatar ocdtrekkie avatar paulproteus avatar rs22 avatar spollard avatar sprin avatar strugee avatar troyjfarrell avatar urakagi avatar vezquex avatar wdk122 avatar wwahammy avatar xet7 avatar zarvox avatar zenhack avatar zombiezen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sandstorm's Issues

Add documentation about ports/port forwarding

It took me a bit to realize that in addition to the meteor port (3000 by default), the server uses ports 7000+ for proxying connections to the apps. For those of us that need to forward ports (ie. from a VM or behind a firewall), it'd be nice to have that information documented somewhere upfront.

I'm not sure where best to add this, otherwise I'd make a pull request :)

Consider an uninstall script or sandstorm command

Installing the easy way states: This will install a self-contained and (optionally) auto-updating Sandstorm bundle. It won't touch anything on your system other than your chosen installation directory and (optional) init script.

In addition to the optional init script, the installation process for a root install modifies /usr/local/bin by adding symbolic links to "sandstorm" and "spk".

Consider an uninstall script or sandstorm command

can't install apps on demo server in Iceweasel 17 because document.location.origin === undefined

I went to http://demo.sandstorm.io/ and created a temporary one-hour account, and then upon getting the [Install apps] [Upload an app] [Restore a backup] options, selected [Install apps]. This redirected me to https://sandstorm.io/apps/?host=undefined, which unsurprisingly can't figure out where to install the apps I try to select. And neither can I. Please help me, Obi-Wan! You're my only hope!

I'm in Iceweasel 17.0.10 if it matters.

how to re-configure oauth set-up?

while I was trying to get the oauth stuff figured out, the only way I could see to get sandstorm to re-do the oauth set-up was to rm -rf /opt/sandstorm and start again.

Surely there's a better way.

No app name in sandstorm-pkgdef template

Should implement this ASAP so that the workaround to pull app name from the create action doesn't have to stick around for long. Once more apps are out there, this becomes harder and harder to fix.

If any other general app manifest type things are going to be needed down the line, might not hurt to implement them now as well.

Frame restrictions prevent remoteStorage apps from being run

I want to port Litewrite to Sandstorm. When trying to connect to my remoteStorage, I got the following error:

Refused to display 'https://5apps.com/users/sign_in' in a frame
because it set 'X-Frame-Options' to 'SAMEORIGIN'.

The remoteStorage library uses OAuth, so it redirects to the provider for log in and then redirects back. Is there a possibility for apps to say it’s ok to redirect? Or what do you recommend we do?

cc @michielbdejong @skddc @galfert for @remotestorage

Wildcard subdomains make SSL expensive

If I want to run my sandstorm instance over SSL, I have to either pay $300/year for a wildcard cert or convince everyone to trust my self-signed certificates.

I assume the technical reason for the subdomains is to prevent cookies being shared?
Is there another way to achieve this?

Kernel 3.13 requirement

I am sure there are good reasons why you require kernel 3.13 or newer, but I think you should reconsider this anyway. RHEL/CentOS 7 for example comes with kernel 3.10 and this is not going to change till version 8. Since this software targets servers, it should at least support the latest versions of the major server distributions.

Provide a Vagrantfile to allow for easier development

(I actually didn't know if I should put this in a PR or as an issue, so we'll start here and I can make a pull if it would be easier)

I am a huge fan of "batteries included" distributions, especially when dealing with software that has a lot of dependencies that must be just so.

Toward that end, please find a Vagrantfile here that will provision an Ubuntu 13.10 amd64 Linux VM and after a few minutes of downloads and compilation, the user will be a proud owner of their own sandstorm server.

I have included some caching aspects to it, so if the user already has the git repos locally, just place this Vagrantfile in the parent directory of all 3 and it will use the local clones instead of re-cloning. Similar tricks are available for the .deb files, if one finds oneself tearing the VM down a lot (as I did while testing this setup).

local.sandstorm.io works in Chromium, not Firefox

Steps to reproduce:

What should happen:

  • Loads Sandstorm

What happens instead:

Notes (sandstorm.conf):

SERVER_USER=sandstorm
PORT=6080
MONGO_PORT=6081
BIND_IP=127.0.0.1
BASE_URL=http://local.sandstorm.io:6080
WILDCARD_HOST=*.local.sandstorm.io:6080
MAIL_URL=
UPDATE_CHANNEL=dev

localStorage wiped on app restart

Since the remoteStorage function did not work (#90), I was hoping for the localStorage-use in Litewrite to make up for it.

But every time I ran and exited spk dev, the localStorage (and hence the notes) were wiped. Will this happen in production as well or is this only a function of spk dev?

cc @jorin-vogel

Error when clicking on Mailpile cog

I got the following error whenever I click "New Mailpile Mailbox" (occurs 129k into installation process).

Error: remote exception: remote exception: expected buffer.size() > 0; Sandboxed server returned no data.
C++ location:(remote):??
type: permanent localBug

If I then click the Sandstorm logo, then select the new "Untitled Mailpile Mailbox" it loads correctly (as far as I can tell).

How to change "localhost:3000"?

I'm trying to run my sandstorm host on an actual server on the internet; so I want to change "localhost" to my domain name, and 3000 to 80.

I've already discovered that I "meteor --port 80" won't work unless I first do these:
sudo setcap 'cap_net_bind_service=+ep' ~/.meteor/tools/latest/mongodb/bin/mongod
sudo setcap 'cap_net_bind_service=+ep' ~/.meteor/tools/latest/bin/node

However:

  1. When I load the new page in the browser on port 80, it doesn't seem to work. Chrome's dev console doesn't report any failed network requests; but something must be wrong with the websocket that gets created.
  2. Also, "localhost:3000" seems to be hardcoded somewhere as the redirect url for Google oauth.

File list does not scroll

If you create enough files, the bottom options on the menu (install, upload, about) disappear off the bottom of the screen, followed shortly by your oldest apps.

(Yes, I created a bunch of blank files to test this. And now, am wishing we could check and mass delete files.)

Feature Request: Dedicated Game Server Apps

Hi there.

Have you given any Thought about Dedicated Game Servers.
It may not be Possible to Provide the Closed Source ones, but there are a few very popular OpenSource ones like Bukkit for Minecraft.

App installation “breaks the back button”

Twice I have attempted to follow this procedure:

  1. Go to https://sandstorm.io/apps/
  2. Pick an app, get to the /install/... page from the actual Sandstorm server.
  3. Confirm the installation.
  4. Decide I want to go look at the list of available apps again.
  5. Click the back button twice to get there.

What happens instead is the /install/... page immediately forwards me to the home page, so I can't go back past it.

The installation page should not do this; instead, it should turn into a message “You have already installed this app” and refrain from any redirection.

Perhaps it could also be made into a useful "package management" page with things like an uninstall button (immediate undo!), and information like the app's name-on-the-home-screen so the user can find it if it came up under a name they didn't expect (that really ought to be a pet-name system btw).

This is especially problematic for “mobile” browsers, where there may be no way to go back skipping over the install page, and “back” may be part of the system UI and not just the web browser.

Default local config doesn't work when blocking third-party cookies

What I did:

  1. install sandstorm build 50 (shell history and sandstorm.conf below)
  2. set up client id via developers.google.com
  3. sign in to this local sandstorm
  4. install ipython notebook
  5. hit "New ipython notebook"

What I expected:

  • to visit a new ipython notebook

What actually happened:

Error: Unauthorized [403]
    at Proxy.makeContext (app/server/proxy.js:713:11)
    at app/server/proxy.js:798:17
    at invokeCallback (/programs/server/npm/es6-promise/main/node_modules/es6-promise/dist/commonjs/promise/promise.js:53:15)
    at publish (/programs/server/npm/es6-promise/main/node_modules/es6-promise/dist/commonjs/promise/promise.js:98:5)
    at publishFulfillment (/programs/server/npm/es6-promise/main/node_modules/es6-promise/dist/commonjs/promise/promise.js:204:3)
    at flush (/programs/server/npm/es6-promise/main/node_modules/es6-promise/dist/commonjs/promise/asap.js:35:5)
    at process._tickCallback (node.js:419:13)

Using Show Debug Log, I see:

** SANDSTORM SUPERVISOR: Grain supervisor crashed due to signal.

To see if it's a problem with the ipython notebook app, I tried tinytinyrss. Same symptoms.

sandstorm.log sheds little light. The entries leading up to the js stacktrace are:

** Mongo started; now starting front-end...
Downloading app: http://sandstorm.io/apps/ipython-notebook2.spk
Verifying app: /var/sandstorm/downloads/f03959e01b8bb68c574773d8bf31a150.unverified
Unpacking app: /var/sandstorm/downloads/9e3c9db17606b138b087535b0b187ea1.verified
Analyzing app: /var/sandstorm/downloads/9e3c9db17606b138b087535b0b187ea1.verified
App ready: /var/sandstorm/apps/9e3c9db17606b138b087535b0b187ea1
Error: Unauthorized [403]
    at Proxy.makeContext (app/server/proxy.js:713:11)

In case it helps, bash history (lightly edited to elide looking at files etc.):

 1999  cd Desktop/
 2000  curl https://install.sandstorm.io > install.sh
 2001  less install.sh 
 2002  mkdir sandstorm-hacktivation
 2003  mv install.sh sandstorm-hacktivation/
 2004  cd sandstorm-hacktivation/
 2005  sudo bash install.sh
 2006  sandstorm help
 2007  df /opt/sandstorm/
 2008  df -h /opt/sandstorm/
 2011  sudo lvextend -L+5G /dev/pavg/pav_win
 2013  sudo resize_reiserfs /dev/pavg/pav_win
 2014  df -h /opt/sandstorm/
 2025  sudo less /opt/sandstorm/var/log/sandstorm.log

and sandstorm.conf:

SERVER_USER=sandstorm
PORT=6080
MONGO_PORT=6081
BIND_IP=127.0.0.1
BASE_URL=http://localhost:6080
WILDCARD_HOST=*.local.sandstorm.io:6080
MAIL_URL=
UPDATE_CHANNEL=dev

In case it's related to kernel version or something

$ uname -a
Linux pav 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Enable subscribe bookmarklet for Tiny Tiny RSS (requires inbound APIs)

I'd like to be able to use Tiny Tiny RSS's subscribe bookmarklet with my installation on sandstorm.

What URL should I use?

I expect this depends on working out some of the "exporting an API" issues (odd... I don't find that in the issues list here).

p.s. I wondered a little bit about whether this is a good place to file this request; consider this an early support request from a beta customer. Let me know if there's a better place.

Installation complete. Click "My Files" to create a new file with this app.

App Installed page still refers to old file picker menu. In this case, the only clearly presented choice is "Upgrade Files". I suggest perhaps a smaller link below the upgrade files button that says "Do not upgrade files".

In this case, I am updating an app, but do not want to update my files. It is not clear where I should go from here. (If I, you know, don't already know my way around Sandstorm.)

Actually, there's a general point about it saying App Installed instead of App Upgraded, and that it really shouldn't be telling me how to create new files with this app on an upgrade page anyways.

myfilesmenu

unshare(CLONE_NEWPID): Operation not permitted in install script

When trying to install sandstrom.io as root on a fresh Ubuntu 14.04 LTS 64bit via

curl https://install.sandstorm.io | bash

I get the following error:

Start sandstorm at system boot? [yes] 
 Adding system startup for /etc/init.d/sandstorm ...
   /etc/rc0.d/K20sandstorm -> ../init.d/sandstorm
   /etc/rc1.d/K20sandstorm -> ../init.d/sandstorm
   /etc/rc6.d/K20sandstorm -> ../init.d/sandstorm
   /etc/rc2.d/S20sandstorm -> ../init.d/sandstorm
   /etc/rc3.d/S20sandstorm -> ../init.d/sandstorm
   /etc/rc4.d/S20sandstorm -> ../init.d/sandstorm
   /etc/rc5.d/S20sandstorm -> ../init.d/sandstorm
*** Uncaught exception ***
src/sandstorm/run-bundle.c++:815: error from OS: unshare(CLONE_NEWPID): Operation not permitted
stack: 0x467fdd 0x46b634 0x426a86 0x425d69 0x425d5a 0x4733ff 0x474a0d 0x474cf6 0x468636 0x46d81d 0x407292 0x4bc3b0 0x401227

Am I missing something?

uname -a
Linux foobar 3.13.0-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux

Confusing error message when server not started as root

I installed sandstorm a couple of days ago as a normal user and the server ran fine. Today I decided to install it as root on a fedora-20 system, and the the server fails as follows. I chose all default values when installing except the user account.

** Starting Sandstorm at: Thu Aug 21 15:23:31 2014
*** Uncaught exception ***
src/sandstorm/run-bundle.c++:1539: error from OS: chmod("../tmp", 0770): No such file or directory
stack: 0x467fdd 0x46b634 0x40fa6a 0x426a24 0x425d69 0x425d5a 0x4733ff 0x474a0d 0x474cf6 0x468636 0x46d81d 0x407292 0x4bc3b0 0x401227

Error looking up DNS TXT records for host '...': queryTxt ECONNREFUSED

I've installed sandstorm on a DreamCompute instance (DreamCompute is a PaaS based on OpenStack). I've set up ngnix to point to the sandstorm instance.

Unfortunately I don't have access to wildcard DNS so I've tried to hack it by setting up:

  • sub.mydomain.com A record pointing to the server
  • sstorm-7000.sub.mydomain.com - sstorm-7009.sub.mydomain.com CNAME records pointing to sub.mydomain.com
  • sandstorm-www.sub.mydomain.com TXT record with the value "true"

The last entry is because when I hit https://sub.mydomain.com in my browser I get the error:

Error looking up DNS TXT records for host 'sub.mydomain.com': queryTxt ECONNREFUSED

After a look around I tracked down the code throwing the error and from reading it I thought that adding the TXT record might help... It didn't 😦

Any idea what's going on? Is there any chance I can get this (semi-) working without wildcard DNS?

Return home on grain deletion.

Just a polish item: Deleting a grain returns the message "No such grain." Returning an error message makes it seem like the user did something wrong. Would it be possible to send them back to the home screen?

About page does not scroll.

Text clearly goes on past the bottom of my screen, but the about page does not scroll. Some of the legal stuff gets cut off.

Need info on unneeded/failed installs.

So, wasn't sure if I had the release version of Ghost or not (I remember finding a manual install link somewhere a while back), and I clicked Install on the apps page, and I get a completely blank install app page. It does not redirect anywhere, it just sits there.

I suspected that maybe it was because I already had the latest version installed, but if I click install on any other app I already have installed, they just redirect me through to Sandstorm. (It would be good for these to at least tell me I already have the latest version already before doing so.)

No file extension on grain backup with Firefox

Not getting the .zip file extensions on grain backups with Firefox. Got them correctly with Chrome and IE11. Tested with Windows 7.

Side note: Something like .grain might be preferable since they're not really intended to be opened by users. If you know enough to poke around in it, you probably should know enough to rename the extension yourself.

Porting ownCloud

I’m trying to port ownCloud to Sandstorm at the moment but have some problems/questions regarding the porting guide:

  • The demo command spk init -p 10000 -- node main.js isn’t really applicable since the default port is just 80 and the app runs by default (simple LAMP). Do we have to define a specific port and a launch command – if so, how?
  • dependencies (and submodules) aren’t mentioned anywhere – how are they handled?
  • permissions neither
  • setting up a user account and choosing/configuring the database

To answer these questions I had a look at the Wordpress port: https://github.com/dwrensha/wordpress-sandstorm/commits/master – but it’s very specific and a lot of customization, so is there any general documentation on this?

I do have a script to handle dependencies, permissions and pulling of apps: https://github.com/jancborchardt/owncloud-scripts/blob/master/owncloud-setup.sh could that be used?

(Also cc @DeepDiver1975 @PVince81 from ownCloud for info.)

`spk dev` fails if a file instead of a directory named tmp is mapped in

For example, if you have a file (not a directory) named tmp in the current working directory, and your sourceMap has "." as its first searchPath, then spk dev will fail when you try to create a grain. sandstorm.log outputs the following:

*** Uncaught exception ***
src/sandstorm/supervisor-main.c++:883: error from OS: 16m,nr_inodes=4k,mode=770"): Not a directory
stack: 0x7fae9b0300ad 0x7fae9b033aa7 0x417e5f 0x411dc4 0x411a72 0x411a59 0x411a4a 0x7fae9b03c9ce 0x7fae9b03e357 0x7fae9b030748 0x7fae9b036b43 0x40810a 0x7fae9a043b45 0x407b59
Exception while invoking method 'openSession' Error: Grain never came up.
at Object.Future.wait (/programs/server/node_modules/fibers/future.js:326:15)
at waitPromise (app/server/proxy.js:70:35)
at startGrainInternal (app/server/proxy.js:343:10)
at continueGrain (app/server/proxy.js:262:10)
at Meteor.methods.openSession (app/server/proxy.js:135:19)
at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1487)
at packages/livedata/livedata_server.js:643
at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
at packages/livedata/livedata_server.js:642
at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
- - - - -
at Socket. (app/server/proxy.js:338:14)
at Socket.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)
sandstorm-supervisor exited with code: 1

Missing Dependency Iron Router

Hello,

On the step 'meteor' I get the following error even after running mrt

Started proxy.
=> Meteor 0.7.2 is available. Update this project with 'meteor update'.
=> Started MongoDB.
=> Errors prevented startup:

While building the application:
error: no such package: 'iron-router'

Server-side outgoing DNS fails if resolv.conf wasn't ready when Sandstorm started

I'm probably doing something else dumb...

I've accessed my self hosted sandstorm instance over https proxied by nginx. I first set up Github authentication. When I try to log in a github window opens and closes and closes then the message "Internal server error" appears in the signin overlay at the top right of the screen.

Looking at /opt/sandstorm/var/log/sandstorm.log I see the following message:

{"line":"230","file":"oauth_server.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Github. getaddrinfo ENOTFOUND","time":{"$date":1406409017886},"level":"warn"}
Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Github. getaddrinfo ENOTFOUND
    at getAccessToken (packages/github/github_server.js:46)
    at Object.userAgent [as handleOauthRequest] (packages/github/github_server.js:5)
    at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:8)
    at middleware (packages/oauth/oauth_server.js:89)
    at packages/oauth/oauth_server.js:62

I thought I'd try Google instead...

When I click "Sign in with google" after choosing my account (my browser is signed into two google apps accounts) I see the following:

screen shot 2014-07-26 at 22 05 15

Nothing about this shows up in the logs.

Any ideas?

Python urllib gives `urllib2.URLError` when invoked from `spk dev`

Python urllib2 gives urllib2.URLError when invoked from spk dev.

$ python --version
Python 2.7.6

Sandstorm debug log:

** SANDSTORM SUPERVISOR: Starting up grain.
 * Running on http://127.0.0.1:5000/
 * Restarting with reloader
127.0.0.1 - - [03/Sep/2014 02:13:53] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/web.py", line 9, in home
    f = urllib2.urlopen('http://google.com')
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>

Steps to reproduce:

$ sudo pip install flask
$ curl https://install.sandstorm.io | bash
$ cd test/
$ spk init -p 5000 -- python web.py
$ spk dev

Where web.py is:

import urllib2

from flask import Flask

app = Flask(__name__)

@app.route('/')
def home():
    f = urllib2.urlopen('http://google.com')
    return f.read()

if __name__ == '__main__':
    app.run(debug=True)

Reproducible in Ubuntu 14.04 Desktop and Ubuntu 14.04 Server AWS AMI.

I'm gussing sandbox restrictions, but whatever the case I don't have any clue on how to solve this problem.

Adding yourself as member of the server’s group by default?

In the porting guide it says:

Make sure to make yourself a member of the server's group, usually called sandstorm. You may have to log out and back in before this takes effect.

However, the command right above that curl https://install.sandstorm.io | bash has the default for »Add yourself to the sandstorm group« set to no. Wouldn’t it make sense to default that to yes?

Cookie should have a 'path' field.

sharelatex manages sessions by writing a session cookie to the '/' path. When I run it in Sandstorm, it writes a bunch of different session cookies at different paths, and then gets confused about which one is real and doesn't let me log in.

sandstorm status command is misleading when run as the wrong user

$ sandstorm status
Sandstorm is not running.
$ sudo sandstorm status
Sandstorm is running; PID = 4017
$ sudo -u sandstorm sandstorm status
Sandstorm is running; PID = 4017

The sandstorm status command should not report incorrect information when it is run as the wrong user. Preferably, it should display the correct information, but if that is not possible, it should report an error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.