Issues with C9VNC


#1

I’m having an issue with C9VN,
Now i have it installed along with all the dependancies, and when I run it through the custom runner, the link does work. I click connect and it connects me to my profile. But after this the screen is black. I can’t right click to open up a terminal, I can’t do anything. It’s just a black screen in the browser.

Any idea what I can do with this?


#2

When you start the c9vnc runner, do you see output similar to the following?

2017-04-04 03:48:06,691 INFO supervisord started with pid 19327
2017-04-04 03:48:07,694 INFO spawned: 'novnc' with pid 19330
2017-04-04 03:48:07,696 INFO spawned: 'xvfb' with pid 19331
2017-04-04 03:48:07,698 INFO spawned: 'x11vnc' with pid 19332
2017-04-04 03:48:07,700 INFO spawned: 'fluxbox' with pid 19333
2017-04-04 03:48:08,698 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-04-04 03:48:08,698 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-04-04 03:48:08,698 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-04-04 03:48:08,898 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

You are looking for the four success messages and no further output.

Or do you see output similar to the following?

2017-04-19 19:26:03,362 INFO spawned: 'novnc' with pid 67057
2017-04-19 19:26:03,364 INFO spawned: 'xvfb' with pid 67058
2017-04-19 19:26:03,367 INFO spawned: 'x11vnc' with pid 67059
2017-04-19 19:26:03,373 INFO spawned: 'fluxbox' with pid 67061
2017-04-19 19:26:03,411 INFO exited: novnc (exit status 1; not expected)
2017-04-19 19:26:03,485 INFO exited: xvfb (exit status 1; not expected)
2017-04-19 19:26:03,717 INFO exited: fluxbox (exit status 1; not expected)
2017-04-19 19:26:04,569 INFO spawned: 'novnc' with pid 67069
2017-04-19 19:26:04,571 INFO spawned: 'xvfb' with pid 67070
2017-04-19 19:26:04,572 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-04-19 19:26:04,588 INFO exited: xvfb (exit status 1; not expected)
2017-04-19 19:26:04,621 INFO exited: novnc (exit status 1; not expected)
2017-04-19 19:26:05,625 INFO spawned: 'fluxbox' with pid 67079
2017-04-19 19:26:05,676 INFO exited: fluxbox (exit status 1; not expected)
2017-04-19 19:26:06,679 INFO spawned: 'novnc' with pid 67080
2017-04-19 19:26:06,681 INFO spawned: 'xvfb' with pid 67081
2017-04-19 19:26:06,796 INFO exited: novnc (exit status 1; not expected)
2017-04-19 19:26:06,796 INFO exited: xvfb (exit status 1; not expected)

If you are getting the latter with multiple errors and exits, I have found the following works.

First thing to try is restarting the workspace via the menu Cloud9 > Restart Workspace. Try restarting the runner again.

If that does not work then run the following two commands:

/opt/c9vnc/c9vnc.sh -k

This should kill any existing instance of c9vnc running. You may see the following

error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 224
error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 224
error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 224
error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 224
Xvfb: no process found
x11vnc: no process found
websockify: no process
supervisord: no process found

That’s ok. The next command should then start c9vnc successfully

/opt/c9vnc/c9vnc.sh -f

This will start c9vnc in the foreground and hopefully you see the four success messages now.


A second error message that may appear is

Starting c9vnc daemon
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
For help, use /usr/bin/supervisord -h

To solve this issue open a terminal and look for a stuck supervisord instance. Type into the terminal

ps -ef | grep supervisord

If you see a line in the following format with the following information

ubuntu   2503  1  0 Nov19 ?  00:03:23 /usr/bin/python /usr/bin/supervisord -c /home/ubuntu/.config/supervisord.conf

then kill that process with the command

kill -s SIGTERM 2503

Replacing 2503 with the PID number that appears after ubuntu when you ran the ps command.

Now continue with the two steps outlined above.

/opt/c9vnc/c9vnc.sh -k
/opt/c9vnc/c9vnc.sh -f

#3

thanks I appreciate it. Believe it or not I found a much simpler solution although I dont know if that will apply to everyone. When i follow the link, If I click fullscreen after I connect, for some reason then everything works, then I just minimize again (or exit fullscreen) and everything is peachy keen. I have no idea why that works.


#4

Interesting. :slight_smile:

I’ll give that a try next time it occurs for me and see if that also works.


#5

Strange, I get a bunch of CORS errors instead, along the lines of Redirect from 'https://c9users.io/_user_content/authorize?redirect=https%3A%2F%2Fxxxxxx-xxxxxx.c9users.io%2Fapp%2Fui.js' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxxxxx-xxxxxx.c9users.io' is therefore not allowed access.

So the screen is black (or ‘black-ish’) and the loading indicator just stays there.