Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:57:27+00:00 2026-05-26T08:57:27+00:00

I currently have 2 virtual machines running, one is a server and one is

  • 0

I currently have 2 virtual machines running, one is a server and one is a client. They are both running Ubuntu. I created a C++ program to connect to a MYSQL server. When i open up a terminal in the server VM, the c++ program compiles and runs PERFECTLY!

BUT, when I try to run it on the client, it wont work at all. The code compiles perfectly fine but when i type “./main” to start the program, NOTHING comes up. It’s just a blank screen. I totally do not get why this is happening. The code is exactly the same on both the client and the server, but for some reason, it wont display ANY of my code when I run it on the client side. Below are pictures to show what i mean

Here is a link to view a screenshot of what I am talking about (https://i.stack.imgur.com/JG3QM.jpg). In the first picture, I compile the program, which compiles fine. I then run the program but NOTHING outputs to the screen.

The second picture shows the program being ran on the server and shows what is suppose to be output on the screen after the initial ./main command

What should I do to find out what’s going wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:57:27+00:00Added an answer on May 26, 2026 at 8:57 am

    Either add logging to your program or run it under strace to figure out where it’s getting stuck or what it’s waiting for.

    At the most basic level, you add logging by adding log statements. Say your code looks like this:

    a();
    b();
    c();
    output_stuff();
    

    Temporarily change it to:

    cout << "about to do a" << endl;
    a();
    cout << "about to do b" << endl;
    b();
    cout << "about to do c" << endl;
    c();
    cout << "done with c" << endl;
    output_stuff();
    

    Then see what messages you get. If you don’t get “about to do a” then it’s a constructor for a global object or process initialization that’s hanging. If you get “about to do a” but not “about to do b”, then it’s a() that’s hanging. And so on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My MySql server currently has 235 databases. Should I worry? They all have same
Currently I have 2 virtual test servers(win2003). One is on which websites are deployed
I have two servers (virtual machines - I can remotely connect to these) -
I currently have speakers set up both in my office and in my living
We currently have a company email server with Exchange, and a bulk email processing
I currently have a fairly robust server-side validation system in place, but I'm looking
I currently have heavily multi-threaded server application, and I'm shopping around for a good
I'm currently working with the vmrun-Tool, to control VMWare Virtual Machines. I'm using VMWareWorkstation
I'm trying to establish a best practice for Virtual Machines for developers. Currently we
I have an Oracle 8.1.7 Server running on Windows 2000 Advanced Server in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.