Error: No connection could be made because the target machine actively refused it. (os error 10061) #67

Closed
opened 2026-01-05 14:48:03 +01:00 by adam · 8 comments
Owner

Originally created by @ghost on GitHub (Dec 30, 2021).

I get this error anytime I run a command, it starts normal but when I run komorebi status for example. I get the error. Please help

Originally created by @ghost on GitHub (Dec 30, 2021). I get this error anytime I run a command, it starts normal but when I run komorebi status for example. I get the error. Please help
adam added the bug label 2026-01-05 14:48:03 +01:00
adam closed this issue 2026-01-05 14:48:03 +01:00
Author
Owner

@pigmej commented on GitHub (Dec 30, 2021):

Did you started komorebi earlier via komorebic start?

@pigmej commented on GitHub (Dec 30, 2021): Did you started komorebi earlier via `komorebic start`?
Author
Owner

@ghost commented on GitHub (Dec 30, 2021):

Yes I did

@ghost commented on GitHub (Dec 30, 2021): Yes I did
Author
Owner
@ghost commented on GitHub (Dec 30, 2021): https://user-images.githubusercontent.com/93096206/147785338-9ec6adcb-c5c8-45f3-8cae-915b721723d6.mp4
Author
Owner

@ghost commented on GitHub (Dec 30, 2021):

oops my bad

@ghost commented on GitHub (Dec 30, 2021): oops my bad
Author
Owner

@LGUG2Z commented on GitHub (Dec 31, 2021):

This happens from time to time when using the komorebic wrapper to start the komorebi process from Powershell. When it happens to me, I do one of the following:

  1. Spawn a new Powershell process and try running komorebic start there, though this still may fail
  2. Try running komorebic start from a cmd terminal; I've never had this fail
  3. Run the underlying Powershell command directly in Powershell: Start-Process komorebi.exe -WindowStyle hidden

I don't know enough about calling Powershell from Rust to know why this failure occurs sometimes, but I'm happy to keep this ticket open as a bug for someone who is interested enough to look into it.

@LGUG2Z commented on GitHub (Dec 31, 2021): This happens from time to time when using the komorebic wrapper to start the komorebi process from Powershell. When it happens to me, I do one of the following: 1) Spawn a new Powershell process and try running `komorebic start` there, though this still may fail 2) Try running `komorebic start` from a cmd terminal; I've never had this fail 3) Run the underlying Powershell command directly in Powershell: `Start-Process komorebi.exe -WindowStyle hidden` I don't know enough about calling Powershell from Rust to know why this failure occurs sometimes, but I'm happy to keep this ticket open as a bug for someone who is interested enough to look into it.
Author
Owner

@ghost commented on GitHub (Dec 31, 2021):

Yeah none of those worked

@ghost commented on GitHub (Dec 31, 2021): Yeah none of those worked
Author
Owner

@ghost commented on GitHub (Dec 31, 2021):

nvm it worked, ty

@ghost commented on GitHub (Dec 31, 2021): nvm it worked, ty
Author
Owner

@nivpgir commented on GitHub (Mar 7, 2022):

Hey, I just wanted to say that the same thing happened to me and the workarounds offered here did not help, the best results I managed to get were by changing the code komorebic start is running to:

const CREATE_NO_WINDOW: u32 = 0x08000000;
use std::os::windows::process::CommandExt;
let _child = std::process::Command::new("cmd")
		    .args(["/c", "komorebi.exe"])
                    .creation_flags(CREATE_NO_WINDOW)
                    .spawn().expect("failed to spawn komorebi");

and adding:

#![windows_subsystem = "windows"]

to the top of komorebics main.rs

there's some more testing to be done to be more sure but this is more promising than anything else I've tried,
I don't know much about windows' api but this feels like a much more native/stable way to start komorebi than with powershell (although I wasn't able to get rid of the cmd part of the command).

I'll report back after more testing.

@nivpgir commented on GitHub (Mar 7, 2022): Hey, I just wanted to say that the same thing happened to me and the workarounds offered here did not help, the best results I managed to get were by changing the code `komorebic start` is running to: ``` rust const CREATE_NO_WINDOW: u32 = 0x08000000; use std::os::windows::process::CommandExt; let _child = std::process::Command::new("cmd") .args(["/c", "komorebi.exe"]) .creation_flags(CREATE_NO_WINDOW) .spawn().expect("failed to spawn komorebi"); ``` and adding: ```rust #![windows_subsystem = "windows"] ``` to the top of komorebics `main.rs` there's some more testing to be done to be more sure but this is more promising than anything else I've tried, I don't know much about windows' api but this feels like a much more native/stable way to start komorebi than with powershell (although I wasn't able to get rid of the `cmd` part of the command). I'll report back after more testing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#67