Support query, after installing Orbit Communicator

Unable to connect
Firefox can’t establish a connection to the server at localhost:8080.

First thing to do, assuming there were no errors;

netstat -natp | grep LISTEN

See which ports are open, sounds like 8080 isn’t …

You’ll probably need to look at the application error / debug log. Orbit creates a new user called “orbit-communicator”, so you’ll need to look in (as root);

cd /home/orbit-communicator/.local/orbit-communicator/logs
tail -n30 orbit_system.log

Whatever errors Orbit experienced trying to start up, should be listed here.

Just to verify, you did download from this location?

https://orbit.madpenguin.uk/orbit-communicator

Yes; that’s the link I used, and the installation went OK.

The sudo netstat -natp | grep LISTEN command did not list the 8080 location.
The file orbit-communicator/.local/orbit-communicator/config.ini does indeed list local_port = 8080 and I might try changing it to 8081 if you think that’s useful.
[EDIT] Changed 8080 to 8081 that but nestat didn’t show that either.

K

Yeah, you’ll need to look in the log file to see why its failing.

Another easy way to look;

sudo su - orbit-communicator
orbit_communicator --help

If its not starting, that will probably fail with an error.

Another test to see if its running

service orbit-communicator stop
service orbit-communicator start

See if it reports an error.

No errors - all commands worked as expected.

K

Erm, well, if it’s running, it should open a port and netstat should give an output that includes something like this;

# netstat -natp | grep LISTEN
...
tcp   0  0 127.0.0.1:8080  0.0.0.0:* LISTEN 2370/orbit_communic
...

The only other thing to look at is the log at above;

cd /home/orbit-communicator/.local/orbit-communicator/logs
tail -n30 orbit_system.log

If it’s running it should confirm the port, if not it should give an error.
Those should, in context be the only two options.

sudo su - orbit-communicator
orbit_communicator --list

Will indicate whether anyone has connected yet …

sudo su - orbit-communicator
orbit_communicator --run

Will run and divert output to the command line, including debug. (stop the service first) When you run from the command line, it will confirm the port in the debug …

I think I’ve done all that:…

keith@E5570:~$ netstat -natp | grep LISTEN
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:25001 0.0.0.0:* LISTEN 2029/nxrunner.bin
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5939 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:6341 0.0.0.0:* LISTEN 2309/megasync
tcp 0 0 127.0.0.1:6342 0.0.0.0:* LISTEN 2309/megasync
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:4000 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:7001 0.0.0.0:* LISTEN 2009/nxnode.bin
tcp 0 0 127.0.0.1:23736 0.0.0.0:* LISTEN 2009/nxnode.bin
tcp 0 0 127.0.0.1:23735 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:12001 0.0.0.0:* LISTEN 2009/nxnode.bin
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:7001 :::* LISTEN 2009/nxnode.bin
tcp6 0 0 :::4000 :::* LISTEN -

keith@E5570:~$ cd /home/orbit-communicator/.local/orbit-communicator/logs
bash: cd: /home/orbit-communicator/.local/orbit-communicator/logs: Permission denied
keith@E5570:~$ sudo cd /home/orbit-communicator/.local/orbit-communicator/logs
sudo: cd: command not found
sudo: “cd” is a shell built-in command, it cannot be run directly.
sudo: the -s option may be used to run a privileged shell.
sudo: the -D option may be used to run a command in a specific directory.
keith@E5570:~$ sudo su cd /home/orbit-communicator/.local/orbit-communicator/logs
su: user cd does not exist or the user entry does not contain all the required fields

keith@E5570:~$ sudo su - orbit-communicator
orbit-communicator@E5570:~$ orbit_communicator --list
Traceback (most recent call last):
File “main.py”, line 71, in
db = OrbitDatabase(‘default’).open(gpg=gpg)
File “orbit_db.py”, line 175, in open
File “schema/normGAPICollection.py”, line 54, in init
File “schema/normMetadata.py”, line 14, in get_key
File “schema/normBase.py”, line 199, in lookup_by_key
File “schema/normBase.py”, line 81, in norm_table
File “schema/normBase.py”, line 88, in norm_tb_init
File “schema/normBase.py”, line 108, in norm_tb_init_with_transaction
File “orbit_database/decorators.py”, line 144, in wrapped
File “orbit_database/table.py”, line 406, in ensure
File “orbit_database/catalog.py”, line 87, in get_metadata
Exception: <class ‘lmdb.NotFoundError’>
[14415] Failed to execute script ‘main’ due to unhandled exception!
orbit-communicator@E5570:~$ ^C
orbit-communicator@E5570:~$
orbit-communicator@E5570:~$
orbit-communicator@E5570:~$ service orbit-communicator stop
orbit-communicator@E5570:~$ orbit_communicator --run
unhandled exception during asyncio.run() shutdown
task: <Task finished name=‘Task-1’ coro=<_run_app() done, defined at aiohttp/web.py:289> exception=Exception(<class ‘lmdb.NotFoundError’>)>
Traceback (most recent call last):
File “aiohttp/web.py”, line 516, in run_app
File “asyncio/base_events.py”, line 646, in run_until_complete
File “aiohttp/web.py”, line 323, in _run_app
File “aiohttp/web_runner.py”, line 279, in setup
File “aiohttp/web_runner.py”, line 375, in _make_server
File “aiohttp/web_app.py”, line 417, in startup
File “aiosignal/init.py”, line 36, in send
File “orbit_handlers.py”, line 95, in startup_processes
File “orbit_db.py”, line 147, in open
File “schema/normBase.py”, line 32, in open
File “schema/normBase.py”, line 81, in norm_table
File “schema/normBase.py”, line 88, in norm_tb_init
File “schema/normBase.py”, line 108, in norm_tb_init_with_transaction
File “orbit_database/decorators.py”, line 144, in wrapped
File “orbit_database/table.py”, line 406, in ensure
File “orbit_database/catalog.py”, line 87, in get_metadata
Exception: <class ‘lmdb.NotFoundError’>
Traceback (most recent call last):
File “main.py”, line 132, in
orbit.shutdown()
File “orbit_handlers.py”, line 123, in shutdown
File “orbit_gpg.py”, line 36, in shutdown
AttributeError: ‘NoneType’ object has no attribute ‘put’
[14536] Failed to execute script ‘main’ due to unhandled exception!
orbit-communicator@E5570:~$

orbit-communicator@E5570:~$ exit
logout

keith@E5570:~$ service orbit-communicator stop
keith@E5570:~$ sudo su - orbit-communicator
orbit-communicator@E5570:~$ orbit_communicator --run
unhandled exception during asyncio.run() shutdown
task: <Task finished name=‘Task-1’ coro=<_run_app() done, defined at aiohttp/web.py:289> exception=Exception(<class ‘lmdb.NotFoundError’>)>
Traceback (most recent call last):
File “aiohttp/web.py”, line 516, in run_app
File “asyncio/base_events.py”, line 646, in run_until_complete
File “aiohttp/web.py”, line 323, in _run_app
File “aiohttp/web_runner.py”, line 279, in setup
File “aiohttp/web_runner.py”, line 375, in _make_server
File “aiohttp/web_app.py”, line 417, in startup
File “aiosignal/init.py”, line 36, in send
File “orbit_handlers.py”, line 95, in startup_processes
File “orbit_db.py”, line 147, in open
File “schema/normBase.py”, line 32, in open
File “schema/normBase.py”, line 81, in norm_table
File “schema/normBase.py”, line 88, in norm_tb_init
File “schema/normBase.py”, line 108, in norm_tb_init_with_transaction
File “orbit_database/decorators.py”, line 144, in wrapped
File “orbit_database/table.py”, line 406, in ensure
File “orbit_database/catalog.py”, line 87, in get_metadata
Exception: <class ‘lmdb.NotFoundError’>
Traceback (most recent call last):
File “main.py”, line 132, in
orbit.shutdown()
File “orbit_handlers.py”, line 123, in shutdown
File “orbit_gpg.py”, line 36, in shutdown
AttributeError: ‘NoneType’ object has no attribute ‘put’
[15968] Failed to execute script ‘main’ due to unhandled exception!
orbit-communicator@E5570:~$

Mmm, Ok, can you post the config.ini file from /home/orbit-communicator/.local/orbit-communicator/, it looks like it’s trying to load the database from a non-path, so something looks upset somewhere … in the meantime I’ll try it on a clean install here to see if I can replicate …

keith@E5570:~$ sudo cat /home/orbit-communicator/.local/orbit-communicator/config.ini
[DEFAULT]
updated = 2023-09-16T16:36:22.400527

[BASE]
path = ~/.local/orbit-communicator
code = /opt/orbit-communicator

[NETWORK]
host = 127.0.0.1
port = 8443
local_port = 808
sio_debug = false
engineio_debug = false

[TOOLS]
make_keys = scripts/make_keys.sh

[DATA]
sound = sounds
database = orbit_database
thumbnails = thumbnails
tmp = tmp
templates = templates
web = web
logs = logs
parts_cache = parts_cache
writemap = true

[SSL]
name = localhost
ssl = ssl
secure = false

[GAPI]

keith@E5570:~$

Ok, quick test, it wont like 808 as a local port, can you set to 8081 and try the command line again?

Sorry to be dim:
I’ve forgotten how to set the local port
Which command line?

In the config.ini you listed, the default local_port should have been 8080, reads 808 …

Ok, quick test, it wont like 808 as a local port, can you set to 8081 and try the command line again?

I changed the host to 8081 but netstat -natp | grep LISTEN still doesn’t list it. And I’m not sure which of the many commands you are referring to.

Yeah, to run it with the changed .ini file;

I’m just loading it up on a clean instance here …

Ok, found it, that’s a little embarrassing. The one external dependency managed to update itself and cause a problem. (causes a problem when trying to create a brand new database) External dependency is now internal and rebuilt. If you wan to try from here;

# As root;
wget https://orbit.madpenguin.uk/downloads/orbit-communicator_1.2.166_amd64.deb
apt install ./orbit-communicator_1.2.166_amd64.deb

I’m relatively hopeful that will work for you assuming your .ini file has 8080 in it rather than 808. It should update and restart the server, if you look in the log file when it’s complete;

cd /home/orbit-communicator/.local/orbit-communicator/logs
tail -n30 orbit_system.log

You should see something along the lines of;

2023-09-17 20:47:17.092 | WARNING  | src.schema.normTracker:show_running:90 - +----------------------------------------------------+----------+------------+
2023-09-17 20:47:17.092 | WARNING  | src.schema.normTracker:show_running:96 - | thumb_process                                      | thread   |      14347 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:96 - | thumb_followup                                     | thread   |      14348 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:96 - | OrbitGPG                                           | thread   |      14357 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:96 - | Connection Manager                                 | process  |      14353 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:96 - | Orbit Calendar Sync                                | process  |      14351 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:96 - | Orbit Sendmail                                     | process  |      14356 |
2023-09-17 20:47:17.093 | WARNING  | src.schema.normTracker:show_running:97 - +----------------------------------------------------+----------+------------+
2023-09-17 20:47:17.094 | WARNING  | src.schema.normTracker:show_running:98 - | Tracker entries =    6 |
2023-09-17 20:47:17.094 | WARNING  | src.schema.normTracker:show_running:99 - +------------------------+
2023-09-17 20:47:17.685 | DEBUG    | src.orbit_mgr:run:70 - [ConnectionManager::waiting on queue]

And at the time time you should get a webpage on http://localhost:8080

The install command produced this:

keith@E5570:~$ sudo apt install ./orbit-communicator_1.2.166_amd64.deb
[sudo] password for keith:
Sorry, try again.
[sudo] password for keith:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Note, selecting ‘orbit-communicator’ instead of ‘./orbit-communicator_1.2.166_amd64.deb’
The following packages were automatically installed and are no longer required:
hplip-data python3-renderpm python3-reportlab python3-reportlab-accel
Use ‘sudo apt autoremove’ to remove them.
The following packages will be upgraded:
orbit-communicator
1 to upgrade, 0 to newly install, 0 to remove and 23 not to upgrade.
Need to get 0 B/121 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/keith/orbit-communicator_1.2.166_amd64.deb orbit-communicator amd64 1.2.166 [121 MB]
(Reading database … 242655 files and directories currently installed.)
Preparing to unpack …/orbit-communicator_1.2.166_amd64.deb …
Unpacking orbit-communicator (1.2.166) over (1.2.165) …
Setting up orbit-communicator (1.2.166) …
N: Download is performed unsandboxed as root, as file ‘/home/keith/orbit-communicator_1.2.166_amd64.deb’ couldn’t be accessed by user ‘_apt’. - pkgAcquire::Run (13: Permission denied)
keith@E5570:~$

The last line looks like a failure of some kind?

I can’t cd to the logs page even using sudo, as permission is denied. but going to http://localhost:8080 gets me to the Orbit page! I shall explore and report back.

K

Yeah, I noticed the message too, doesn’t seem to affect the install tho’… it’s something new in Ubuntu. I need to look into the root cause. To get going you need to add an account … it supports standard IMAP servers and GMail, but GMail needs an API key.

The Docs are all videos, they probably need transcribing into proper docs … this is the one for GMail

Channel here;

https://www.youtube.com/@madpenguinconsulting/featured

Note; when setting up an account, you need to set up a “from” address that is both valid, and one your server account is authorised to send from. Some accounts won’t check the latter, but my “MailInABox” server does … so I have a list of valid email addresses from which I can send.
(these can be added individually to an account and it offers a list of possible from’s when sending … and you can associate a different default signature with each address)