node.js - Using port 80 with Node on Digital Ocean Error: listen EADDRINUSE -


i trying run simplest of node servers on digital ocean server. developed , tested code using port 8080 without problems. however, want use port 80 not need specify port when navigating ip address of server (so default).

when change port 80 , run app sudo error: listen eaddrinuse when not have other applications running on server (at all). there way clear port 80 use?

i checked here how fix error: listen eaddrinuse while using nodejs? none of suggestions worked. program on server.

there no other processes in code listening on port. there no app running on server @ not understand how port in use. help

edit. here running netstat returns:

active internet connections (w/o servers) proto recv-q send-q local address           foreign address         state       tcp        0      0 192.241.228.76:ssh      mobile-166-137-17:62351 established tcp        0      0 192.241.228.76:ssh      199-241-200-214.p:41732 established tcp        0      0 192.241.228.76:9090     199-241-200-214.p:38480 established tcp        0      0 192.241.228.76:ssh      mobile-166-137-17:45329 established tcp        0      0 192.241.228.76:ssh      199-241-200-214.p:47247 established tcp        0    308 192.241.228.76:ssh      199-241-200-214.p:44441 established active unix domain sockets (w/o servers) proto refcnt flags       type       state         i-node   path unix  8      [ ]         dgram                    7710     /dev/log unix  3      [ ]         stream     connected     1113212   unix  3      [ ]         stream     connected     7405     @/com/ubuntu/upstart unix  3      [ ]         stream     connected     7394      unix  3      [ ]         stream     connected     1113211   unix  2      [ ]         dgram                    9255      unix  3      [ ]         stream     connected     7681      unix  3      [ ]         stream     connected     7617     /var/run/dbus/system_bus_socket unix  3      [ ]         stream     connected     1113404   unix  3      [ ]         stream     connected     1113682   unix  2      [ ]         dgram                    1113070   unix  2      [ ]         dgram                    1113287   unix  3      [ ]         stream     connected     1113683  /var/run/dbus/system_bus_socket unix  3      [ ]         stream     connected     1113675   unix  3      [ ]         stream     connected     7601      unix  3      [ ]         stream     connected     7602      unix  3      [ ]         stream     connected     7631     @/com/ubuntu/upstart unix  3      [ ]         stream     connected     1114471   unix  2      [ ]         dgram                    1111881   unix  3      [ ]         stream     connected     1113411   unix  3      [ ]         stream     connected     1113219  /var/run/dbus/system_bus_socket unix  3      [ ]         stream     connected     1113218   unix  3      [ ]         stream     connected     1112008   unix  3      [ ]         stream     connected     8858     @/com/ubuntu/upstart unix  3      [ ]         dgram                    7439      unix  3      [ ]         stream     connected     7682     /var/run/dbus/system_bus_socket unix  3      [ ]         stream     connected     8836      unix  3      [ ]         stream     connected     1114472   unix  3      [ ]         dgram                    7438      unix  3      [ ]         stream     connected     1113412  /var/run/dbus/system_bus_socket unix  3      [ ]         stream     connected     1113676   unix  2      [ ]         dgram                    1113552   unix  3      [ ]         stream     connected     1113405   unix  3      [ ]         stream     connected     7616      unix  3      [ ]         stream     connected     7594      unix  3      [ ]         stream     connected     1112002   unix  2      [ ]         dgram                    1114349   unix  3      [ ]         stream     connected     1112001   unix  3      [ ]         stream     connected     1112009  /var/run/dbus/system_bus_socket 

and here running ps -ax returns

 pid tty      stat   time command     1 ?        ss     0:05 /sbin/init     2 ?        s      0:00 [kthreadd]     3 ?        s      0:01 [ksoftirqd/0]     5 ?        s<     0:00 [kworker/0:0h]     7 ?        s      0:09 [rcu_sched]     8 ?        s      0:00 [rcu_bh]     9 ?        s      0:00 [migration/0]    10 ?        s      0:14 [watchdog/0]    11 ?        s<     0:00 [khelper]    12 ?        s      0:00 [kdevtmpfs]    13 ?        s<     0:00 [netns]    14 ?        s<     0:00 [writeback]    15 ?        s<     0:00 [kintegrityd]    16 ?        s<     0:00 [bioset]    17 ?        s<     0:00 [kworker/u3:0]    18 ?        s<     0:00 [kblockd]    19 ?        s<     0:00 [ata_sff]    20 ?        s      0:00 [khubd]    21 ?        s<     0:00 [md]    22 ?        s<     0:00 [devfreq_wq]    23 ?        s      2:16 [kworker/0:1]    24 ?        s      0:00 [khungtaskd]    25 ?        s      0:00 [kswapd0]    26 ?        sn     0:00 [ksmd]    27 ?        s      0:00 [fsnotify_mark]    28 ?        s      0:00 [ecryptfs-kthrea]    29 ?        s<     0:00 [crypto]    41 ?        s<     0:00 [kthrotld]    44 ?        s      0:00 [scsi_eh_0]    45 ?        s      0:00 [scsi_eh_1]    65 ?        s<     0:00 [deferwq]    66 ?        s<     0:00 [charger_manager]   119 ?        s      0:04 [jbd2/vda-8]   120 ?        s<     0:00 [ext4-rsv-conver]   254 ?        s      0:00 upstart-udev-bridge --daemon   259 ?        ss     0:00 /lib/systemd/systemd-udevd --daemon   321 ?        ss     0:00 dbus-daemon --system --fork   351 ?        ss     0:00 /lib/systemd/systemd-logind   354 ?        ssl    0:19 rsyslogd   363 ?        s      0:00 upstart-file-bridge --daemon   367 ?        s<     0:00 [kpsmoused]   371 ?        s      0:00 [kworker/0:2]   463 ?        s<     0:00 [kvm-irqfd-clean]   730 ?        s      0:00 upstart-socket-bridge --daemon   773 tty4     ss+    0:00 /sbin/getty -8 38400 tty4   777 tty5     ss+    0:00 /sbin/getty -8 38400 tty5   783 tty2     ss+    0:00 /sbin/getty -8 38400 tty2   784 tty3     ss+    0:00 /sbin/getty -8 38400 tty3   786 tty6     ss+    0:00 /sbin/getty -8 38400 tty6   811 ?        ss     0:12 /usr/sbin/sshd -d   817 ?        ss     0:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket   819 ?        ss     0:02 cron   821 ?        ss     0:00 atd   898 tty1     ss+    0:00 /sbin/getty -8 38400 tty1   933 ?        s<     0:00 [kworker/u3:1]   938 ?        s      0:00 [kauditd] 24995 ?        s      0:00 [kworker/u2:1] 29226 ?        s      0:07 [kworker/u2:0] 29542 ?        ss     0:00 screen 29543 pts/2    ss+    0:00 /bin/bash 30826 pts/6    ss+    0:00 -bash 30892 ?        sl     0:00 nodejs index.js 30962 pts/1    r+     0:00 ps -ax 

i got error. seems node throw error, if address isn't in use, if fails attach process port reason.

in case (a digital ocean droplet) attaching port 80 required sudo.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -