Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
expressjs code listing on tcpv6 port only rather than ipv4

Env is :- ubuntu 14.04

My node version is :-

 node --version
 v6.9.4

Here is my code.

// dependencies :-
 var express = require ('express');
var mongoose = require ('mongoose');
var bodyParser = require ('body-parser');

var app = express();
app.use(bodyParser.urlencoded({extended: true}) );
app.use (bodyParser.json());


// routes :
api=require('./routes/api');
app.post('/register',api.register);
app.post('/authenticateUser',api.authenticateUser)
app.post('/update',api.updateUser);
//start server 

app.listen (8070);

console.log('Server Started & listing at 8070 ');

It was listing on both IPv4 & IPV6 till 2 days back my code was working fine.

But now all the way in between it seems like express code is only listing on tcp6 ( IPv6 ). Googled it but everbody faced this issue in 0.x.x.

Here is output of terminal

xxx@ubuntu:~$ netstat -a | grep 8070
 tcp6       0      0 [::]:8070               [::]:*                  LISTEN 

My Code seems to be perfect.Any ideas or any clue whats happening to system ????

Output of interfaces is :-

eth0      Link encap:Ethernet  HWaddr 00:0c:29:d1:ce:56  
          inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed1:ce56/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:26221 errors:0 dropped:0 overruns:0 frame:0
      TX packets:10916 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:27443150 (27.4 MB)  TX bytes:1365295 (1.3 MB)

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:9366 errors:0 dropped:0 overruns:0 frame:0
      TX packets:9366 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:5748317 (5.7 MB)  TX bytes:5748317 (5.7 MB)
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I found the cause on my own after more investigation.

It seems like on my system, as I was running ubuntu VM under my Windows machine, the Windows IPv6 was disabled & and on VM IPv6 was not disabled.

Disabled IPV6 on ubuntu machine everything works fine.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!