question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running on remote host

See original GitHub issue

To reproduce: setup mailslurper on a vagrant. In my example below, I am using Ubuntu 14.04 and the vagrant will have the IP 192.168.33.10.

On the vagrant download and extract mailslurper 1.11. Modify config to look like the following:

{
        "wwwAddress": "192.168.33.10",
        "wwwPort": 8080,
        "serviceAddress": "192.168.33.10",
        "servicePort": 8085,
        "smtpAddress": "192.168.33.10",
        "smtpPort": 2500,
        "dbEngine": "SQLite",
        "dbHost": "",
        "dbPort": 0,
        "dbDatabase": "./mailslurper.db",
        "dbUserName": "",
        "dbPassword": "",
        "maxWorkers": 1000,
        "autoStartBrowser": false,
        "keyFile": "",
        "certFile": ""
}

Now open up a browser and go to http://192.168.33.10:8080 Mailslurper should appear and you should be greeted with the alert: “There was an error getting mail items”. If you check the network requests, you’ll notice that there is a request for: “http://0.0.0.0:8085/mail?pageNumber=1&message=&start=2016-03-01&end=2016-03-31&orderby=date&dir=desc&_=1459175709827”. Which should not be pointing at 0.0.0.0.

I think this is some sort of timing issue, because a request to http://192.168.33.10:8080/servicesettings returns the expected json:

{
    "serviceAddress": "192.168.33.10",
    "servicePort": ​8085,
    "version": "v1"
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
canadiannomadcommented, Sep 27, 2017

Hi, we are still experiencing this issue. This bug effectively limits the use of the web interface to a local machine. The web browser trying to make an ajax connection with http://0.0.0.0:(port) is just plain weird. The easiest solution I can imagine would just be to add another configuration that allows the administrator to set the outside host name/uri. Would be useful in cases where a load balancer is in the way as well.

1reaction
philippe-granetcommented, Apr 19, 2016

I reproduce the problem. I use Vagrant with a VM only configured with NAT network, so my VM is not directly accessible, i use port forwarding to access mailslurper webapp. My configuration:

{
    "wwwAddress": "0.0.0.0",
    "wwwPort": 4300,
    "serviceAddress": "0.0.0.0",
    "servicePort": 4301,
    "smtpAddress": "0.0.0.0",
    "smtpPort": 2500,
    "dbEngine": "SQLite",
    "dbHost": "",
    "dbPort": 0,
    "dbDatabase": "./mailslurper.db",
    "dbUserName": "",
    "dbPassword": "",
    "maxWorkers": 1000,
    "autoStartBrowser": false,
    "keyFile": "",
    "certFile": ""
}

Port redirection on my VM : TCP 4300->4300 TCP 4301->4301 TCP 2500->2500

Server start log:

2016/04/19 18:13:05 MailSlurper: INFO - Starting MailSlurper Server v1.11.1                                                                                                                   
2016/04/19 18:13:05 libmailslurper: INFO - Connecting to database                                                                                                                             
2016/04/19 18:13:05 INFO - Creating tables...                                                                                                                                                 
2016/04/19 18:13:05 INFO - Created tables successfully.                                                                                                                                       
2016/04/19 18:13:05 libmailslurper: INFO - Worker pool configured for 1000 worker(s)                                                                                                          
2016/04/19 18:13:05 libmailslurper: INFO - SMTP listener running on 0.0.0.0:2500                                                                                                              
2016/04/19 18:13:05 libmailslurper: INFO - 1 receiver(s) listening                                                                                                                            
2016/04/19 18:13:05 MailSlurper: INFO - HTTP listener started on 0.0.0.0:4300                                                                                                                 
MailSlurper: INFO - 2016/04/19 18:13:05 Service Tier HTTP listener started on 0.0.0.0:4301 

Now open up a browser and go to http://my-host-ip:4300, it makes a request to http://my-host-ip:4301/servicesettings returning wrong json:

{ “serviceAddress”: “0.0.0.0”, “servicePort”: ​4301, “version”: “v1” }

So next, all request to service endpoint tries to communicate with http://0.0.0.0:4301, which is not reachable from my host

If I modify serviceSettings key that is cached in the browser localStorage like this:

{"serviceAddress":"my-host-ip","servicePort":4301,"version":"v1"}

then all works fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error running on Remote Host #216 - GitHub
Getting this error trying to run on an Ubuntu Stable 20.4 remote host. "-g" is on for every compiler invocation. 0.2.2 extension version ......
Read more >
Troubleshoot Remote desktop disconnected errors
On the Remote Desktop server, click Start, click Run, type cmd, and then click OK. At the command prompt, type qwinsta, and then...
Read more >
Control-M Jobs running on Remote Hosts fails after 6 minutes ...
Control-M Jobs running on Remote Hosts fails after 6 minutes with the the message: "Error: Could not find remote sysout, job failed to...
Read more >
Encountering Error When Running on Remote Server
Once installed, I can then use (install remotely) via the Microsoft remote SSH extention onto a given server. The version installed is 21.4.0....
Read more >
Error running console (from remote host)
I have set up PyCharm 2016.2.3 to work with remote Ubuntu 16.04 server. Everything works great - code running, debugging, I have even ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found