Closed facundomedica closed 7 years ago
When you say "Not working", do you get an error page eventually, or just blank? Did you setup a firewall to stop non-80/443 port requests? Can I get a url for this app?
@josegonzalez Thanks for the swift response. It just keeps loading until browser fails ("Safari can't open the page"). I didn't set up anything, just used the one click app on Digital Ocean as said in many tutorials. The url I'm using is http://my.server.ip.address:43444. If you need the real one just ask.
More info:
dokku logs testing
returns this:
2016-12-16T16:38:28.258861746Z app[web.1]: Example app listening on port 3000!
(3000 is not the real port, it was hardcoded, I do this actually: var port = process.env.PORT || 8080;
, and now it shows port 5000)
Even more info:
Tried curl: curl: (7) Failed to connect to xxx.xxx.xx.xx port 43444: Operation timed out
This doesn't sound like the default heroku nodejs app, since that one definitely listens on the proper port.
So to clarify you hardcode the 3000
port in the console log, but app.listen()
uses var port = process.env.PORT || 8080
?
Def not the default app: https://github.com/heroku/node-js-sample/blob/master/index.js#L4
Yeah, I just did your reproduce steps and it works for me.
@joshmanders yes. @josegonzalez I was testing other things to try make it work. Now I've tried again the sample app (expecting a miracle or something) and didn't work.
So, with the default app it says: 2016-12-16T17:16:52.454899761Z app[web.1]: Node app is running at localhost:5000
I don't know how to debug this.
I've also tried rebooting my server, but didn't help
Odd, maybe new node or whatever defaults to not listening on 0.0.0.0
interface. Thats what needs to happen, not localhost. I don't know enough about node, but if you fix that it should work fine.
Are you absolutely positive it is the node-js-sample
app from heroku? Also make sure that you're not pushing and retrying the same port, as it should assign a new port to the next release.
@josegonzalez I've tried that (and just tried again) and it doesn't work. @joshmanders I'm 100% sure about that. What sounds weird is that it always returns the same port.
I'll try making a new app
Can you join the slack #dokku channel so that we can work through this in real time?
I'll document my steps here:
git clone https://github.com/heroku/node-js-sample.git
on my local computerdokku apps:create nodesample
cd node-js-sample
on my local computergit remote add dokku dokku@xxx.xxx.xx.xx:nodesample
on my local computergit push dokku master
on my local computer@joshmanders how do I join that channel?
You can join us on slack at https://glider-slackin.herokuapp.com/
Okay, I joined the slack channel and @joshmanders guide me through a lot of steps just to find out that I had a firewall setted up. It was disabled using this command: sudo ufw disable
.
FWIW I recently ran into this: and the ufw
above resolved my issue. More specifically I have my app on 3000
, and had to do:
$ sudo ufw allow 3000
Might be good to add this as a note/step in the docs? I'd be happy to open a PR
@joelgriffith mind making a pr?
As an aside, commenting an a year+ old issue isn't great etiquette, it notifies folks that may no longer be using the repo in question.
Sure, can understand that sentiment, was hoping to help anyone later who's searching for resolutions later (which is how I stumbled upon this thread).
Description of problem:
I've installed Dokku using the one click app in Digital Ocean, in Ubuntu 16.04. I've tried running the Node JS sample of Heroku and it builds just fine and it outputs a url (Which is my server ip with the port). The problem is that when I put this url on my browser, it tries to load it for a long time but it does nothing. I think is something with related with ports, maybe?
(I'll try to complete most of the things below)
Output of the following commands
uname -a
: Linux XsomenameX-dokku 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linuxfree -m
:docker version
:Client: Version: 1.12.4 API version: 1.24 Go version: go1.6.4 Git commit: 1564f02 Built: Tue Dec 13 00:08:34 2016 OS/Arch: linux/amd64
Server: Version: 1.12.4 API version: 1.24 Go version: go1.6.4 Git commit: 1564f02 Built: Tue Dec 13 00:08:34 2016 OS/Arch: linux/amd64
docker -D info
:Containers: 8 --> THIS LOOKS ODD, I ONLY HAVE ONE APP Running: 1 Paused: 0 Stopped: 7 Images: 17 Server Version: 1.12.4 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 36 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge overlay null Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: apparmor seccomp Kernel Version: 4.4.0-53-generic Operating System: Ubuntu 16.04.1 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 488.5 MiB Name: XsomenameX-dokku ID: LJ2H:FYCT:5DKP:AMOL:R6IL:T5F6:G2GN:OSXH:EASL:IXMS:JPQB:6J2A Docker Root Dir: /var/lib/docker Debug Mode (client): true Debug Mode (server): false Registry: https://index.docker.io/v1/ Insecure Registries: 127.0.0.0/8
sigil -v
:0.4.0
docker run -ti gliderlabs/herokuish:latest herokuish version
:herokuish: 0.3.19 buildpacks: heroku-buildpack-multi v1.0.0 heroku-buildpack-ruby v146 heroku-buildpack-nodejs v91 heroku-buildpack-clojure v75 heroku-buildpack-python v82 heroku-buildpack-java v46 heroku-buildpack-gradle v18 heroku-buildpack-grails v21 heroku-buildpack-scala v72 heroku-buildpack-play v26 heroku-buildpack-php v110 heroku-buildpack-go v44 heroku-buildpack-erlang fa17af9 buildpack-nginx v6 emberjs.tgz latest
dokku version
:0.7.2
dokku plugin
:plugn: 0.2.2 00_dokku-standard 0.7.2 enabled dokku core standard plugin 20_events 0.7.2 enabled dokku core events logging plugin apps 0.7.2 enabled dokku core apps plugin build-env 0.7.2 enabled dokku core build-env plugin certs 0.7.2 enabled dokku core certificate management plugin checks 0.7.2 enabled dokku core checks plugin common 0.7.2 enabled dokku core common plugin config 0.7.2 enabled dokku core config plugin docker-options 0.7.2 enabled dokku core docker-options plugin domains 0.7.2 enabled dokku core domains plugin enter 0.7.2 enabled dokku core enter plugin git 0.7.2 enabled dokku core git plugin logs 0.7.2 enabled dokku core logs plugin named-containers 0.7.2 enabled dokku core named containers plugin nginx-vhosts 0.7.2 enabled dokku core nginx-vhosts plugin plugin 0.7.2 enabled dokku core plugin plugin proxy 0.7.2 enabled dokku core proxy plugin ps 0.7.2 enabled dokku core ps plugin repo 0.7.2 enabled dokku core repo plugin shell 0.7.2 enabled dokku core shell plugin ssh-keys 0.7.2 enabled dokku core ssh-keys plugin storage 0.7.2 enabled dokku core storage plugin tags 0.7.2 enabled dokku core tags plugin tar 0.7.2 enabled dokku core tar plugin
docker inspect CONTAINER_ID
(if applicable): (BEWARE:docker inspect
will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):cat /home/dokku/<app>/nginx.conf
(if applicable):Dockerfile
, the contents of that fileProcfile
.dokku trace on
(BEWARE:trace on
will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):Environment details (AWS, VirtualBox, physical, etc.): DigitalOcean
How was Dokku installed?: One click app
How reproducible:
Steps to Reproduce (After creating a dokku app):
Actual Results:
Not working
Expected Results:
See a "hello world"
Additional info:
nginx -t
:nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful